I have been trying to integrate the sim800l module with the public HiveMq broker. I first tried using wifi to establish an MQTT connection, I looked up the startup guide on the HiveMq website and the sample code provided for Arduino worked like a charm. Now I am trying to connect to the server to send data using the sim800l module and it just won’t work no matter what I do.
Error According to Arduino:
Attempting MQTT connection…
Failed, rc=-2
Try again in 5 seconds…
I know that HiveMq requires both SSL/TLS and SNI is required but I’m only trying to connect to the public broker and that doesn’t require all these certifications as far as I’m aware. I have looked up other topics similar to this on this forum but unfortunately, it hasn’t helped me.
Can someone please guide me or provide a sample code that works for sim800l + Esp8266 to connect to the HiveMq broker?