![]() |
nRF Connect SDK API 3.4.99
|
| 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.
| [in] | type | Band lock type. |
| [in] | bands | Pointer to a list of band numbers. |
| [in] | band_count | Number of bands in the list. |
| 0 | if successful. |
| -EINVAL | if input argument was invalid. |
| -E2BIG | if there are too many bands above 88. |
| -EPERM | if the modem library is not initialized. |
| -EBUSY | if the modem is active. |
| -EFAULT | if AT command failed. |
| -EBADMSG | if 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. |