Hi,
I would like to test a websocket connect over NB-IOT with the nRF9151DK. I started with the https_client example to do an https handshake with the server and then add the websocket feature.
Here are my modifications (host name and enable nb-iot) :
config HTTPS_HOSTNAME string "HTTPS hostname" default "httpbin.org"
# # Copyright (c) 2023 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # # General CONFIG_HEAP_MEM_POOL_SIZE=1024 CONFIG_MAIN_STACK_SIZE=4096 # Logging CONFIG_LOG=y # Network CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_CONNECTION_MANAGER=y CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024 CONFIG_LTE_NETWORK_MODE_NBIOT=y CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y
#define HTTPS_PORT "443" #define HTTP_HEAD \ "POST /get" \ "HEAD / HTTP/1.1\r\n" \ "Host: " CONFIG_HTTPS_HOSTNAME ":" HTTPS_PORT "\r\n" \ "Connection: close\r\n\r\n"
The result is : connect() failed, err: 111 (please find the logs bellow)
*** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d *** *** Using Zephyr OS v3.7.99-ca954a6216c9 *** HTTPS client sample started Bringing network interface up [00:00:00.534,454] <dbg> lte_lc: xsystemmode_mode_set: System mode set to 2, preference 0 Provisioning certificate Certificate match Connecting to the network [00:00:00.608,276] <dbg> lte_lc: cfun_mode_set: Functional mode set to 21 +CGEV: EXCE STATUS 0 +CEREG: 2,"C3B2","096811CE",9 [00:00:18.376,220] <dbg> lte_lc: at_handler_cereg: +CEREG notification: +CEREG: 2,"C3B2","096811CE",9 [00:00:18.376,281] <dbg> lte_lc: parse_cereg: Network registration status: 2 [00:00:18.376,434] <dbg> lte_lc: parse_cereg: LTE mode: 9 [00:00:18.376,464] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=0 [00:00:18.376,464] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:18.376,495] <dbg> lte_lc: event_handler_list_dispatch: Done [00:00:18.376,495] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=4 [00:00:18.376,525] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:18.376,525] <dbg> lte_lc: event_handler_list_dispatch: Done [00:00:18.376,556] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=5 [00:00:18.376,586] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:18.376,586] <dbg> lte_lc: event_handler_list_dispatch: Done %MDMEV: PRACH CE-LEVEL 0 [00:00:18.415,740] <dbg> lte_lc: at_handler_mdmev: %MDMEV notification [00:00:18.415,771] <dbg> lte_lc: mdmev_parse: Occurrence found: PRACH CE-LEVEL 0 [00:00:18.415,802] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=11 [00:00:18.415,802] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:18.415,802] <dbg> lte_lc: event_handler_list_dispatch: Done +CSCON: 1 [00:00:19.064,514] <dbg> lte_lc: at_handler_cscon: +CSCON notification [00:00:19.064,575] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=3 [00:00:19.064,605] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:19.064,605] <dbg> lte_lc: event_handler_list_dispatch: Done +CGEV: ME PDN ACT 0,0 +CNEC_ESM: 50,0 %MDMEV: SEARCH STATUS 2 [00:00:21.221,191] <dbg> lte_lc: at_handler_mdmev: %MDMEV notification [00:00:21.221,221] <dbg> lte_lc: mdmev_parse: Occurrence found: SEARCH STATUS 2 [00:00:21.221,252] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=11 [00:00:21.221,252] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:21.221,282] <dbg> lte_lc: event_handler_list_dispatch: Done +CEREG: 1,"C3B2","096811CE",9,,,"11100000","11100000" [00:00:21.221,405] <dbg> lte_lc: at_handler_cereg: +CEREG notification: +CEREG: 1,"C3B2","096811CE",9,,,"11100000","11100000" [00:00:21.221,466] <dbg> lte_lc: parse_cereg: Network registration status: 1 [00:00:21.221,649] <dbg> lte_lc: parse_cereg: LTE mode: 9 [00:00:21.221,710] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=0 [00:00:21.221,740] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:21.221,771] <dbg> lte_lc: event_handler_list_dispatch: Done Network connectivity established and IP address assigned Looking up httpbin.org Resolved 100.28.166.39 (AF_INET) Connecting to httpbin.org:443 connect() failed, err: 111 +CEREG: 0 [00:00:29.348,937] <dbg> lte_lc: at_handler_cereg: +CEREG notification: +CEREG: 0 [00:00:29.348,999] <dbg> lte_lc: parse_cereg: Network registration status: 0 [00:00:29.348,999] <dbg> lte_lc: parse_cereg: LTE mode not found, error code: -5 [00:00:29.349,029] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=0 [00:00:29.349,060] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:29.478,851] <dbg> lte_lc: cfun_mode_set: Functional mode set to 20 [00:00:29.478,912] <dbg> lte_lc: event_handler_list_dispatch: Done [00:00:29.478,942] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=4 [00:00:29.478,942] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:29.478,973] <dbg> lte_lc: event_handler_list_dispatch: Done [00:00:29.479,003] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=5 [00:00:29.479,003] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:29.479,034] <dbg> lte_lc: event_handler_list_dispatch: Done +CGEV: ME DETACH +CSCON: 0 [00:00:29.479,217] <dbg> lte_lc: at_handler_cscon: +CSCON notification [00:00:29.479,278] <dbg> lte_lc: event_handler_list_dispatch: Dispatching event: type=3 [00:00:29.479,309] <dbg> lte_lc: event_handler_list_dispatch: - handler=0x0000882D [00:00:29.479,309] <dbg> lte_lc: event_handler_list_dispatch: Done Network connectivity lost Disconnected from the network
The certificate is valid, I have checked.
I have tested without NB-IOT (LTE-M) enable and www.example.com (base hostname) also, same result : connect() failed, err: 111
Any help is welcomed,
Best regards,
Mallory.