Hello,
I am currently using nRF52840 + NCS 1.5.1 (including zephyr 2.4)
I am using BG95/96 model meaning offloaded socket to have internet connection for leshain & lwm2m
The application was working fine until I upgrade to NCS 1.9.1 (including zephyr 2.7) then socket failed. I can't figure out why
I am placing breakpoints in the offloading code but they are not hint.
I am reading similar topics on Github/zephyrproject-rtos and DevZone and but most off them I already tried but without success.
Any hints or help is most welcome.
Thanks in advance.
The app prf.conf
# Toolchain CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_NANO=n CONFIG_SIZE_OPTIMIZATIONS=y # General system CONFIG_REBOOT=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_HEAP_MEM_POOL_SIZE=32768 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_STACK_SENTINEL=y CONFIG_DEBUG_THREAD_INFO=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_COREDUMP=y # Extra exception debug information CONFIG_EXTRA_EXCEPTION_INFO=y # Enable using the fatal error handler defined for Nordic DKs. CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_FATAL_ERROR_LOG_LEVEL_DBG=y # Global switch for the logger, when turned off log calls will not be compiled in. CONFIG_LOG=y CONFIG_LOG_DEFAULT_LEVEL=4 # Enable processing of printk messages. CONFIG_LOG_PRINTK=y # Enable colors in the log backend. CONFIG_LOG_BACKEND_SHOW_COLOR=n # Amount of buffered logs which triggers processing thread. CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=5 # Set internal log processing thread sleep period CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100 # Number of buffers in the pool used by log_strdup() CONFIG_LOG_STRDUP_BUF_COUNT=128 # Stack size for the internal log processing thread CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=8192 CONFIG_I2C_LOG_LEVEL_OFF=y # Enable timestamp formatting in the backend CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n # Tracing Support (for segger systemView) CONFIG_TRACING=n # Console CONFIG_UART_CONSOLE=n CONFIG_RTT_CONSOLE=n # Drivers CONFIG_GPIO=y CONFIG_I2C=y CONFIG_ADC=y CONFIG_PWM=y CONFIG_NRFX_UARTE0=y CONFIG_UART_ASYNC_API=y CONFIG_WATCHDOG=n # Networking CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y CONFIG_NET_BUF_USER_DATA_SIZE=4 CONFIG_NET_IF_MAX_IPV4_COUNT=2 CONFIG_NET_SOCKETS_LOG_LEVEL_INF=n CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y # Offload Socket APIs [EXPERIMENTAL] # Enables direct offloading of socket operations to dedicated TCP/IP hardware. CONFIG_NET_SOCKETS_OFFLOAD=y # Enable logging in various parts of the network stack. CONFIG_NET_LOG=y # IPv4 enables PPP IPCP support CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_STATISTICS_PER_INTERFACE=y CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_TC_RX_COUNT=1 CONFIG_NET_IF_LOG_LEVEL_DBG=y CONFIG_NET_IF_LOG_LEVEL_INF=n CONFIG_NET_ROUTE_LOG_LEVEL_INF=n CONFIG_NET_ROUTE_LOG_LEVEL_DBG=y CONFIG_NET_CONN_LOG_LEVEL_INF=n CONFIG_NET_CONN_LOG_LEVEL_DBG=y CONFIG_NET_CORE_LOG_LEVEL_DBG=y CONFIG_NET_CORE_LOG_LEVEL_INF=n CONFIG_NET_BUF_LOG_LEVEL_DBG=y CONFIG_NET_BUF_LOG_LEVEL_INF=n CONFIG_NET_UDP=y CONFIG_NET_UDP_LOG_LEVEL_DBG=y CONFIG_NET_UDP_LOG_LEVEL_INF=n CONFIG_NET_PKT_RX_COUNT=4 CONFIG_NET_PKT_TX_COUNT=4 CONFIG_NET_PKT_LOG_LEVEL_DBG=y CONFIG_NET_PKT_LOG_LEVEL_INF=n CONFIG_NET_PKT_TXTIME_STATS_DETAIL=y CONFIG_NET_PKT_RXTIME_STATS_DETAIL=y # Settings CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_SETTINGS=y CONFIG_SETTINGS_NVS=y CONFIG_NVS=y CONFIG_MPU_ALLOW_FLASH_WRITE=y # LwM2M, OMA LWM2M protocol stack. CONFIG_LWM2M=y # Enable DTLS support in the LwM2M client. CONFIG_LWM2M_DTLS_SUPPORT=y # Enable TCP TLS socket option support [EXPERIMENTAL] CONFIG_NET_SOCKETS_SOCKOPT_TLS=y # Enable DTLS socket support [EXPERIMENTAL] CONFIG_NET_SOCKETS_ENABLE_DTLS=y CONFIG_LWM2M_TRACE_ENGINE=Y # Enable LOG function trace support in file LWM2M client. CONFIG_LWM2M_TRACE_CLIENT=y # Enable LOG function trace support in file LWM2M rd client. CONFIG_LWM2M_TRACE_RD_CLIENT=y # support for LWM2M client bootstrap/registration state machine" CONFIG_LWM2M_RD_CLIENT_SUPPORT=y # Enabling this setting allows the RD client to support bootstrap mode. CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y # Maximum length of client endpoint name CONFIG_LWM2M_RD_CLIENT_ENDPOINT_NAME_MAX_LENGTH=64 # Specify maximum number of registration retries CONFIG_LWM2M_RD_CLIENT_MAX_RETRIES=2 # LWM2M engine default server connection lifetime CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=900 # LWM2M Registration Update transmission time before timeout CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY=30 # Set the transport binding to UDP with Queue Mode (UQ). CONFIG_LWM2M_QUEUE_MODE_ENABLED=n # LWM2M CoAP block-wise transfer size ( Possible values: 64, 128, 256, 512 and 1024.) CONFIG_LWM2M_COAP_BLOCK_SIZE=1024 # Base length of the random generated initial ACK timeout in ms. CONFIG_COAP_INIT_ACK_TIMEOUT_MS=6000 # Enable DNS support in the LWM2M client. CONFIG_LWM2M_DNS_SUPPORT=y # LWM2M engine max. pending objects. CONFIG_LWM2M_ENGINE_MAX_PENDING=10 # LWM2M engine max. reply objects. CONFIG_LWM2M_ENGINE_MAX_REPLIES=10 # CONFIG_LWM2M_LOG_LEVEL_INF=y CONFIG_LWM2M_LOG_LEVEL_DBG=y # Include support for LWM2M Connectivity Monitoring Object (ID 4) CONFIG_LWM2M_CONN_MON_OBJ_SUPPORT=y # Connectivity monitor object version 1.0 (default) CONFIG_LWM2M_CONNMON_OBJECT_VERSION_1_0=y # Connectivity monitor object version 1.2 [EXPERIMENTAL] CONFIG_LWM2M_CONNMON_OBJECT_VERSION_1_2=n # Software management object support. CONFIG_LWM2M_SWMGMT_OBJ_SUPPORT=n # Maximum # of device power source records. # CONFIG_LWM2M_DEVICE_PWRSRC_MAX=5 # Maximum # of LWM2M attributes. CONFIG_LWM2M_NUM_ATTR=10 # Location object support. CONFIG_LWM2M_LOCATION_OBJ_SUPPORT=n # Offload TLS socket calls to the offloaded sockets. CONFIG_NET_SOCKETS_OFFLOAD_TLS=n # Maximum number of TLS/DTLS contexts. CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=4 # mbed TLS Support. CONFIG_MBEDTLS=y # Enable support for TLS 1.2 (DTLS 1.2) CONFIG_MBEDTLS_TLS_VERSION_1_2=y # Max payload size for TLS protocol message. CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=1500 # Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher. CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y # Enable the RSA-only based ciphersuite modes. CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=n # Enable the PSK based ciphersuite modes. CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=y
The log of ncs1.5.1
[00:00:30.937,591] inf> Modem: Received response: OK [00:00:30.937,622] inf> Modem: Sending: AT+QLTS=1 [00:00:31.057,617] inf> Modem: Received URC: +QLTS: "2022/04/13,13:57:25+08,1" [00:00:31.057,861] inf> Modem: Time: +QLTS: "2022/04/13,13:57:25+08,1" -> 257698037761 [00:00:31.057,891] inf> Modem: Received response: OK [00:00:31.598,358] inf> Modem: Processing modem command: DRX settings update [00:00:31.598,480] inf> Modem: Sending: AT+QPTWEDRXS=0,4,"1111","1111" [00:00:31.687,133] inf> net_lwm2m_rd_client: Bootstrap started with endpoint 'urn:cust:xxx.xxx.xxx.xxx' with client lifetime 0 [00:00:31.687,408] inf> Modem: Found free socket: 0 [00:00:31.687,438] inf> Modem: Socket created. <ID, FD> : <0, 1> [00:00:31.687,500] dbg> Modem.QueueModemCommand: Queued command: Socket open [00:00:31.687,561] dbg> Modem.HandleCommand: Received command [00:00:31.718,505] inf> Modem: Received response: OK [00:00:31.718,505] inf> Modem: e-I-DRX settings updated [00:00:31.818,603] inf> Modem: Processing modem command: GPS enable [00:00:31.818,634] inf> Modem: Sending: AT+QGPS=1
The log of ncs 1.9.1
[00:14:20.580,596] <inf> Modem: Received response: OK [00:14:20.580,749] <inf> Modem: Sending: AT+QLTS=1 [00:14:20.681,213] <inf> Modem: Received URC: +QLTS: "2022/07/05,08:01:35+08,1" [00:14:20.681,579] <inf> Modem: Time: +QLTS: "2022/07/05,08:01:35+08,1" -> 317780335263746 [00:14:20.681,701] <inf> Modem: Received response: OK [00:14:20.782,196] <inf> Modem: Processing modem command: DRX settings update [00:14:20.782,623] <inf> Modem: Sending: AT+QPTWEDRXS=0,4,"1111","0000" [00:14:20.787,200] <inf> Modem: Received response: OK [00:14:20.787,261] <inf> Modem: e-I-DRX settings updated [00:14:20.891,113] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x2000eb27, buflen:1 [00:14:20.891,174] <inf> net_lwm2m_rd_client: Bootstrap started with endpoint 'urn:cust:xxx.xxx.xxx.xxx' with client lifetime 0 [00:14:20.891,235] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coaps://xx.yy.zz.aa:9999 [00:14:20.892,578] <dbg> net_lwm2m_rd_client.sm_send_bootstrap_registration: Register ID with bootstrap server as 'ep=urn:cust:-89882390000226837246' [00:14:24.468,231] <err> os: SPSEL in thread mode does not indicate PSP [00:14:24.468,231] <err> os: ***** BUS FAULT ***** [00:14:24.468,261] <err> os: Precise data bus error
Toolchain:
Windows,
NCS connect 151/191