Hi,
I'm trying to run `ncs/v2.6.1/nrf/samples/net/azure_iot_hub` sample with `native_sim` board:
1. certificates are configured (compiled in)
2. `zeth` interface is running
3. application fails to connect, `mqtt_connect, error: -22`
The certificates should be valid, using `DigiCert Global Root G2`
*** Booting nRF Connect SDK v3.5.99-ncs1-1 *** [00:00:00.000,000] <inf> net_config: Initializing network [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1 [00:00:00.000,000] <inf> azure_iot_hub_sample: Azure IoT Hub sample started [00:00:00.000,000] <inf> azure_iot_hub_sample: Bringing network interface up and connecting to the network [00:00:00.000,000] <inf> azure_iot_hub_sample: Device ID: TEST_DEVICE_007 [00:00:00.000,000] <inf> azure_iot_hub_sample: Network connectivity established and IP address assigned [00:00:00.000,000] <inf> azure_iot_hub_sample: Connected to network [00:00:00.000,000] <inf> azure_iot_hub_sample: Starting DPS [00:00:00.000,000] <dbg> azure_iot_hub_dps: dps_reg_id_set: Setting DPS registration ID: TEST_DEVICE_007 [00:00:00.000,000] <dbg> azure_iot_hub_dps: dps_id_scope_set: No ID scope provided, using ID scope from Kconfig: <DPS_ID_RED> [00:00:00.000,000] <dbg> azure_iot_hub_dps: dps_id_scope_set: Setting DPS ID scope: <DPS_ID_RED> [00:00:00.000,000] <dbg> azure_iot_hub_dps: dps_on_settings_loaded: Settings fully loaded [00:00:00.000,000] <dbg> azure_iot_hub_dps: dps_state_set: State transition: DPS_STATE_UNINIT --> DPS_STATE_DISCONNECTED [00:00:00.000,000] <inf> azure_iot_hub_sample: DPS registration status: AZURE_IOT_HUB_DPS_REG_STATUS_NOT_STARTED [00:00:00.000,000] <dbg> azure_iot_hub_dps: provisioning_client_init: Client ID (size: 21): TEST_DEVICE_007 [00:00:00.000,000] <dbg> azure_iot_hub_dps: provisioning_client_init: User name (size: 70): <DPS_ID_RED>/registrations/TEST_DEVICE_007/api-version=2019-03-31 [00:00:00.000,000] <dbg> mqtt_helper: mqtt_state_set: State transition: MQTT_STATE_UNINIT --> MQTT_STATE_DISCONNECTED [00:00:00.000,000] <dbg> mqtt_helper: broker_init: Resolving IP address for global.azure-devices-provisioning.net DBG_PRINTF: [ncs/v2.6.1/zephyr/subsys/net/lib/mqtt/mqtt_transport_socket_tls.c:117]: mqtt_client_tls_connect err: -1 [00:00:00.000,000] <dbg> mqtt_helper: mqtt_helper_poll_loop: Waiting for connection_poll_sem [00:00:00.720,000] <dbg> mqtt_helper: broker_init: IPv4 Address found 20.50.65.141 (AF_INET) [00:00:00.720,000] <dbg> mqtt_helper: mqtt_state_set: State transition: MQTT_STATE_DISCONNECTED --> MQTT_STATE_TRANSPORT_CONNECTING [00:00:00.720,000] <dbg> net_mqtt_sock_tls: mqtt_client_tls_connect: (0x80c4300): Created socket 0 [00:00:00.780,000] <err> mqtt_helper: mqtt_connect, error: -22 [00:00:00.780,000] <dbg> mqtt_helper: mqtt_state_set: State transition: MQTT_STATE_TRANSPORT_CONNECTING --> MQTT_STATE_DISCONNECTED [00:00:00.780,000] <err> azure_iot_hub_dps: mqtt_helper_connect failed, error: -22 [00:00:00.780,000] <err> azure_iot_hub_sample: DPS failed to start, error: -22 [00:00:00.780,000] <err> azure_iot_hub_sample: Failed to run DPS, error: -22, terminating connection attempt
Log `*_RED` fields are edited.
Is there any way to debug this to understand where the problem might be?
Any help is appreciated. Regards.