esp-aws-iot: Connection with MQTT broker failed
Posted: Wed Jan 24, 2024 11:29 am
idf version: V4.4.2
esp-aws-iot version: release/202210.01-LTS
example: esp-aws-iot/examples/mqtt/tls_mutual_auth
platform: esp32
I use "xx" instead of some sensitive information
I used "openssl s_client -connect xxxxxxxxxxxxxx.iot.us-east-2.amazonaws.com:8883 -CAfile root_cert_auth.crt -cert client.crt -key client.key" Verify that the following configurations are correct:
1. root_cert_auth.crt
2. client.crt
3. client.key
AWS Endpoint Hostname and Client ID are also set correctly.
The ssid and password are also set correctly, and the IP address allocation is normal.
But when ESP32 runs, the error result is as follows:
I (5097) esp_netif_handlers: example_connect: sta ip: xx.xx.xx.xx, mask: xx.xx.xx.0, gw: xx.xx.xx.xx
I (5097) example_connect: Got IPv4 event: Interface "example_connect: sta" address: xx.xx.xx.xx
I (5107) example_connect: Connected to example_connect: sta
I (5107) example_connect: - IPv4 address: xx.xx.xx.xx
I (5117) coreMQTT: Establishing a TLS session to xxxx-ats.iot.us-east-2.amazonaws.com:8883.
W (5137) wifi:<ba-add>idx:1 (ifx:0, xx:xx:xx:xx:xx:xx), tid:3, ssn:0, winSize:64
E (8397) coreMQTT: A single byte was not read from the transport: transportStatus=-1.
E (8397) coreMQTT: CONNACK recv failed with status = MQTTRecvFailed.
E (8407) coreMQTT: MQTT connection failed with status = MQTTRecvFailed.
E (8407) coreMQTT: Connection with MQTT broker failed with status MQTTRecvFailed.
May I ask if anyone has encountered the same problem?
esp-aws-iot version: release/202210.01-LTS
example: esp-aws-iot/examples/mqtt/tls_mutual_auth
platform: esp32
I use "xx" instead of some sensitive information
I used "openssl s_client -connect xxxxxxxxxxxxxx.iot.us-east-2.amazonaws.com:8883 -CAfile root_cert_auth.crt -cert client.crt -key client.key" Verify that the following configurations are correct:
1. root_cert_auth.crt
2. client.crt
3. client.key
AWS Endpoint Hostname and Client ID are also set correctly.
The ssid and password are also set correctly, and the IP address allocation is normal.
But when ESP32 runs, the error result is as follows:
I (5097) esp_netif_handlers: example_connect: sta ip: xx.xx.xx.xx, mask: xx.xx.xx.0, gw: xx.xx.xx.xx
I (5097) example_connect: Got IPv4 event: Interface "example_connect: sta" address: xx.xx.xx.xx
I (5107) example_connect: Connected to example_connect: sta
I (5107) example_connect: - IPv4 address: xx.xx.xx.xx
I (5117) coreMQTT: Establishing a TLS session to xxxx-ats.iot.us-east-2.amazonaws.com:8883.
W (5137) wifi:<ba-add>idx:1 (ifx:0, xx:xx:xx:xx:xx:xx), tid:3, ssn:0, winSize:64
E (8397) coreMQTT: A single byte was not read from the transport: transportStatus=-1.
E (8397) coreMQTT: CONNACK recv failed with status = MQTTRecvFailed.
E (8407) coreMQTT: MQTT connection failed with status = MQTTRecvFailed.
E (8407) coreMQTT: Connection with MQTT broker failed with status MQTTRecvFailed.
May I ask if anyone has encountered the same problem?