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

◆ lte_lc_band_lock_set()

int lte_lc_band_lock_set ( enum lte_lc_band_lock_type type,
const uint16_t * bands,
size_t band_count )

#include <lte_lc.h>

Set the band lock.

Bands up to 88 are set using a band mask and bands above 88 using a band list.

The runtime band lock is stored by the library and set again when the modem is initialized or has been powered off. It replaces the bands set using CONFIG_LTE_LOCK_BAND_MASK and CONFIG_LTE_LOCK_BAND_LIST.

When both the permanent and the runtime band lock are set, the modem only uses the bands that are in both. The second band lock must have at least one band in common with the first one, otherwise the modem rejects it. When CONFIG_LTE_LOCK_BANDS is enabled, a runtime band lock is always set, so a permanent band lock must include at least one of its bands.

Note
Requires CONFIG_LTE_LC_BAND_LOCK_MODULE to be enabled.
The modem library must be initialized, and the band lock can only be set when the modem is offline or powered off.
Bands above 88 are only supported by the following modem firmware:
  • mfw_nrf91x1 v2.0.3 or later
  • mfw_nrf9151-ntn
  • lpwa-cellular_nrf92
Parameters
[in]typeBand lock type.
[in]bandsPointer to a list of band numbers.
[in]band_countNumber of bands in the list.
Return values
0if successful.
-EINVALif input argument was invalid.
-E2BIGif there are too many bands above 88.
-EPERMif the modem library is not initialized.
-EBUSYif the modem is active.
-EFAULTif AT command failed.
-EBADMSGif the modem responded with an error to the AT command, for example because the bands are not supported by the modem firmware or have no band in common with the other band lock.