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

Init & deinit modem.

Hi, 

Firmware v1.31


I have a question about using those call functions https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/modem/lte_lc.html#c.lte_lc_deinit . Is OK to constantly turn off and on the modem like that. Also in the https://github.com/nrfconnect/sdk-nrf/blob/26499cc18ec0ad915f717cfb05409c6f0a738a76/lib/lte_link_control/lte_lc.c#L489  init function I had to remove the if  condition https://github.com/nrfconnect/sdk-nrf/blob/26499cc18ec0ad915f717cfb05409c6f0a738a76/lib/lte_link_control/lte_lc.c#L493 to make it work. V1.2.0 also don't have the condition.  Will this have an side effects.? .

lte_lc_deinit(void)
lte_lc_offline(void)
lte_lc_power_off(void)
     
if (is_initialized) {
		return -EALREADY;
	}

Parents Reply Children
  • Hi, after lte_lc_offline() and just need to call lte_lc_normal() to put the modem in online mode again. You don't need to initialize anything again. 

    Yes, if you're constantly switching between LTE and GPS mode, the AT commands AT+CFUN=20,21,30,31 will work better.

    However, please be aware that this will cause the device to detach from the network. Then when you go back to online mode, it has to go through the attach procedure with the network again, which takes both time and power.

    We usually recommend enabling either PSM or eDRX when using LTE and GPS concurrently, as this allows the GPS to run when the modem is in RRC idle mode and the device does not have to detach from the network.

    Best regards,

    Heidi

Related