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

nRF9160 modem stuck in searching

The modem on the nrf9160DK (modem fw v1.1.0) appears to get stuck in searching mode. It doesn't happen all the time, and I was able to create it with the following AT commands:

(I want to see registration status changes)
AT+CEREG=2
AT%XSYSTEMMODE=0,1,0,0
AT+CFUN=1
(after some time (minutes?) reports AT+CEREG: 2, ...)
(then I see no more +CEREG status reports and give up)
AT+CFUN=4
(wait a few seconds)
AT+CFUN? reports +CFUN: 4, so it seems to have taken the command
AT+CEREG? reports +CEREG: 0,2,"XXXX","XXXXXXXX",9

This all works just fine with %XSYSTEMMODE=1,0,0,0. After the AT+CFUN=4 completes it will report +CEREG: 0,0,...

I kind of expect the connect to work with either mode, as I have good reception from both AT&T and Verizon, but I'm more concerned that the modem appears to get in an *almost* unrecoverable state. Changing systemmode to 1,0,0,0 followed by AT+CFUN=1 returns to normal behavior.

If it helps in troubleshooting, the AT+CFUN=4 takes ~3 seconds in mode 1,0,0,0 and less than 1 sec in mode 0,1,0,0

This link describes a similar issue: https://devzone.nordicsemi.com/f/nordic-q-a/55154/lte-network-detected-but-never-connected

Parents
  • Hi Mike,

    I followed the steps you mentioned in the direct message:

    1. Establish initial connect to cat-m1 (for me, it takes < 5 seconds from AT+CFUN=1)
    2. Disconnect AT+CFUN=4
    3. set systemmode to try nb-iot
    4. AT+CFUN=1 fails to connect as expected
    5. disconnect AT+CFUN=4 (This step was missing from your list)
    6. set systemmode to cat-m1
    7. Try to connect AT+CFUN=1

    I tried this several times and sometimes it takes longer times 

    UPDATE 

    Remember when you issue the command AT+CFUN=4 the modem will not save the last network settings/info in the modem flash (AT+CFUN=0 however will do this).
    So if you set the systemmode to nbiot and try to connect and issue the at+cfun=4 then power off/reset nrf9160 it will use the parameters saved in the flash when you turn on the modem to normal mode (AT+CFUN=1).

    If you have a successful connection with the network on CAT-m1 and issue the command AT+CFUN=0 it will save those network parameters in the modem flash.

    The configuration made with an AT command can 
    be stored to NVM memory using AT+CFUN=0 if the
    option is mentioned in the description of the command. 
    This is useful if the command relates to a permanent 
    hardware configuration, because it avoids the need to 
    give the command every time in the beginning of the application.

    and later on, you would issue the AT+CFUN=1 or resetting the device (and then issuing the AT+CFUN=1 command), the modem will use the last known parameters saved in its flash and search for the last known network/band etc. that worked --> which should connect you in seconds. 

    If it takes much longer times than e.g. 30 seconds that means that the modem does not find network right away through it's search algorithm and is checking each band available etc. one trick to decrease search time is to restrict bands to search on (use AT%XBANDLOCK) this will increase the speed of connection.


    From your comment: "The connection in the last step takes > 60 seconds (~90 if I remember correctly). it does successfully connect. All future cat-m1 connections take the 90-ish seconds to connect."

    I was not able to reproduce this. After a successful connection with cat-m1 and then issuing AT+CFUN=4 and then later on issuing the command AT+CFUN=1 it connected in seconds. Did this ON and OFF >10 times and it still connected in seconds.

    Note: I used modem firmware version 1.2.0 when I tested this,

    Please state which Modem Firmware version you are using.



    Best regards,
    Martin L.

  • Based on the behavior I assumed something like the last connect params being stored across resets, but thanks for the clarification. I am using mfw 1.2.0.

    In your testing, were you able to successfully connect to nbiot? I would like to know if there is a difference if the nbiot connects or not. I apparently don't have it in my area (Maryland, USA). 

    One other data point for you.. during my subsequent (after failing on nbiot) cat-m1 attempts, it will eventually connect after ~40 seconds, however after resetting the board it will connect within a few seconds.

  • Hi Mike,

    Tested with both. In my area there are two carriers and one supports both technologies and one supports only LTE-M. 
    I tested with the local SIMs and was able to replicate the same "scenario" as you. (having LTE-M support but not nb-iot)

    Note, the modem will first try to use the network information that is saved in the modem flash (at+cfun=0) 
    So it would make sense that when you power cycle the device it would do a quick connect since it utilizes data in the flash that has proven to work before.

    (I updated my last post since there was some incorrect information)

  • Understood about using params from flash upon reset. For my testing, I do take the effort to verify or set %xsystemmode before any at+cfun=1 and in the case of 'reset fixes it', the system mode is the same both before and after reset. In my tests, I have not used any other commands, aside from what the LTE link monitor inserts.

    I'm running out of suggestions for how you could replicate what I am seeing. 

    In my application (and in testing), I don't want to rely on what's stored in the modem flash so I don't use at+cfun=0 and instead issue all of the AT commands required by the app. Is there a way to clear or reset the modem flash settings? Does updating the mfw do that? If there is no way to reset the modem flash, I'd like to suggest adding that as a feature.

    Mike

  • Hi Mike,
    The only way forward for me to investigate this would be to take a modemtrace while you go through the step by step:

    1. Establish initial connect to cat-m1 (for me, it takes < 5 seconds from AT+CFUN=1)
    2. Disconnect AT+CFUN=4
    3. set systemmode to try nb-iot
    4. AT+CFUN=1 fails to connect as expected
    5. disconnect AT+CFUN=4 (This step was missing from your list)
    6. set systemmode to cat-m1
    7. Try to connect AT+CFUN=1

    So I could analyze what is going on in the modem.
    (As for now there is no command to clear the modem flash settings, I will forward your feature request)

Reply
  • Hi Mike,
    The only way forward for me to investigate this would be to take a modemtrace while you go through the step by step:

    1. Establish initial connect to cat-m1 (for me, it takes < 5 seconds from AT+CFUN=1)
    2. Disconnect AT+CFUN=4
    3. set systemmode to try nb-iot
    4. AT+CFUN=1 fails to connect as expected
    5. disconnect AT+CFUN=4 (This step was missing from your list)
    6. set systemmode to cat-m1
    7. Try to connect AT+CFUN=1

    So I could analyze what is going on in the modem.
    (As for now there is no command to clear the modem flash settings, I will forward your feature request)

Children
Related