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,
    Which SIM card are you using when you try to connect to the NB-IoT network (xsystemmode=0,1,0,0) ?

    AT&T and Verizon do not have NB-IoT support according to GSMA, which would explain why you do not get attached to the network.
    Please notice the responses from the CEREG, there you can see what the status of the modem is.
    e.g. 

    <stat>
    0 – Not registered. User Equipment (UE) is not currently searching for an operator to register to.
    1 – Registered, home network.
    2 – Not registered, but UE is currently trying to attach or searching an operator to register to.
    3 – Registration denied.
    4 – Unknown (e.g. out of E-UTRAN coverage).
    5 – Registered, roaming.
    8 – Attached for emergency bearer services only.
    90 – Not registered due to Universal Integrated Circuit Card (UICC) failure.

  • I'm using a SIM from Deutche Telekom. It was just an assumption that I could connect to nb-iot. It's actually good that I cannot so I have a reasonable test case for when the device gets sent off to who-knows-where that doesn't support it. Included is the log from my application today, trying to connect to nb-iot.

    From what I can tell:

    1. from 00:29 to 01:05 it tries to register with a couple different towers and at 01:05 the network tells me essentially to "leave me alone" with the +CGEV: RESTR 2,2
    2. an hour later, starting at 01:03:39 we repeat the process (the application tries to connect every 60 minutes)
    3. after another hour, at 02:09:55 we repeat. this time, we don't get any RESTR or CEREG stat = 4 responses
    4. finally, the last few lines I ran manually hours later. you can see +CFUN is 4 and CEREG status is 2

    It is the last two things (no CEREG=4 in the 3rd cycle, and CEREG=2 when CFUN is 4) that I am concerned about.

    [00:00:03.294,891] <inf> modem: send: AT%XSYSTEMMODE=0,1,0,0
    [00:00:03.296,905] <inf> modem: got: OK
    [00:00:03.296,936] <inf> modem: send: AT+CFUN=1
    [00:00:03.297,149] <inf> modem: got: OK
    [00:00:03.297,149] <inf> modem: send: AT%XSYSTEMMODE?
    [00:00:03.327,636] <inf> modem: got: OK
    [00:00:03.328,796] <inf> modem: got: %XSYSTEMMODE: 0,1,0,0
    [00:00:03.328,857] <inf> modem: got: OK
    [00:00:03.328,887] <inf> modem: send: AT+CGMI
    [00:00:03.329,223] <inf> modem: got: Nordic Semiconductor ASA
    [00:00:03.329,254] <inf> modem: got: OK
    [00:00:03.329,254] <inf> modem: send: AT+CGMM
    [00:00:03.329,589] <inf> modem: got: nRF9160-SICA
    [00:00:03.329,620] <inf> modem: got: OK
    [00:00:03.329,650] <inf> modem: send: AT+CGMR
    [00:00:03.329,956] <inf> modem: got: mfw_nrf9160_1.1.0
    [00:00:03.329,986] <inf> modem: got: OK
    [00:00:03.330,017] <inf> modem: send: AT+CGSN
    [00:00:03.330,352] <inf> modem: got: 352656100038754
    [00:00:03.330,383] <inf> modem: got: OK
    [00:00:03.330,383] <inf> modem: send: AT+CIMI
    [00:00:03.330,688] <inf> modem: got: ERROR
    [00:00:03.330,718] <inf> modem: send: AT+CEREG=2
    [00:00:03.330,993] <inf> modem: got: OK
    [00:00:03.331,024] <inf> modem: send: AT%CESQ=1
    [00:00:03.331,329] <inf> modem: got: OK
    [00:00:03.331,359] <inf> modem: send: AT+CGEREP=1
    [00:00:03.331,665] <inf> modem: got: OK
    [00:00:29.140,502] <inf> lte: got: %CESQ: 67,3,18,2
    [00:00:29.140,655] <inf> lte: got: +CEREG: 2,"131B","0112393B",9
    [00:00:29.737,548] <inf> lte: got: +CEREG: 4,"131B","0112393B",9
    [00:00:29.992,370] <inf> lte: got: %CESQ: 255,0,255,0
    [00:00:29.992,553] <inf> lte: got: +CEREG: 4,"FFFE","FFFFFFFF",9
    [00:00:39.849,822] <inf> lte: got: %CESQ: 60,3,18,2
    [00:00:39.849,975] <inf> lte: got: +CEREG: 2,"6A81","019E9B0A",9
    [00:00:40.664,459] <inf> lte: got: %CESQ: 255,0,255,0
    [00:00:40.664,642] <inf> lte: got: +CEREG: 2,"FFFE","FFFFFFFF",9
    [00:01:05.449,768] <inf> lte: got: %CESQ: 59,2,16,2
    [00:01:05.449,829] <inf> lte: got: +CGEV: RESTR 2,2
    [00:01:05.449,951] <inf> lte: got: +CEREG: 2,"6D82","01AAD614",9
    [00:02:05.610,351] <inf> lte: got: +CEREG: 2,"6A81","019E9B0A",9
    [00:02:34.772,460] <inf> lte: got: %CESQ: 59,2,21,3
    [00:03:39.850,769] <inf> modem: send: AT+CFUN=4
    [00:03:39.881,988] <inf> lte: got: %CESQ: 255,0,255,0
    [00:03:39.882,141] <inf> lte: got: +CEREG: 0,"6A81","019E9B0A",9
    [00:03:39.929,107] <inf> modem: got: OK
    [01:03:39.891,632] <inf> modem: send: AT%XSYSTEMMODE=0,1,0,0
    [01:03:39.893,676] <inf> modem: got: OK
    [01:03:39.893,707] <inf> modem: send: AT+CFUN=1
    [01:03:39.923,645] <inf> modem: got: OK
    [01:05:42.274,322] <inf> lte: got: %CESQ: 60,3,17,2
    [01:05:42.274,475] <inf> lte: got: +CEREG: 2,"6D82","01AAD614",9
    [01:05:43.480,133] <inf> lte: got: %CESQ: 255,0,255,0
    [01:05:43.480,316] <inf> lte: got: +CEREG: 2,"FFFE","FFFFFFFF",9
    [01:06:24.436,370] <inf> lte: got: %CESQ: 43,2,21,3
    [01:06:24.436,492] <inf> lte: got: +CEREG: 2,"EE0B","00C526D3",9
    [01:06:25.002,136] <inf> lte: got: %CESQ: 255,0,255,0
    [01:06:25.002,319] <inf> lte: got: +CEREG: 2,"FFFE","FFFFFFFF",9
    [01:06:26.994,781] <inf> lte: got: %CESQ: 67,3,21,3
    [01:06:26.994,934] <inf> lte: got: +CEREG: 4,"131B","0112393B",9
    [01:08:03.295,867] <inf> lte: got: %CESQ: 67,3,26,3
    [01:08:08.118,988] <inf> lte: got: %CESQ: 62,3,21,3
    [01:08:08.119,079] <inf> lte: got: +CGEV: RESTR 2,2
    [01:08:08.119,171] <inf> lte: got: +CEREG: 2,"6D82","01AAD614",9
    [01:08:11.957,427] <inf> lte: got: +CEREG: 4,"131B","0112393B",9
    [01:08:28.896,484] <inf> lte: got: %CESQ: 67,3,21,3
    [01:08:34.016,601] <inf> lte: got: %CESQ: 67,3,26,3
    [01:09:55.720,245] <inf> lte: got: %CESQ: 61,3,20,2
    [01:09:55.720,336] <inf> lte: got: +CGEV: RESTR 2,2
    [01:09:55.720,428] <inf> lte: got: +CEREG: 2,"6D82","01AAD614",9
    [01:10:21.711,975] <inf> lte: got: %CESQ: 61,3,15,2
    [01:10:21.712,158] <inf> lte: got: +CEREG: 2,"6A81","019E9B0A",9
    [01:10:21.712,219] <inf> lte: got: +CGEV: RESTR 2,2
    [01:10:50.872,955] <inf> lte: got: %CESQ: 61,3,20,2
    [01:12:55.727,416] <inf> modem: send: AT+CFUN=4
    [01:12:55.746,429] <inf> lte: got: %CESQ: 255,0,255,0
    [01:12:56.035,461] <inf> modem: got: OK
    [02:09:55.727,539] <inf> modem: send: AT%XSYSTEMMODE=0,1,0,0
    [02:09:55.729,583] <inf> modem: got: OK
    [02:09:55.729,614] <inf> modem: send: AT+CFUN=1
    [02:09:55.759,643] <inf> modem: got: OK
    [02:09:55.759,643] <inf> lte: set modem mode OFFLINE -> NORMAL
    [02:12:06.933,532] <inf> lte: got: %CESQ: 39,1,21,3
    [02:12:06.933,685] <inf> lte: got: +CEREG: 2,"EE0B","00C526D3",9
    [02:12:07.499,328] <inf> lte: got: %CESQ: 255,0,255,0
    [02:12:07.499,511] <inf> lte: got: +CEREG: 2,"FFFE","FFFFFFFF",9
    [02:12:08.683,776] <inf> lte: got: %CESQ: 58,2,16,2
    [02:12:08.683,929] <inf> lte: got: +CEREG: 2,"6A81","019E9B0A",9
    [02:12:09.498,413] <inf> lte: got: %CESQ: 255,0,255,0
    [02:12:09.498,565] <inf> lte: got: +CEREG: 2,"FFFE","FFFFFFFF",9
    [02:12:34.283,752] <inf> lte: got: %CESQ: 59,2,17,2
    [02:12:34.283,843] <inf> lte: got: +CGEV: RESTR 2,2
    [02:12:34.283,935] <inf> lte: got: +CEREG: 2,"6D82","01AAD614",9
    [02:12:55.726,928] <inf> modem: send: AT+CFUN=4
    [02:12:55.739,990] <inf> lte: got: %CESQ: 255,0,255,0
    [02:12:56.028,503] <inf> modem: got: OK
    
    hours later, and manually I get:
    
    AT+CFUN?
    +CFUN: 4
    OK
    AT+CEREG?
    +CEREG: 0,2,"6D82","01AAD614",9
    OK
    
    

  • Hi Mike,
    There seems like there is an issue with your SIM card since AT+CIMI responds with ERROR.
    Most likely it is not initialized correctly. This could happen if the SIM card requires a PIN code before starting the modem.

    Please check this with the command AT+CPIN?, and set the PIN code before AT+CFUN=1.
    I would recommend sending AT+CEREG=5 , AT%CESQ=1, before AT+CFUN=1 as well to get notifications when the modem turns ON.
    After AT+CFUN=1 (turning ON the modem) you could enable "Automatic Requests" in the settings tab if you are using the LTE Link Monitor and send the AT command, AT+CFUN?
    to run through the script that updates all the parameters shown in the right hand side tab. It is easier to see what is going on if you run this automatically since it provides alot mote information about the modem + network.

    Best regards,

    Martin L.

  • I programmed the at_client example and ran the LTE link monitor and here's the results...

    The AT+CIMI command returns ERROR until I have turned the modem on for the first time with AT+CFUN=1. This happens with both the DT SIM and iBasis SIM I have. Neither SIM has a PIN code set (AT+CPIN? responds with READY). I can understand the error, but didn't expect it.

    After a fresh reboot, the AT+CPIN? command times out at which time the LTE link monitor no longer processes any AT commands (they all report timed out, also). AT+CPIN? works only after AT+CFUN=1. This remains until I reset the device (nrf9160 DK).

    I should also point out that everything works just fine with xsystemmode=1,0,0,0

Reply
  • I programmed the at_client example and ran the LTE link monitor and here's the results...

    The AT+CIMI command returns ERROR until I have turned the modem on for the first time with AT+CFUN=1. This happens with both the DT SIM and iBasis SIM I have. Neither SIM has a PIN code set (AT+CPIN? responds with READY). I can understand the error, but didn't expect it.

    After a fresh reboot, the AT+CPIN? command times out at which time the LTE link monitor no longer processes any AT commands (they all report timed out, also). AT+CPIN? works only after AT+CFUN=1. This remains until I reset the device (nrf9160 DK).

    I should also point out that everything works just fine with xsystemmode=1,0,0,0

Children
Related