Robotica
Newbie level 1
Hi guys
Please note, i am new to the topic so plz be simple in your suggestions.
I would really appreciate if some one could assist me on how to go about test if my sim340 GPRS modem can receive data.
I have used the famous code below to test if the modem sends data.
AT+CGATT=1 - Attach to GPRS Service
AT+CGDCONT=1,'IP','myMTN' - Define PDP Context (cid, PDP type, APN)
AT+CSTT='myMTN'
AT+CIICR - Bring up wireless connection
AT+CIFSR - Get Local IP address
AT+CIPSTATUS - Get Connection Status (needs to be 'IP STATUS' before you can connect to a server)
AT+CIPSTART='TCP','google.com','80' - Start up TCP connection (mode, IP address/name, port)
AT+CIPSEND
GET / HTTP/1.1
Host: www.google.com
Accept: */*
Accept-Language: en-us
- Send a blank-line and then a Ctrl-Z
- Data from the remote server will be sent by the module
I receive all successful results from the modem up until and including GET/HTTP/1.1......how should i enter the rest information (Host,Accept,Accept-language) after this line. should i just press <enter> and type in the rest information on each line???
If i terminate the line GET/HTTP/1.1 with ctrl+Z then i receive "send Ok". I dont receive any other data from the server.
Basically my problem is trying to test if the modem can receive data. If anyone has an easy way to do so...plz let me now.
If anything is not clear, please let me know and i will try to be more clearer.
Thankz guys.
Please note, i am new to the topic so plz be simple in your suggestions.
I would really appreciate if some one could assist me on how to go about test if my sim340 GPRS modem can receive data.
I have used the famous code below to test if the modem sends data.
AT+CGATT=1 - Attach to GPRS Service
AT+CGDCONT=1,'IP','myMTN' - Define PDP Context (cid, PDP type, APN)
AT+CSTT='myMTN'
AT+CIICR - Bring up wireless connection
AT+CIFSR - Get Local IP address
AT+CIPSTATUS - Get Connection Status (needs to be 'IP STATUS' before you can connect to a server)
AT+CIPSTART='TCP','google.com','80' - Start up TCP connection (mode, IP address/name, port)
AT+CIPSEND
GET / HTTP/1.1
Host: www.google.com
Accept: */*
Accept-Language: en-us
- Send a blank-line and then a Ctrl-Z
- Data from the remote server will be sent by the module
I receive all successful results from the modem up until and including GET/HTTP/1.1......how should i enter the rest information (Host,Accept,Accept-language) after this line. should i just press <enter> and type in the rest information on each line???
If i terminate the line GET/HTTP/1.1 with ctrl+Z then i receive "send Ok". I dont receive any other data from the server.
Basically my problem is trying to test if the modem can receive data. If anyone has an easy way to do so...plz let me now.
If anything is not clear, please let me know and i will try to be more clearer.
Thankz guys.