Hi,
I am developing a low-power device to periodically publish data.
I need to turn off the modem after the publishing task is completed.
And I found that sometimes the AT+CFUN=0 takes a long time to get response.
Below is the code piece for turn-off the modem.
// turn-off modem ~ int64_t start = k_uptime_get(); err = lte_lc_power_off(); int64_t end = k_uptime_get(); LOG_DBG("AT+CFUN=0 done (%5llu ms)", end - start);
And here are some logs I got.
[00:11:31.559,295] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 707 ms) [00:12:35.537,811] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 3034 ms) [00:14:09.772,918] <dbg> modem: modem_power_off: AT+CFUN=0 done (37793 ms) [00:15:29.533,721] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 651 ms) [00:17:45.127,807] <dbg> modem: modem_power_off: AT+CFUN=0 done (33883 ms) [00:18:04.649,200] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 681 ms) [00:18:32.629,821] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 745 ms) ---- [00:22:01.609,619] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 3701 ms) [00:23:00.044,921] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 747 ms) [00:24:01.036,315] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 1497 ms) [00:25:39.506,195] <dbg> modem: modem_power_off: AT+CFUN=0 done (40664 ms) [00:26:47.982,025] <dbg> modem: modem_power_off: AT+CFUN=0 done (41370 ms) [00:27:14.052,673] <dbg> modem: modem_power_off: AT+CFUN=0 done ( 733 ms)
You can see that sometimes it takes more than 30 seconds to finish.
Is this normal behavior?
PS. I am using NCS 2.3.0 with Modem FW 1.3.3