HiveMQ using ESP32 and NODERED

2 thing i would check

1- IS the SIM card providing internet acces

2- IS there anyfirewall or restriction applied by the provider (ex port 8883)

Hello @paragdrring ,

I agree with @Mike - it sounds like the configuration for the client connection is valid, based on the success when connecting via WiFi, but there may be a communication breakdown when attempting access via SIM. I would also like to verify the error message that is being prompted when failing to connect via SIM.

Best,
Aaron from HiveMQ Team

Yes sure, I will provide the error code shortly.

Answering Mikes question:

  1. SIM has internet access. It is Vodafone IOT SIM and is whitelisted. We have built a sample web client and using phone with this SIM with data turned on, it is able to connect to WS port.
  2. Provider we are connecting is sample hive mq cloud instance, so not sure. Because from my regular python client, I am able to connect using 8883.

Please help!

im sure the answer is yes but double checking…

when you connect with your Python script the host is connected to the SIM card aswell correct ?

also how do you provide WIFI to the ESP32 ? router? HotSpot?

python script is running on wifi.
we connected paho js library using SIM.
for ESP32 - we tried both using router and hotspot, and it works using WiFi

ok ok ok i start to get a better picture of the setup

The ESP32 is connected in which way to the SIM card ?

Il take some guess and tell me if they could fix your issues. I assume that :
A you are using an ESP32 devkit.
B you are trying to connect the ESP32 using a sim external module.
C there is not much physical restriction.

1- Swap your data plan to a TTGO T-Call ESP32. The external SIM card can be djanky
2- If you are able to. Buy a used phone that is compatible with your SIM card and include it on your montage as a SERVER you can install Debian on the phone.

If you want to use the tools and equipement you currently have in hand please provide

1- Flow Schematic of the data with the model number of every component in the connection chain
2- The error you get when the ESP32 try to connect to the SIM card

Man, I tried many sketches with HiveMQ and this is the first one working - thank you!

1 Like

you are more than welcome my friend !