OSError -12 while running mqtt demo

I am trying to run the mqtt demo on the OpenMV cam H7 using the given examples and while connecting to the server and sending the message it gives me the following output leading to OSError -12:

Trying to connect… (may take a while)…
Running in Station mode…
[-56, 2, ‘MyWiFi’, ‘f8:f0:05:a3:05:46’, ‘192.168.54.65’]

Traceback (most recent call last):
File “”, line 22, in
File “mqtt.py”, line 77, in connect
OSError: -12

I tried resetting the device using pyb.hard_reset(), but it didn’t work.
I am unable to find any solution for this. What can I do to debug this?

I’ll test it and get back to you.

Hi, it looks like an issue with the broker… This one works:

broker.hivemq.com

Thanks! I will try this out.
I want to publish the mqtt messages over to the cloud using certificates for authentication. Is there a way for the module to connect to the cloud (like aws/google/azure iot)directly without a broker? How can we attach the CA and private certificates for this?

Sorry I’m not an expert in MQTT, can’t help with that.

Thanks for the reply.
I did some digging and found that the ussl module allows for adding certificated and wrapping the connection.
However when I do

import ussl

, I get the error

Import Error: module not found

. Then I open up a serial terminal from the OpenMV IDE and type

 import upip
 upip_install(ussl)

, it says that I dont have upip installed. Could you please let me know of the correct way to install packages using the IDE?
Thanks in advance

I don’t think we have ussl installed on our system. We have flash space for it however. Please create a GitHub bug tracker. We are starting another firmware push now and bug fixes will be brought in.

I think it was just recently supported by the stm32 port (used to be for the Unix port). This will be enabled when we update our MicroPython fork.

Thanks! Looking forward to it.