Websockets over NB-IOT : No auto-started network interface

Hi,

I would like to test a websocket connection over NB-IOT with the nRF9151DK. I started with the websocket_client example but I have those warnings and errors at startup : 

[00:00:00.380,798] <dbg> net_tcp: net_tcp_init: (0x2000cf38): Workq started. Thread ID: 0x2000cc30
*** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.398,681] <wrn> net_config: No auto-started network interface - network-bound app initialization skipped.
[00:00:00.409,606] <err> net_websocket_client_sample: Failed to create IPv4 HTTP socket (-23)
[00:00:00.418,670] <err> net_websocket_client_sample: Cannot create HTTP connection.

Here is the prj.conf, same as the example but with LTE/NB-IOT feature added : 

# NBIOT Usage
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_NBIOT=y
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y

# Réseau
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POLL_MAX=4
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_NEED_IPV6=n
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024

# Websocket / HTTP
CONFIG_HTTP_CLIENT=y
CONFIG_WEBSOCKET_CLIENT=y

# Logging
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_NET_LOG=y
CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
CONFIG_NET_HTTP_LOG_LEVEL_DBG=y
CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=y
CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y
CONFIG_NET_TCP_LOG_LEVEL_DBG=y

# Stack/mémoire
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=4096

# TLS/crypto
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_SHA1_C=y

# UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_PRINTK=y

Any help is welcomed.

Best regards,

Mallory.

Parents Reply Children
  • MalloryLP said:
    Don't know why yet the zephyr sample don't warks as expected since it is very similar as yours.

    It is based on the Zephyr sample. But since the Zephyr sample doesn't run any code to init the modem lib and search, it won't work out of the box. You need to call nrf_modem_lib_init() and lte_lc_connect() for the modem to function.

    There is also a bunch of kconfig options needed to make the Zephyr TLS stack work with the Nordic security backend.

Related