Discussion in "Embedded GSM Development" started by    amitcg    Jan 7, 2012.
Fri May 04 2012, 01:08 am
#11
finally got this thing worked
but still i hv some queries
1.at+cdnscfg="0.0.0.0","0.0.0.0"
(i dont know wht to write over there that is i put "0.0.0.0" just played it blindly )
want to ask u is that fine..... anyhow they r generated automatically rite????
2nd thing is the response i m getting is that ok.....(i mean i m unable to figure out whts going on there)

thanks for d guidance amit sir.....

and ajay sir ur code dint actually work for me
GET /index.html HTTP/1.1 [cr][lf]
Host: www.example.com[cr][lf]
[cr][lf]

m nt getting any response by doing this............ y is tht so
(i had done wht amit sir said sending a blank line and cltr + z tht work for me)
n yes amit sir i actually need to put 2 blank lines
{
ie
cltr + j
cltr + j
cltr +z
}
after this only i got this response


[ Edited Fri May 04 2012, 01:13 am ]
Fri May 04 2012, 02:00 am
#12
1. You don't need to use at+cdnscfg command , it is for setting the Domain name server , but SIM300 automatically receives DNS when IP is configured , so don't use it ,unless u don;'t know DNS , and as i said u don't need to know , its automatic


2. "thing is the response i m getting is that ok " , Perhaps if you have opened "google.com" through SIM300 , u will get a stream of HTML DATA ,on ur hyperterminal , that's perfectly ok, this HTML code is the website code , that browser receives and shows u like a WEBSITE , u r seeing HTML code , that u can see on any web page using "view page source"
 sumitdby like this.
Fri May 04 2012, 02:15 am
#13
hello amit sir.....
i tried skipping at+cdnscfg command n it works fine
bt some time i m getting
>>
+IPD1068:HTTP/1.0 400 Bad Request
Content-Type: text/html; charset=UTF-8
Content-Length: 925

whts wrong.....with this m putting same commands the one i got rite...........
Fri May 04 2012, 02:34 am
#14
ctrl+z is required in case you choose my method or amit's method. What I gave you is the standard GET request header for HTML 1.1 there is no way you wont get anything..

If you want to test it.. just do a telnet on port 80 of any website and try my method.. you will see the answer. here is my attempt for downloading index.html from www.8051projects.net server

rickey@RickeyWorld:~$ telnet www.8051projects.net 80
GET /index.html HTTP/1.1
Host: www.8051projects.net


############
# Response from server
############
Trying 50.31.99.195...
Connected to 8051projects.net.
Escape character is '^]'.
HTTP/1.1 200 OK
Date: Thu, 03 May 2012 21:00:24 GMT
Server: Apache/2
X-Powered-By: PHP/5.2.17
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Last-Modified: Thu, 03 May 2012 21:00:32 GMT
Cache-Control: must-revalidate
Set-Cookie: SESSCOOKIE=e51ba360a42163c985f0f99647e739f1; path=/; domain=.8051projects.net
Content-Language: en
ETag: "24685a492f8332053dbb4066ff853d8f"
Content-Length: 102590
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=utf-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang="en">
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
### Rest of the HTML code...
Connection closed by foreign host.
Fri May 04 2012, 12:58 pm
#15
Hi.... ajay sir
m nt getting wht u r trying to say

what m doing is>>>>>
GET /index.html HTTP/1.1(ctrl+j ctrl+j ctrl+z)

thts it n m getting the above Response
but wen i try

GET /index.html HTTP/1.1(Enter shift+enter Enter shift+enter Enter shift+enter)
m not getting anything instead of a cursor shifted to the starting point of the line & blinking in the same line where i wrote >> GET /index.html HTTP/1.1

no response nthing i had to close the connection forcibly......

plzzzz tellme wht m i suppose do exactly so tht cn hv access to any website.....

1 more thing cn i do this>>>>> GET /index.php HTTP/1.1

thanks in advance


[ Edited Fri May 04 2012, 01:37 pm ]
Sat May 05 2012, 01:28 am
#16
GET /index.html HTTP/1.1(ctrl+j ctrl+j ctrl+z) <--- this is not a standard way to access webpages. Not every server will reply you with this combination. You will get 400 response code (bad request) from those servers.

Well you have to do this way...
GET /index.html HTTP/1.1 (enter)(shift+enter)
after this you need to tell the server which host you want to access
Host: www.websitename.com (enter)(shift+enter)
(enter)(shift+enter)

this will send the complete request to server. some software sends LF (line feed) automatically. so you can also try with using only enter key without sending shift+enter. try again!!

To access website from telnet.. just go to command prompt and type:
> telnet www.websitename.com 80
Sat May 05 2012, 02:41 am
#17

GET /index.html HTTP/1.1 (ctrl+m ctrl+j)
Host: www.websitename.com (ctrl+m ctrl+j)
accept:*/* (ctrl+m ctrl+j)
accept-language: en-us (ctrl+m ctrl+j)
ctrl+j
ctrl+j
ctrl+z

working fine for me i m able to access my website.....
thanks for your guidance....hope u will guide me if i face future doubt.....
this forum is really helpful....
c u soon
Sun May 06 2012, 01:49 am
#18
congrats sumit good luck for future!
Tue May 15 2012, 09:47 am
#19
Hi all,I am using sim300 modem for connecting to net, i found this forum very useful for me.I followed the steps mentioned in above posts and for Google's site, got response as

SEND OK+IPD988:HTTP/1.1 302 FoundLocation: http://www.google.co.in/Cache-Control: privateContent-Type: text/html; charset=UTF-8Set-Cookie: PREF=ID=59e4a5172caca3ec:FF=0:TM=1336987097:LM=1336987097:S=DRRVH_RmaiW6jpZi; expires=Wed, 14-May-2014 09:18:17 GMT; pamSet-Cookie: NID=59=fGtwwr6oQsrLpfAo8P77tXqI3XjWTb-tgB_BpgEQchTuINMrwn0wWwi9LNM1gmOsHpT9joFx0veZn3q_PfXCJmtbgcS11Q3lk1pMepLRErpXGFcfyP3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."Date: Mon, 14 May 2012 09:18:17 GMTServer: gwsContent-Length: 221X-XSS-Protection: 1; mode=blockX-Frame-Options: SAMEORIGIN##SANITISED##><HEAD>##SANITISED## http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>302 Moved</TITLE></HEAD>##SANITISED##><H1>302 Moved</H1>The document has moved<A HREF="http://www.google.co.in/">here</A>.##SANITISED##>##SANITISED##>

but when i try to connect to other sites im getting 'error 400 bad request'. pls tell me the reason for thisThanks,


[ Edited Tue May 15 2012, 09:48 am ]
Wed May 16 2012, 01:12 am
#20
as I already told using "ctrl+j ctrl+j ctrl+z" is not supported by all web servers. So please follow the steps I have mentioned.

GET /index.html HTTP/1.1 (enter)(shift+enter)
after this you need to tell the server which host you want to access
Host: www.websitename.com (enter)(shift+enter)
(enter)(shift+enter)

you can use simple enter too if that works for you. But as I know shift enter is required.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am