Modem workflow when no LTE-M / NbIoT connectivity

Hello,

i'm working on a project where the system will be always in deep sleep unless there is an external event to wake him up.
Upon this event, the system connects through LTE-M (preferred) and send some data to an external server.
As the system will be mostly sleeping, and since not all carrier supports PSM, the application wil not use PSM or eDRX functionalities, and just perform connect/disconnect at each notification.


That being said, now I'm performing some tests to verify that the system doesn't hangs in no-connectivity scenarios and I'm not understanding the workflow, for which I ask for help.

What I'm finding is that apparently if the system does not connect for a while and finally enters LTE_LC_MODE_NONE, it won't be able to recover unless a system reboot is performed.

The system enters LTE_LC_MODE_NONE if the connection with LTE-M fails and the NBIoT fallback connection kicks in but without obtaining a valid link.

When this happens, if then I put the device is good reception position, I'm not able to get a connection anymore, even if I reactivate LTE system mode.
The only way to recover is a system reboot.

Here is a partial log, where this behaviour can be seen. The firwmare monitors LTE_LC_EVT_NW_REG_STATUS event, and if there's no registration it will stop the connection, deactivate LTE, and try again.
After 5 attempts it performs a system reboot.

[2024-07-02 08:46:25.762] *** Booting Zephyr OS build v3.3.99-ncs1-2 ***
[2024-07-02 08:46:25.762] [00:00:00.260,772] <inf> Cellular: Initializing modem library
[2024-07-02 08:46:25.770] [00:00:00.507,019] <inf> Cellular: Connecting to LTE network
[2024-07-02 08:46:25.775] [00:00:00.555,419] <inf> Cellular: LTE cell changed: Cell ID: -1, Tracking area: -1
[2024-07-02 08:46:25.781] [00:00:00.968,261] <inf> Cellular: IMEI: 350457799485931
[2024-07-02 08:46:25.787] [00:00:00.968,383] <inf> Cellular: Connecting...
[2024-07-02 08:46:25.793] [00:00:01.004,760] <inf> Cellular: Taking semaphore...
[2024-07-02 08:46:27.751] [00:00:02.254,669] <inf> Cellular: Network registration status dbg: 2
[2024-07-02 08:46:27.758] [00:00:02.254,699] <inf> Cellular: LTE cell changed: Cell ID: 9857056, Tracking area: 22086
[2024-07-02 08:46:27.761] [00:00:02.254,730] <inf> Cellular: LTE mode changed: 7
[2024-07-02 08:46:39.911] [00:00:14.419,647] <inf> Cellular: LTE cell changed: Cell ID: -1, Tracking area: -1
[2024-07-02 08:46:39.918] [00:00:14.419,677] <inf> Cellular: LTE mode changed: 0
[2024-07-02 08:46:49.510] [00:00:24.019,226] <inf> Cellular: LTE cell changed: Cell ID: 9857136, Tracking area: 27093
[2024-07-02 08:46:49.516] [00:00:24.019,287] <inf> Cellular: LTE mode changed: 9
[2024-07-02 08:46:49.521] [00:00:24.763,946] <inf> Cellular: RRC mode: Connected
[2024-07-02 08:46:51.066] [00:00:25.571,777] <inf> Cellular: RRC mode: Idle
[2024-07-02 08:47:01.031] [00:00:35.538,604] <inf> Cellular: LTE cell changed: Cell ID: 180025762, Tracking area: 37207
[2024-07-02 08:47:03.678] [00:00:38.187,255] <inf> Cellular: RRC mode: Connected
[2024-07-02 08:47:06.775] [00:00:41.284,210] <inf> Cellular: RRC mode: Idle
[2024-07-02 08:47:06.775] [00:00:41.599,975] <inf> Cellular: LTE cell changed: Cell ID: -1, Tracking area: -1
[2024-07-02 08:47:06.793] [00:00:41.600,006] <inf> Cellular: LTE mode changed: 0
[2024-07-02 08:47:16.390] [00:00:50.900,115] <inf> Cellular: LTE cell changed: Cell ID: 60999559, Tracking area: 24649
[2024-07-02 08:47:16.396] [00:00:50.900,146] <inf> Cellular: LTE mode changed: 9
[2024-07-02 08:47:16.403] [00:00:51.214,691] <inf> Cellular: RRC mode: Connected
[2024-07-02 08:47:16.409] [00:00:51.478,637] <inf> Cellular: RRC mode: Idle
[2024-07-02 08:47:16.414] [00:00:51.842,102] <inf> Cellular: LTE cell changed: Cell ID: -1, Tracking area: -1
[2024-07-02 08:47:16.446] [00:00:51.842,132] <inf> Cellular: LTE mode changed: 0
[2024-07-02 08:47:46.494] [00:01:21.004,913] <inf> Cellular: Deactivating LTE....
[2024-07-02 08:47:46.500] [00:01:21.026,580] <inf> Cellular: Network registration status dbg: 0
[2024-07-02 08:47:46.506] [00:01:21.054,595] <inf> Cellular: LTE deactivated!
[2024-07-02 08:47:46.512] [00:01:21.054,748] <inf> Tracker: Connection error with LTE. Retry
[2024-07-02 08:47:46.535] [00:01:21.154,937] <inf> Cellular: Connecting...
[2024-07-02 08:47:46.536] [00:01:21.195,281] <inf> Cellular: Taking semaphore...
[2024-07-02 08:49:06.686] [00:02:41.195,373] <inf> Cellular: Deactivating LTE....
[2024-07-02 08:49:06.690] [00:02:41.216,674] <inf> Cellular: LTE deactivated!
[2024-07-02 08:49:06.690] [00:02:41.216,735] <inf> Tracker: Connection error with LTE. Retry
[2024-07-02 08:49:06.700] [00:02:41.316,894] <inf> Cellular: Connecting...
[2024-07-02 08:49:06.706] [00:02:41.357,269] <inf> Cellular: Taking semaphore...
[2024-07-02 08:50:26.842] [00:04:01.357,360] <inf> Cellular: Deactivating LTE....
[2024-07-02 08:50:26.847] [00:04:01.370,758] <inf> Cellular: LTE deactivated!
[2024-07-02 08:50:26.847] [00:04:01.370,788] <inf> Tracker: Connection error with LTE. Retry
[2024-07-02 08:50:26.859] [00:04:01.470,977] <inf> Cellular: Connecting...
[2024-07-02 08:50:26.865] [00:04:01.511,322] <inf> Cellular: Taking semaphore...
[2024-07-02 08:51:46.993] [00:05:21.511,413] <inf> Cellular: Deactivating LTE....
[2024-07-02 08:51:46.999] [00:05:21.525,573] <inf> Cellular: LTE deactivated!
[2024-07-02 08:51:46.999] [00:05:21.525,634] <inf> Tracker: Connection error with LTE. Retry
[2024-07-02 08:51:47.015] [00:05:21.625,793] <inf> Cellular: Connecting...
[2024-07-02 08:51:47.016] [00:05:21.666,168] <inf> Cellular: Taking semaphore...
[2024-07-02 08:53:07.147] [00:06:41.666,259] <inf> Cellular: Deactivating LTE....
[2024-07-02 08:53:07.153] [00:06:41.687,866] <inf> Cellular: LTE deactivated!
[2024-07-02 08:53:07.153] [00:06:41.687,896] <inf> Tracker: Connection error with LTE. Retry
[2024-07-02 08:53:07.165] [00:06:41.788,085] <inf> Cellular: Connecting...
[2024-07-02 08:53:07.170] [00:06:41.828,460] <inf> Cellular: Taking semaphore...
[2024-07-02 08:54:28.193] [00:00:00.259,857] <inf> lis2dh: fs=2, odr=0x4 lp_en=0x0 scale=9576
[2024-07-02 08:54:28.197] *** Booting Zephyr OS build v3.3.99-ncs1-2 ***
[2024-07-02 08:54:28.197] [00:00:00.260,437] <inf> Cellular: Initializing modem library
[2024-07-02 08:54:28.209] [00:00:00.506,805] <inf> Cellular: Connecting to LTE network
[2024-07-02 08:54:28.214] [00:00:00.555,206] <inf> Cellular: LTE cell changed: Cell ID: -1, Tracking area: -1
[2024-07-02 08:54:30.039] [00:00:02.108,001] <inf> Cellular: IMEI: 350457799485931
[2024-07-02 08:54:30.046] [00:00:02.108,154] <inf> Cellular: Connecting...
[2024-07-02 08:54:30.046] [00:00:02.144,500] <inf> Cellular: Taking semaphore...
[2024-07-02 08:54:30.052] [00:00:03.009,429] <inf> Cellular: Network registration status dbg: 2
[2024-07-02 08:54:30.075] [00:00:03.009,460] <inf> Cellular: LTE cell changed: Cell ID: 9857056, Tracking area: 22086
[2024-07-02 08:54:30.078] [00:00:03.009,460] <inf> Cellular: LTE mode changed: 7
[2024-07-02 08:54:31.984] [00:00:04.052,276] <inf> Cellular: RRC mode: Connected
[2024-07-02 08:54:32.751] [00:00:05.276,519] <inf> Cellular: Network registration status dbg: 5
[2024-07-02 08:54:32.756] --- 10 messages dropped ---
[2024-07-02 08:54:32.756] [00:00:05.818,298] <inf> Tracker: Send OK, payload:

I would expect that cycling on LTE mode should reset the internal state machine, but I'm not seeing this behaviour.

Could you kindly help in getting more understanding?

Thank you

Related