This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

serial LTE modem bricks

Hello. For a long time I see that nrf9160 Serial LTE modem examples are not stable, tested few times in a year.At very begininng   I have customized for my  own needs SLM application and it works fine (2020 May source code). At least it works stable with 460800 baud rate, standard AT#XSEND, AT#XRECV commands.
But now I wanted to find out new updates in this SLM firmware and test it with nrf9160 B1 new hardware. It is not stable at all. Just bricks randomly on AT#XRECV =0 (with zero timeout),modem becomes unresponsive to any other AT command...
I am using latest modem firmware 1.3 and latest (July 20 available) source code from

origin    github.com/.../sdk-nrf (fetch)
origin    github.com/.../sdk-nrf (push)

master branch

I have b1 and b0 HW revisions nRF9160 dev kits. Both behaves similar, just randomly bricks on
AT#XRECV =0 command.

When I am changing baud rate of UART communication higher than 115200b/s modem bricks fasterm even after few received bytes with AT#XRECV =0 command...

  • Hello, D4L!

    Thanks for reaching out. The master branch is not guaranteed to be stable, so could you test the SLM application on NCS v1.6.0, which is the latest stable release of the SDK? I will look into the issues with the master branch code. There has been some recent commits that may be causing them.

    Note as well that v1.3 of the modem firmware isn't supported on the B0 HW revision, so please avoid upgrading your B0 HW with that release.

    Best regards,
    Carl Richard


  • Hello, Carl. Glad that You are willing to help.

    Tested with very same conditions as before,  but with SLM version  from  origin/v1.6-branch.
    End result is errors and random bricks.


    Testing 1.6 version
    /*******************************************************************************************************************************************/

    Firstly I am sending

    AT+CFUN=1

    Then checking status with AT+COPS?
     If operator connects device, opening socket on my server:
    AT#XSOCKET=1,1,0

    Connecting to my server:

    AT#XCONNECT="<ip>",<port>

    With 1.6 version sometimes modem bricks even with AT#XCONNECT command, modem hangs for a random amount of time, sometimes it unbricks after 10-20 mins and throws  #XSOCKET: -116,"closed.  Anyway it should not hang so long at any case.


    In cases when  connection with server establishes  without random bricking I continue with  AT#XRECV = 100 (receive 100 bytes) modem hangs, bricks or gets error (code -22). ..Very rarely modem gets data from server...
     


    For a testing I am using linux computer. Opening ports on my router, enabling  tcp port via firewall on linux pc.
    For simplicity using nc-l <port> command to send/get data. It should not be a case.
    Trying with string, binary data, no matter what, results are same. With 2020 May master branch source code I have never discovered such strange modem behavior in same tests and conditions.


    Note
    Keep in mind that I am aware of these changes:

    I know that 1.6 and above versions AT#XRECV commands has 1 argument which is data length. In newest firmware from master branch it is timeout. This is a major change. Also there are changes in data reception, hex, string and binary. Very old versions had string and hex modes, 1.6 has string for sure(tested with it) , newest master branch has binary direct data mode which is nicer.



    Strange errors may be related with cellular operator at current time. But I can't prove or disprove it. It just guess. Modem hangs and bricks should not be related with cellular operator network.


    Regards,
    d4L



  • Hello again!

    I've being doing some testing myself against "google.com:80" and I'm not seeing any issue there. However, I can confirm that trying to receive from a server without requesting first leaves the application hanging as no timeout is specified. The issues you are seeing on the master branch may be related to CONFIG_SLM_EXTERNAL_XTAL being disabled. Could you try to enable it and try again?

    Have you verified that the server you have setup at home is working properly? If possible please provide a modem trace of the application.

    Best regards,
    Carl Richard

  • AT#XRECV =0 (with zero timeout) will make SLM to wait infinitely for incoming packets.

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/SOCKET_AT_commands.html#receive-data-xrecv

    Please consider to add timeout then the poll function will help you.

  • Okay, I have tested with newest master branch. Defined CONFIG_SLM_EXTERNAL_XTAL as recommended. Where trying with 115200 baudrate.
    AT#XRECV=1 with 1s timeout works more stable, did not noticed any hanging.But  with 921600 baud rate it still hangs.
    But after many tests (with 115200 baud rate) still noticed few times that modem bricks on AT#XCONNECT command, but very rarely. Btw tested newest AT#XSEND without arguments, it works nice, versions above did not had that direct mode which can be stopped with special characters.

Related