M95 HTTPS request POST error 3822

Hi,

We are trying to implement the necessary AT commands to perform a POST to an HTTPS server, but something is wrong, because all the time the response to the HTTP request is error 3822. The Quectel module used is an M95 (M95FA03STD) and this is the list of executed commands and the result for each of them.

–> “AT+QINISTAT\r\n”
<-- 1 OK

–> “AT+CPIN?\r\n”
<-- READY OK

–> “AT+QINISTAT\r\n”
<-- 3 OK

–> “AT+CIMI\r\n”
<-- OK

–> “AT+QREFUSECS=1,1\r\n”
<-- OK

–> “AT+QIFGCNT=0\r\n”
<-- OK

–> “AT+QICSGP=1,“xxx”,“xxx”,“xxx”\r\n”
<-- OK

–> “AT+QIREGAPP\r\n”
<-- OK

–> “AT+QIACT\r\n”
<-- OK

–> “AT+QSSLCFG=“sslversion”,2,4\r\n”
<-- OK

–> “AT+QSSLCFG=“seclevel”,2,0\r\n”
<-- OK

–> “AT+QSSLCFG=“ignorertctime”,1\r\n”
<-- OK

–> “AT+QSSLCFG=“https”,1\r\n”
<-- OK

–> “AT+QSSLCFG=“httpsctxi”,2\r\n”
<-- OK

–> “AT+QHTTPURL=54,80\r\n”
<-- CONNECT

–> “https://xxx.amazonaws.com/dev/gc
<-- OK

–> “AT+QHTTPCFG=“requestheader”,1\r\n”
<-- OK

–> “AT+QHTTPPOST=246,80,80\r\n”
<-- CONNECT

–> “POST /dev/gc HTTP/1.1\r\n”
“Host: xxx.amazonaws.com:443\r\n”
“Accept: /\r\n”
“User-Agent: QUECTEL_MODULE\r\n”
“Connection: close\r\n”
“Content-type: application/json\r\n”
“Content-length: 51\r\n”
“\r\n”
“{“M”:“111111111111”,“I”:“7160652952503786”,“F”:1.4}”
<-- +CME ERROR: 3822

Thanks

Hi,
It seems there’s nothing wrong with your AT command.
Can POST succeed if it without the requestheader?
Could you successfully connect to a TCP server with the module?

Hi,

Our application was previously implemented with a connection to an HTTP server through the QIOPEN (TCP) command, connecting without problems, but with the new endpoints over HTTPS, command QHTTPURL works well, but QHTTPPOST does not work after having tried everything.

And no, we have not tried without using requestheader, because the body type has to be JSON (and without body the result is 400 Bad Request) and QHTTPCFG command does not have an option for this, forcing to use a customized request, if I am not mistaken.

Thanks for your quick response

You can try to see if you can excute GET data from the server.
If this is successful, you can confirm the package format again.
And if that still doesn’t work then you need to grab the log for analyze and please contact support@quectel.com for further support.