I am currently involved with a project in which we use an ESP32 device to service a mesh of BLE devices, and I have discovered a bug I don't know how to fix. The bug in question involves the central node device. This device starts a BLE Client and services the mesh. Once collected in JSON format, the data is then to be sent over to AWS.
This is where my issue starts. I cannot connect the MQTT bridge to AWS in the loop. When I try I get the following message: E (56089) aws_iot: failed! mbedtls_ssl_handshake returned -0x4d80
E (56093) AWS_IOT: Error(-4) connecting to a3twuhzs2qbepq-ats.iot.us-east.2.amazonaws.com:8883,
Trying to reconnect
E (57385) aws_iot: failed! mbedtls_ssl_handshake returned -0x10
E (57388) AWS_IOT: Error(-4) connecting to a3twuhzs2qbepq-ats.iot.us-east-2.amazonaws.com:8883,
Trying to reconnect
Please note that the BLE service has been switched off after the mesh has been serviced. This is required else the ESP32 core crashes. Also, note that I have had to repartition the ESP32 device due to the size of the program. I am currently using the Huge_App.csv partition scheme.
Also, note that I did copy and run the same code in the setup to send a test package and all goes well. I also tested the repartition settings by using all available partition schemes — no change in result.
Hi,
I am currently involved with a project in which we use an ESP32 device to service a mesh of BLE devices, and I have discovered a bug I don't know how to fix. The bug in question involves the central node device. This device starts a BLE Client and services the mesh. Once collected in JSON format, the data is then to be sent over to AWS.
This is where my issue starts. I cannot connect the MQTT bridge to AWS in the loop. When I try I get the following message: E (56089) aws_iot: failed! mbedtls_ssl_handshake returned -0x4d80 E (56093) AWS_IOT: Error(-4) connecting to a3twuhzs2qbepq-ats.iot.us-east.2.amazonaws.com:8883, Trying to reconnect E (57385) aws_iot: failed! mbedtls_ssl_handshake returned -0x10 E (57388) AWS_IOT: Error(-4) connecting to a3twuhzs2qbepq-ats.iot.us-east-2.amazonaws.com:8883, Trying to reconnect
Please note that the BLE service has been switched off after the mesh has been serviced. This is required else the ESP32 core crashes. Also, note that I have had to repartition the ESP32 device due to the size of the program. I am currently using the Huge_App.csv partition scheme.
Also, note that I did copy and run the same code in the setup to send a test package and all goes well. I also tested the repartition settings by using all available partition schemes — no change in result.
Here is the code I used to test with:
Please let me know if anyone manages to fix this bug. Thanks.