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

Parents Reply Children
  • I added these two lines but it gives the same result. no luck..

    CONFIG_LTE_LOCK_BANDS=y
    CONFIG_LTE_LOCK_BAND_MASK="10000001000000001100"

    This is the whole prj.conf

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    #
    
    # Networking
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_POSIX_NAMES=y
    
    # LTE link control
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    
    # BSD library
    CONFIG_BSD_LIBRARY=y
    
    # AT Host
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_AT_HOST_LIBRARY=y
    
    # MQTT
    CONFIG_MQTT_LIB=y
    CONFIG_MQTT_LIB_TLS=n
    
    # Appliaction
    #CONFIG_MQTT_PUB_TOPIC="/my/publish/topic"
    #CONFIG_MQTT_SUB_TOPIC="/my/subscribe/topic"
    #CONFIG_MQTT_CLIENT_ID="my-client-id"
    #CONFIG_MQTT_BROKER_HOSTNAME="mqtt.eclipse.org"
    #CONFIG_MQTT_BROKER_PORT=1883
    
    # Main thread
    CONFIG_MAIN_STACK_SIZE=4096
    
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    
    CONFIG_LTE_LOCK_BANDS=y
    CONFIG_LTE_LOCK_BAND_MASK="10000001000000001100"

  • Can you try mqtt_simple adding the two lines in the same environment?

Related