Hi,
I’m working on a proof of concept at present that requires some simple feature extraction from an image captured with a Lepton sensor, and the key params of the features periodically returned from the camera to our core systems via MQTT, in this case through the Amazon AWS-IOT-Core MQTT broker.
We have the image capture and feature extraction running well on an H7 with the Lepton Breakout, and also have a Wifi Shield providing connectivity,
Additionally, on another platform, we have also successfully proven the MQTT configuration and functionality.
Unfortunately, we have hit a stumbling block in getting the H7 to make a successful MQTT connection to the AWS broker.
As the Amazon connection requires SSL / TLS the H7 has been updated to firmware 3.5.0 and the Wifi Shield to winc_19_6_1
Our code runs ok, connects to the wifi but then generates the exception below when trying to make the MQTT connection,
mbedtls_ssl_handshake error: -9
Traceback (most recent call last):
File “”, line 48, in
File “mqtt.py”, line 54, in connect
OSError: [Errno 5] EIO
The MQTT connection code which is pretty much verbatim from other Micropython AWS MQTT examples is as below :
KEY_PATH = "TestThing.private.key"
CERT_PATH = "TestThing.cert.pem"
with open(KEY_PATH, 'r') as f:
key1 = f.read()
with open(CERT_PATH, 'r') as f:
cert1 = f.read()
client = MQTTClient(client_id="basicPubSub",
server="a2708s3n9i3daw-ats.iot.eu-west-1.amazonaws.com",
port=8883,
keepalive=4000,
ssl=True,
ssl_params={ "key":key1, "cert":cert1, "server_side":False })
client.connect()
I’ve already burnt a fair amount of time trying to get to the bottom of it, so thought I’d check if its an issue anyone else has any experience of before I get stuck in for round 2 tomorrow
Thanks
Steve