Websockets over NB-IOT : connect() failed, err: 111

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) :

Fullscreen
1
2
3
config HTTPS_HOSTNAME
string "HTTPS hostname"
default "httpbin.org"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Fullscreen
1
2
3
4
5
6
#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"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The result is : connect() failed, err: 111 (please find the logs bellow)

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
*** 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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.

Parents Reply Children