Reputation: 21
I am using FONA808 module (making use of sim808 chip) to retrieve the data from a website. However, I am unable to do so. I have checked the following:
- GPRS connectivity : OK (AT+CGATT? returns ok)
- Properly configured APN (AT+CSTT="web2")
- Properly brings up wireless connection (AT+CIICR)
- Gets proper IP address (AT+CIFSR)
I use the following command sequence for HTTP GET:
AT+HTTPINIT => OK
AT+HTTPSSL=1 => For SSL https access
AT+HTTPPARA="CID",1 =>OK
AT+HTTPPARA="URL","http://www.qbwireless.technology" ==>OK
Here happens the problem
AT+HTTPACTION=0 (GET command)
returns
+HTTPACTION: 0,601,0 (meaning NETWORK problem).
I have data available on the sim and can access data using mobile phone.
Can anyone help me finding the problem? Thanks
Here is the data log I have on the serial terminal:
at+csq
+CSQ: 9,0
OK
at+csq
+CSQ: 9,0
OK
at+cgatt?
+CGATT: 1
OK
at+cstt="web2"
OK
at+ciicr
OK
at+cifsr
100.115.48.8
at+cipstart="TCP","www.google.com","80"
OK
STATE: IP STATUS
CONNECT FAIL
at+cipstart="TCP","http://www.qbwireless.technology","80"
OK
STATE: IP STATUS
CONNECT FAIL
at+cmee=1
ERROR
at+cmee=1
ERROR
at+cmee=1
OK
at+
+CME ERROR: 100
at+cipstart="TCP","http://www.qbwireless.technology","80"
OK
STATE: IP STATUS
CONNECT FAIL
at+cipstart="TCP","116.228.221.51","80"
OK
at
OK
at+cgatt?
+CGATT: 1
OK
at+cifsr
100.115.48.8
at+cipclose
+CME ERROR: 100
at+cipclose
+CME ERROR: 100
at+cipclose
CLOSE OK
at+httpinit
OK
at+httpssl=1
OK
at+httpssl?
+HTTPSSL: 1
OK
at+httppara="CID",1
OK
at+httppara?
+HTTPPARA:
CID: 1
URL:
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:
OK
at+httppara="URL","http://www.qbwireless.technology"
+CME ERROR: 100
at+httppara="URL","http://www.qbwireless.technology"
OK
at+httppara?
+HTTPPARA:
CID: 1
URL: http://www.qbwireless.technology
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:
OK
at+httpaction=0
OK
+HTTPACTION: 0,601,0
Upvotes: 1
Views: 2008
Reputation: 21
I got the problem solved. Actually the following commands:
- GPRS connectivity : OK (AT+CGATT? returns ok)
- Properly configured APN (AT+CSTT="web2")
- Properly brings up wireless connection (AT+CIICR)
- Gets proper IP address (AT+CIFSR)
are used for setting up the GPRS for TCP connection NOT for HTTP.
For HTTP I used the following set of commands:
at+sapbr=3,1,"Contype","GPRS"
ERROR
at+cmee=1
OK
ata
+CME ERROR: 3
at+sapbr=3,1,"Contype","gprs"
OK
at+sapbr=3,1,"apn","web2"
OK
at+sapbr=1,1
+CME ERROR: 3
at+sapbr=1,1
OK
at+sapbr=2,1
+CME ERROR: 3
at+sapbr=2,1
+SAPBR: 1,1,"100.112.246.250"
OK
at+httpinit
+CME ERROR: 100
at+httpinit
OK
at+httppara="cid",1
OK
at+httpssl=1
OK
at+httppara="URL","www.sim.com"
OK
at+httppara?
+CME ERROR: 100
at+httppara?
+HTTPPARA:
CID: 1
URL: www.sim.com
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:
OK
at+httpaction=0
OK
+HTTPACTION: 0,603,0
at+httppara="URL","www.google.com"
+CME ERROR: 100
at+httppara="URL","www.google.com"
OK
at+httppara?
+HTTPPARA:
CID: 1
URL: www.google.com
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:
OK
at+httpaction=0
OK
at
OK
at+httpaction=0
OK
+HTTPACTION: 0,604,0
at+httpaction=0
OK
+HTTPACTION: 0,604,0
+HTTPACTION: 0,200,13245
at+httpread
+CME ERROR: 100
at+httpread
+HTTPREAD: 13245
And it worked fine for me. Best of luck.
Upvotes: 1