Hi,
I am adapting the Azure IoT example for use with the nRF5340DK and nRF7002EK.
The configuration is:
- sdk: nvs 2.6.0
- example Azure IoT hub
Initially, the getaddrinfo() function returns a failure code of -101 when called in the broker_init.
After that, I implemented the DNS resolver, dns_resolve_init(), which changed the return error to -11.
Could you please assist me in resolving this issue?
prj.conf
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
# Enable Sockets support
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
# Enable the DNS resolver
CONFIG_DNS_RESOLVER=y
# Enable additional buffers
CONFIG_DNS_RESOLVER_ADDITIONAL_BUF_CTR=5
# Enable additional queries
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES=2
# Enable mDNS support
CONFIG_MDNS_RESOLVER=y
# Enable LLMNR support
CONFIG_LLMNR_RESOLVER=n
CONFIG_DNS_RESOLVER_MAX_SERVERS=1
Terminal
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.014,862] <inf> wifi_nrf_bus: SPIM spi@a000: freq = 8 MHz
[00:00:00.014,923] <inf> wifi_nrf_bus: SPIM spi@a000: latency = 0
*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:30.272,857] <inf> main: Azure IoT Hub sample started
[00:00:30.272,857] <inf> main: Bringing network interface up and connecting to the network
[00:00:31.832,885] <inf> wifi_mgmt_ext: Connection requested
[00:00:36.031,585] <inf> main: Network connectivity established and IP address assigned
[00:00:36.032,226] <inf> main: Connected to network
[00:00:36.032,257] <inf> main: Device ID: device-02
[00:00:36.032,287] <inf> main: Starting DPS
[00:00:36.032,623] <inf> main: DPS registration status: AZURE_IOT_HUB_DPS_REG_STATUS_NOT_STARTED
[00:00:36.032,836] <err> mqtt_helper: getaddrinfo() failed, error -11
[00:00:36.032,867] <err> azure_iot_hub_dps: mqtt_helper_connect failed, error: 11
[00:00:36.032,867] <err> main: DPS failed to start, error: 11
[00:00:36.032,867] <err> main: Failed to run DPS, error: 11, terminating connection attempt