Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SIM300 - Connect Fail

Status
Not open for further replies.

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
Hi all,

I am totally new in this GPRS/GSM Module. I have connected the module to hyperterminal and send the following command:

OK
AT+CREG?
+CREG: 0,1 //GSM network is OK

OK
AT+CGATT?
+CGATT: 1 //GPRS is active

OK
AT+CIPSTART="TCP","64.233.181.106","80" //connect to www.google.com
OK

STATE: TCP CONNECTING

CONNECT FAIL


It fails to connect. What did I do wrong?? What are the things that I need to check?
I am a total newbie with all this.
 

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
thx for the reply.

I have successfully connect to the web server but there are several things that I don't understand

Below is the command send:

**********************************************************
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","celcom.net.my"
OK
AT+CDNSCFG="208.67.222.222","208.67.220.220"
OK
AT+CSTT="celcom.net.my","",""
OK
AT+CIICR
OK
AT+CIFSR
10.188.225.160
AT+CIPSTATUS
OK

STATE: IP STATUS
AT+CDNSORIP=1
OK
AT+CIPSTART="TCP","www.google.com","80"
OK

CONNECT OK
AT+CIPSEND
> [the part don't understand]



what should I send here? do I have to wait for the webpage response or I have to type in:
GET / HTTP/1.1
Host: www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us

I am lost..pls help
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
The SIM300 sends the '>" when it has established a conneciton with the remote server and is ready to accept the HTTP data. Yes you send:
GET / HTTP/1.1
Host: www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us
Make sure to append a CTRL-Z to indicate that you are done sending data. The Module will then return the response from the server.
 

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
but I get nothing in response
***********************************************************
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","celcom.net.my"
OK
AT+CDNSCFG="208.67.222.222","208.67.220.220"
OK
AT+CSTT="celcom.net.my","",""
OK
AT+CIICR
OK
AT+CIFSR
10.191.252.165
AT+CIPSTATUS
OK

STATE: IP STATUS
AT+CIPHEAD=1
OK
AT+CDNSORIP=1
OK
AT+CIPSTART="TCP","www.google.com","80"
OK

CONNECT OK
AT+CIPSEND
> GET / HTTP/1.1 Host:www.google.com Connection: Keep-Alive Accept: */* Accept-Language: en-us
SEND OK

CLOSED
********************************************************************

Above is the command in window hyperterminal that I have send to my module.
I do not receive anything. What might have causing the problem??
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
Each of these lines
GET / HTTP/1.1
Host: www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us
needs to have a carriage return and line feed after it. Also, you need to send a blank line after that data - before the CTRL-Z.
 

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
I still can't get the server response.

Am using window hyperterminal.

After i receive ">",
First I type:
GET / HTTP/1.1 <Enter><Shift+Enter>
then:
Host: www.google.com <Enter><Shift+Enter>


however, in window hyper terminal, whenever i press enter it shall not go to newline.
It will overwrite the line before it:

> GET / HTTP/1.1 <Enter><Shift+Enter>

> Host / HTTP/1.1 <Enter><Shift+Enter> ---->gets overwritten

please help. I have been trying this command for few days now. still can;t get it work.
I have check my sim and i can successfully surf google website via handphone.
 

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
Carriage <Enter> keystroke
Linefeed <Shift+Enter> keystroke

Are these correct??
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
If you check the box "Send line ends with line feeds" in the "Properties...Settings...ASCII Setup" screen it should send a carriage return and line feed when you hit the Enter key.
 
  • Like
Reactions: zeilja

    zeilja

    Points: 2
    Helpful Answer Positive Rating

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
Thx, that shall do the tricks!
Now I can connect to google and receive from the website.

Added after 16 minutes:

the reply from the webserver is in HTML form.

Now after I have receive the reply, what can I do from here?

or is this just the indication that I am now well connected to the server??

what are these command for??
where shall I read this command?

GET / HTTP/1.1
Host: www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us
 

nat_jacker

Newbie level 6
Joined
Feb 23, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,383
Is this connection to the server is somewhat works like a telnet?

If not, what should I do in order for it to work like telnet??
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
nat_jacker said:
Now after I have receive the reply, what can I do from here?
If you are connecting to Google, probably not much. However, you could have a server that returns useful data to you, or that alllows you to store data on it.
nat_jacker said:
what are these command for??
where shall I read this command?
GET / HTTP/1.1
Host: www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us
This is an HTTP header. It provides information to the server about your request. You can Google "HTTP Header" for details.

nat_jacker said:
Is this connection to the server is somewhat works like a telnet?
No, an HTTP connection is nothing like a Telnet connection.

nat_jacker said:
If not, what should I do in order for it to work like telnet??
Investigate the Telnet protocol and write code to implement it.
 

dodot

Newbie level 1
Joined
Aug 25, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
ina
Activity points
1,284
thanks this topic realy help me...
i use sim900 have same problem..
now solve...thanks ....^_^
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top