the communication with nrf52840 and nrf9160 not working sometimes

Hi, I have been using nrf52840(my application) and nrf9160(Serial LTE Modem : SLM , which modem firmware was ver1.3.6 and application firmware from switch science )

First, I tried HTTP access to my server on AWS.

For concise explanation, I put serial post into nrf9160 SLM.

(For some reason, I use "...' replace the original string)
Here is the log for using AT to do HTTPS POST:

AT#XHTTPCCON=1,"....amazonaws.com",443,222

#XHTTPCCON: 1

OK
AT#XHTTPCREQ="POST","/...","User-Agent: slm\r\naccept: */*\r\n","2024/08/01 10:00:39,...",32

OK

#XHTTPCREQ: 1
...
+++
#XDATAMODE: 0

#XHTTPCREQ: 0
HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 01:35:43 GMT
Content-Type: application/json
Content-Length: 26
Connection: keep-alive
x-amzn-RequestId: ...
x-amz-apigw-id: ...
X-Amzn-Trace-Id: ...

As I succeeded in access, I made the serial sending program to SLM with nrf52840 instead of my hand.

But, SLM responces as below.

AT#XHTTPCCON=1,"....amazonaws.com",443,222

#XHTTPCCON: 1

OK
AT#XHTTPCREQ="POST","/...","User-Agent: slm\r\naccept: */*\r\n","2024/08/01 10:00:39,...",32

OK

#XHTTPCREQ: 1
...
+++
#XDATAMODE: 0

#XHTTPCREQ: -128

ERROR

Is this normal that the modem still return "-128" regardless of the 'timed out' .

According to docs (https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/serial_lte_modem/doc/HTTPC_AT_commands.html ),
it just written "Negative integer - Error code".
What happen to the "XHTTPCREQ: -128" after payload send?

Kind regards.

Related