1

I'm trying to send JSON, but i'm not able to set Content-Type header.
Other commands are successful:

[23:49:41:856] AT+SAPBR=3,1,"CONTYPE","GPRS"␍␊
[23:49:41:899] ␍␊
[23:49:41:899] OK␍␊
[23:49:52:327] AT+SAPBR=3,1,"APN","internet"␍␊
[23:49:52:367] ␍␊
[23:49:52:367] OK␍␊
[23:49:59:585] AT+CSQ␍␊
[23:49:59:594] ␍␊
[23:49:59:610] +CSQ: 18,0␍␊
[23:49:59:610] ␍␊
[23:49:59:621] OK␍␊
[23:50:07:449] AT+SAPBR=1,1␍␊
[23:50:08:501] ␍␊
[23:50:08:512] OK␍␊
[23:50:13:900] AT+SAPBR=2,1␍␊
[23:50:13:928] ␍␊
[23:50:13:928] +SAPBR: 1,1,"127.0.0.1"␍␊
[23:50:13:955] ␍␊
[23:50:13:955] OK␍␊
[23:50:21:261] AT+HTTPINIT␍␊
[23:50:21:291] ␍␊
[23:50:21:291] OK␍␊
[23:50:40:284] AT+HTTPPARA="CID",1␍␊
[23:50:40:320] ␍␊
[23:50:40:320] OK␍␊
[23:50:47:652] AT+HTTPPARA="URL","http://127.0.0.1:5000/data"␍␊
[23:50:47:713] ␍␊
[23:50:47:713] OK␍␊
[23:50:54:359] AT+HTTPPARA="CONTENT","application/json"␍␊
[23:50:54:414] ␍␊
[23:50:54:414] +CME ERROR: operation not allowed␍␊
[23:51:06:576] AT+HTTPDATA=38,10000␍␊
[23:51:06:612] ␍␊
[23:51:06:612] DOWNLOAD␍␊
[23:51:12:034] ␍␊
[23:51:12:050] OK␍␊
[23:51:19:386] AT+HTTPACTION=1␍␊
[23:51:19:414] ␍␊
[23:51:19:414] OK␍␊
[23:51:27:747] ␍␊
[23:51:27:758] +HTTPACTION:1,500,290␍␊
[23:51:35:599] AT+HTTPREAD␍␊
[23:51:35:628] ␍␊
[23:51:35:628] +HTTPREAD:290␍␊
[23:51:35:635] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">␊
[23:51:35:692] <title>500 Internal Server Error</title>␊
[23:51:35:735] <h1>Internal Server Error</h1>␊
[23:51:35:766] <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>␊
[23:51:35:935] ␍␊
[23:51:35:935] OK␍␊

ip addresses aren't real.

My server received invalid request (with JSON body, but without special header), and replied 500 Internal Server Error.

Revision: 1137B08SIM900M64_ST_DTMF_JD_MMS

asked Aug 20, 2020 at 22:01
6
  • 127.0.0.1?! How do you expect to get there? Commented Aug 20, 2020 at 22:36
  • I wrote ip addresses aren't real.. I don't want to share my public ip. Commented Aug 20, 2020 at 22:49
  • Sorry, missed that bit. I'm viewing on my phone at the moment. Commented Aug 20, 2020 at 23:08
  • You need firmware version B10 to use the content Param. You have B08. Commented Aug 20, 2020 at 23:17
  • @Majenko, thank for your reply. At the moment I'm trying to upgrade to 1137B15SIM900M64_ST through pl-2303hx adapter, but my attempts are unsuccessful. Commented Aug 20, 2020 at 23:22

1 Answer 1

1

Thanks for @Majenko.
I solved problem by upgrade firmware to 1137B15SIM900M64_ST.

answered Sep 9, 2020 at 8:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.