nRF9160 SLM data mode exit

Hi,

I'm using nRF9160 to send real-time data over MQTT. I'm doing 1 MQTT publish per second. It works most of the time, however, I noticed that the modem couldn't exit the data mode occasionally. I append "+++" at the end of the data, but the modem remains in the data mode. Any suggestions on how to exit data mode correctly?

I'm using SLM 2.0.2 with modem FW 1.3.2

Thanks,

Parents Reply Children
  • Hi Øyvind,

    Thanks for the suggestion. Under normal conditions, the modem should do the following:

    Enters data mode --> sends ABC bytes --> sends XYZ bytes --> exits data mode (by appending "+++" at the end of sending XYZ bytes).

    The RTT viewer for normal conditions looks like this:

    However, the "+++" doesn't always work immediately. The abnormal conditions look like this:

    Enter data mode --> sends ABC bytes --> sends XYZ bytes (with "+++" appended in the end) --> sends QRS bytes --> exits data mode. Although the modem receives the "+++" at the end of XYZ bytes, it doesn't actually exit the data mode until QRS was sent.

    From this capture, the modem receives "+++" symbol at time 00:14:57.111,145, but didn't exit data mode until the next blob was sent 00:14:58.559,844.

    This confuses my state machine, so part of the command was treated as data and being sent.

    Any suggestions?

    Thanks!

  • yesheng said:
    This confuses my state machine, so part of the command was treated as data and being sent.

    Have you added this state machine to the Serial LTE Modem application? If so, can you share what this does and where it does?

  • Sorry I wasn't clear. I was referring to the state machine in the host MCU. The state machine thinks the 9160 exits the data mode and starts sending some AT commands. However, those AT commands were sent to the MQTT broker.

    I'm using the out-of-the-box SLM FW. 

  • Thanks for clarifying. Sorry for the late answer. 

    Can you provide the commands that you send from the host MCU to the SLM device? What signal does your state machine receive from the SLM?

  • Hi Øyvind,

    I'm using AT#XMQTTPUB to enter data mode, the payload comes after this. The payload ends with "+++", which tells the modem to leave the data mode.

    Once the modem is stuck in the data mode, the next AT#XMQTTPUB will be treated as part of the payload. Hence, I can see the "+++AT#XMQTTPUB" in the MQTT broker.

    My hypothesis is the modem for some reason stuck in "datamode off pending" state for a little longer. Hence, the modem still sends everything it receives until it actually leaves the datamode. 

Related