This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HTTP POST request error when using SIM900

hi,
im using a 8051 uC to post to a thingspeak.com/ channel using a SIM900 GSM modem. i used the following commands.
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,"APN","WWW"
OK
AT+SAPBR=1,1
OK
AT+SAPBR=2,1
+SAPBR: 1,1,"100.119.182.199"

OK
AT+HTTPINIT
OK
AT+HTTPPARA="CID",1
OK
AT+HTTPPARA="URL","">api.thingspeak.com/update"
OK
AT+HTTPDATA=188,10000
DOWNLOAD

ERROR
AT+HTTPACTION=1
OK

+HTTPACTION:1,400,1

i have no idea why i am getting a error after i transfer the POST request data within 10 seconds after the AT+HTTPDATA command.

The POST request looks something like this.
POST /update HTTP/1.1
Host: api.thingspeak.com
Connection: close
X-THINGSPEAKAPIKEY: i use the write key for my channel here
Content-Type: application/x-www-form-urlencoded
Content-Length: 14

field1=150

Can someone please help? TIA

Parents Reply Children
No data