AWS embedded C SDK - Cannot connect

0

Hi,

I have an ESP32 board which connects successfully to AWS IoT, publish messages and receives messages from subscribed topics, using Amazon certificates.

I cannot connect using AWS embedded C SDK using same certificates. Any connect using certificates end up this way:

[INFO] [DEMO] [mqtt_demo_mutual_auth.c:584] Establishing a TLS session to XXXXXXXXXXXXXXXXX.iot.eu-west-1.amazonaws.com:8883.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1264] Creating an MQTT connection to XXXXXXXXXXXXXXXXX.iot.eu-west-1.amazonaws.com.
[ERROR] [Transport_OpenSSL_Sockets] [openssl_posix.c:696] Failed to receive data over network: SSL_read failed: ErrorStatus=EVP lib.
..................... (huge numbers of lines like one above)........................................................................................................................................
[ERROR] [Transport_OpenSSL_Sockets] [openssl_posix.c:696] Failed to receive data over network: SSL_read failed: ErrorStatus=EVP lib.
[ERROR] [Transport_OpenSSL_Sockets] [openssl_posix.c:696] Failed to receive data over network: SSL_read failed: ErrorStatus=EVP lib.
[ERROR] [MQTT] [core_mqtt.c:1531] CONNACK recv failed with status = MQTTNoDataAvailable.
[ERROR] [MQTT] [core_mqtt.c:1802] MQTT connection failed with status = MQTTNoDataAvailable.
[ERROR] [SHADOW_DEMO] [shadow_demo_helpers.c:604] Connection with MQTT broker failed with status 7.
[ERROR] [SHADOW] [shadow_demo_main.c:528] Failed to connect to MQTT broker.

Any help is appreciated.

Regards,
Pavel

ptonev
已提问 4 年前825 查看次数
2 回答
0

Hi,

The long stack with thousands of messages like "Failed to receive data over network: SSL_read failed: ErrorStatus=EVP lib." is caused by any inconsistency in AWS IoT Policy. Once it is fixed everything is working fine.

Regards,
Pavel

ptonev
已回答 4 年前
0

Thanks Pavel,

I've just had exactly the same problem and as soon as I attached the policy to the certificate it worked.

Carl

cdp
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则