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

receiving 'OK' after CR_LF in datamode

I'm currently trying to send a HTTP body payload that includes "\r\n" in the data payload.   I'm getting an "OK" response before I have sent the complete payload. 

The problem occurs when sending the HTTP request (#XHTTPREQ).  After sending the initial AT message including headers

[00:00:35.041,000] <info> MODEM_NRF9160: tx:AT
[00:00:35.041,000] <info> MODEM_NRF9160: tx:#XHTTPCREQ
[00:00:35.041,000] <info> MODEM_NRF9160: tx:=
[00:00:35.041,000] <info> MODEM_NRF9160: tx:"POST","/device/api/v0/station/powerontest","User-Agent: SLM/1.2.0
Accept: application/json
Content-Type: application/octet-stream
x-boundary: ----B0uNd4Ry2018
Content-Length: 1026

",1026
 The AT host is in datamode, so the actual data patterns should be ignored.
I'm sending this payload with \r\n on the first line to datamode:
"------B0uNd4Ry2018\r\n\
Content-Disposition: form-data; name=\"log_data\"\n\
Content-Type: application/json\n\
{\n\
\"source\": \"Basestation 2.14.0\",\n\
\"stationMAC\":\"DA1111111111\",\n\
\"serialNum\":\"B00000\",\n\
\"deviceMAC\":\"DA1111111111\",\n\
\"logType\": \"Station\",\n\
\"fwVersion\": \"2.14.0\",\n\
\"sdVersion\": \"09-89-168\",\n\
\"blVersion\": 8,\n\
\"command\":\"selfTest\",\n\
\"rtc\": {\n\
    \"epochTime\": 1631050498,\n\
    \"batterySwitchOverFlag\": 1,\n\
    \"batteryLowFlag\": 0\n\
  },\n\
\"modem\": {\n\
    \"fwVersion\":\"L0.0.00.00.05.08 [Apr 17 2019 19:34:02]\",\n\
    \"model\":\"SARA-R410M-02B\",\n\
    \"ICCID\":\"89011703278453956677\",\n\
    \"CSQ\":\"+CSQ: 21,99\",\n\
    \"CESQ\":\"+CESQ: 99,99,255,255,14,38\",\n\
    \"IMEI\":\"352753097871972\"\n\
  },\n\
\"createdAt\": \"2021-09-07T21:34:58Z\",\n\
\"epochTime\": 1631050498,\n\
\"localEpochTime\": 13143,\n\
\"tzOffset\":-14400,\n\
\"inventory\":\n\
{\n\
  \"productName\" : \"Trio_Station\",\n\
  \"subsystems\" : [\n\
    { \"id\" : 0, \"name\" : \"NRF_00\", \"version\" : \"2.14.0\" },\n\
    { \"id\" : 1, \"name\" : \"MODEM_00\", \"version\" : \"L0.0.00.00.05.08 [Apr 17 2019 19:34:02]\" }\n\
  ]\n\
}\n\
,\n\
\"last_key\":0\n\
}\n\
\n\
------B0uNd4Ry2018--"
The SLM AT host works as expected if I remove the '\r' character on the first line of the payload.
Any ideas why datamode is terminated when it receives the termination character sequence?  Seems like the command mode is still scanning the data.
Parents Reply Children
No Data
Related