HIVEMQ conection with m5stack core2

Hi, i´m working with m5stack core 2 device and i can connect with the hivemq public server but not with my private cluster. Do someone know if the ssl certificates are the problem? I´ll send the images too for having a better idea.

Hello Javier Sanchez,

First, please make sure that port 8883 is not blocked. We suggest using MQTT CLI client. Command line:

mqtt sub -t # -h 18b93f452b8445ba86ac0ec6d2228eb9.s2.eu.hivemq.cloud -p 8883 -u HiveUser1 -pw HiveUser1 -s -J -d

Make sure to use option -d to capture the debug output. Option -s forces the client to use default SSL configuration.

Kind regards,
Dasha from HiveMQ Team

Hi Daria

I have tried to connect the port 8883 with mosquitto client and I can connect it without problems using the guide from HiveMQ, so I guess the port is not blocked.

Thanks
Javier

Hi Javier,

Once you are sure that the port is open, next, please inspect the error message that your client shows (upon unsuccessful connection attempt). What does the error message say?

Thanks,
Dasha from HiveMQ Team

Hi guys, I’m having the same problem atm.
Can’t connect to the cluster with my M5Stack devices, but with MQTT.fx it works.
I tried it with and without SSL and also inserted the isrgrootx1.pem as the certFile.
Nothing works and my project needs to be done in 2 weeks :confused:

I really hope someone can help me!
Thx in advance! :slight_smile:

Hello @Kulle269 ,

Thank you for the outreach and interest in HiveMQ!

First, I’d like to confirm - this cluster is a cloud cluster, correct?

As per what Dasha had posted previously, first we need to verify that port 8883 is open, which it sounds like may have been done already with the MQTT.fx connection test. Beyond that, we’d like to see the specific error that is being presented on the failed connection attempt.

What message is being presented on the failed connection attempt?

Best,
Aaron from HiveMQ Team

Thank you for your fast answer!
Yes, it’s a cloud cluster and port 8883 is open. Tbh I don’t know if I can see an error message on the M5Stack devices, as I don’t have a connection log.
I just tried to connect to the mosquitto test server with port 1884 and it works. So my guess is the SSL config is not right. Do I need a keyFile and or certFile on the client side?

Hello @Kulle269 ,

If the device does require a server CA file, the root certificate can be obtained here . This can be used as the server certificate.

Some more information regarding certificates is available in this thread.

Best,
Aaron from HiveMQ Team