CONFIG_NET_NATIVE needs to be enabled for nRF9151 LTE-M

Hello,

I am developing an LTE-M application on nRF9151, using offloaded sockets to modem, including DTLS.

Everything works great - can connect to network, and communicate with a server over CoAP.

However, in my prj.conf, CONFIG_NET_NATIVE=y (enabled).

I am aware that this should be disabled typically for offloaded socket configuration. However this does not work for me.

When I set CONFIG_NET_NATIVE=n, I get this error during the connect phase:

[00:00:00.745,208] <dbg> nrf_modem_lib_netif: lte_net_if_connect: Connecting to LTE
[00:00:03.404,663] <dbg> nrf_modem_lib_netif: pdn_event_handler: PDN connection activated
[00:00:03.405,670] <err> nrf_modem_lib_netif: ipv4_addr_add, error: -19
[00:00:03.405,700] <dbg> nrf_modem_lib_netif: lte_net_if_disconnect: Disconnecting from LTE

here is my full network config:

# Network Config
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_POSIX_API=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_NATIVE=y
CONFIG_NET_UDP=y
CONFIG_NET_IPV4=y

# Zephyr Network Connection Manager
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024

# nRF91 Modem
CONFIG_NRF_MODEM_LIB=y
CONFIG_NRF_MODEM_LIB_NET_IF=y
CONFIG_NRF_MODEM_LIB_NET_IF_LOG_LEVEL_DBG=y

# Disable Duplicate Address Detection (DAD)
# due to not being properly implemented for offloaded interfaces.
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n

# Network status monitoring
CONFIG_INYO_LTE_NETWORK_AT_MONITOR=n

I believe having CONFIG_NET_UDP=y & CONFIG_NET_IPV4=y are actually not necessary but they are enabled for now.

Despite not setting CONFIG_NET_NATIVE=n, I can still see the sockets being offloaded to modem lib and things work fine.

I would just like to understand what causes this issue since it should work with CONFIG_NET_NATIVE=n.

(I am using NCS v3.1.0, modem firwmare = mfw_nrf91x1_2.0.2)

 

Thanks in advance,

Jason

  • Hi Dejan,

    The .config file in my build folder did not contain much - I have attached autoconf.h which shows all the Kconfig symbols in my build. Is this okay?

    7674.autoconf.h

    Full log:

    *** Booting nRF Connect SDK v3.1.0-6c6e5b32496e ***
    *** Using Zephyr OS v4.1.99-1612683d4010 ***
    [00:00:00.373,260] <inf> at_cmd_custom: Custom AT commands enabled with 5 entries.
    [00:00:00.373,321] <dbg> nrf_modem_lib_netif: lte_net_if_init: Connection timeout is disabled
    [00:00:00.373,382] <dbg> nrf_modem_lib_netif: lte_net_if_init: Connection persistence is enabled
    [00:00:00.373,413] <dbg> nrf_modem_lib_netif: lte_net_if_init: Modem network interface ready
    *** Starting Inyo LTE Firmware ***
    [00:00:00.730,651] <dbg> nrf_modem_lib_netif: lte_net_if_connect: Connecting to LTE
    [00:00:03.467,346] <dbg> nrf_modem_lib_netif: pdn_event_handler: PDN connection activated
    [00:00:03.468,292] <err> nrf_modem_lib_netif: ipv4_addr_add, error: -19
    [00:00:03.468,353] <dbg> nrf_modem_lib_netif: lte_net_if_disconnect: Disconnecting from LTE
    [00:00:03.468,475] <err> inyo_network: NET_EVENT_CONN_IF_FATAL_ERROR
    [00:00:03.526,275] <wrn> at_monitor: No heap space for incoming notification: +CGEV: ME DETACH
    
    [00:00:03.622,070] <wrn> at_monitor: No heap space for incoming notification: +CSCON: 0
    
    [00:00:03.701,385] <dbg> nrf_modem_lib_netif: pdn_event_handler: Event: PDP context 0, PDN type IPv4 only allowed
    [00:00:03.701,690] <dbg> nrf_modem_lib_netif: lte_reg_handler: Registered to serving cell
    [00:00:03.701,690] <dbg> nrf_modem_lib_netif: update_has_cell: Gained serving cell
    [00:00:03.701,843] <dbg> nrf_modem_lib_netif: lte_reg_handler: Not registered to serving cell
    [00:00:03.701,873] <dbg> nrf_modem_lib_netif: update_has_cell: Lost serving cell
    [00:00:05.374,145] <inf> coap_request: Waiting for network to connect..
    [00:00:10.374,237] <inf> coap_request: Waiting for network to connect..
    [00:00:15.374,328] <inf> coap_request: Waiting for network to connect..

  • Hi Jason,

    You have configured CONFIG_NET_CONNECTION_MANAGER=y, and you use conn_mgr_all_if_up() and conn_mgr_all_if_connect() from Connection Manager Connectivity API. In case when connection manager is used, it is required that you also have CONFIG_NET_NATIVE=y.

    Best regards,
    Dejan

  • Thanks Dejan - I can see that it works when I disable CONFIG_NET_CONNECTION_MANAGER. I will leave CONFIG_NET_NATIVE enabled and continue to use CONFIG_NET_CONNECTION_MANAGER.

    Thanks,

    Jason

  • Hi Jason,

    I am glad to hear that your problem got resolved. Thank you for the update.

    Best regards,
    Dejan

Related