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

CONFIG_LTE_LOCK_BANDS causes error in nrf v1.3.0

when I add a line below to mqtt_simple program, it causes error. How to fix this?

CONFIG_LTE_LOCK_BANDS=y

*** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
The MQTT simple sample started
LTE Link Connecting ...
LTE Link Connected!
ERROR: getaddrinfo failed -11
ERROR: mqtt_connect -47

It seems that at_cmd_write in lte_lc.c gives an error -5

<lte_lc.c>

#if defined(CONFIG_LTE_LOCK_BANDS)
	/* Set LTE band lock (volatile setting).
	 * Has to be done every time before activating the modem.
	 */
	if (at_cmd_write(lock_bands, NULL, 0, NULL) != 0) {
		return -EIO;
	}
#endif

Related