nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_modem_lib_init()

int nrf_modem_lib_init ( void  )

#include <include/modem/nrf_modem_lib.h>

Initialize the Modem library and turn on the modem.

The operation can take a few minutes when a firmware update is scheduled.

To switch between the bootloader mode and normal operating mode, shutdown the modem with nrf_modem_lib_shutdown() and re-initialize it in the desired mode. Use nrf_modem_lib_init() to initialize in normal mode and nrf_modem_lib_bootloader_init() to initialize the Modem library in bootloader mode.

Return values
Zeroon success.
-NRF_EPERMThe Modem library is already initialized.
-NRF_EFAULTinit_params is NULL.
-NRF_ENOLCKNot enough semaphores.
-NRF_ENOMEMNot enough shared memory.
-NRF_EINVALControl region size is incorrect or missing handlers in init_params.
-NRF_ENOTSUPPRPC version mismatch.
-NRF_ETIMEDOUTOperation timed out.
-NRF_ACCESSModem firmware authentication failure.
-NRF_EAGAINModem device firmware upgrade failure. DFU is scheduled at next initialization.
-NRF_EIOModem device firmware upgrade failure. Reprogramming the modem firmware is necessary to recover.