I've heard that there are two methods to do that, GET and POST and I know the differences like in GET method we send data in URL and in POST method we do that in some rules. But I don't know how to do that with sim800 or sim900 and how to configure my module.
Asked
Active
Viewed 3,517 times
1 Answers
2
First you have to initialize the SIMCOM module:
Initialization
- Set context type: AT+SAPBR=3,1,"CONTYPE","GPRS"\r\n
- Set APN: AT+SAPBR=3,1,"APN","YourAPN"\r\n
- Open bearer: AT+SAPBR=1,1\r\n
- Query bearer: AT+SAPBR=2,1\r\n
- Enable HTTP functions: AT+HTTPINIT\r\n
- Set bearer profile identifier: AT+HTTPPARA="CID",1\r\n
- Set the URL: AT+HTTPPARA="URL","YourURL"\r\n
- Set Content-Type field in the HTTP header: AT+HTTPPARA="CONTENT","application/json"\r\n
After the SIMCOM module has been initialized you can POST or GET:
For a POST request
- Set the JSON string to be sent: AT+HTTPDATA=StringLength,20000\r\nYourJSONString
- HTTP POST: AT+HTTPACTION=1\r\n
For a GET request
- HTTP GET: AT+HTTPACTION=0\r\n

Borja Tarazona
- 165
- 2
- 13