NodeMCU (ESP8266) is not able to connect to MQTT broker runn
Posted: Tue Jan 07, 2020 9:55 pm
I'm trying to connect NodeMCU with a local MQTT broker running on my raspi. The wifi access is provided by an access point (AP) created by same raspi. The nodemcu is able to connect to the access point but NOT able to connect to MQTT broker.
I know for sure that my local MQTT broker is working fine as one of the four nodemcu is able to connect to it successfully.
Also, I know for sure that my nodemcu is also working fine as the same device is working fine if the wifi access is provided by my home router and the MQTT broker is running on raspi.
BUT, if I'm using the raspi access point for wifi access and test.mosquitto.org as MQTT broker, then also the device is NOT able to connect to MQTT broker.
I don't know what is going wrong. Whether the problem is with access point or it's not possible to connect to MQTT broker running on the same raspi as the one who created the access point. I'm completely stuck. Any help is appreciated.
PS: All the nodemcu I tried had different client id.
I know for sure that my local MQTT broker is working fine as one of the four nodemcu is able to connect to it successfully.
Also, I know for sure that my nodemcu is also working fine as the same device is working fine if the wifi access is provided by my home router and the MQTT broker is running on raspi.
BUT, if I'm using the raspi access point for wifi access and test.mosquitto.org as MQTT broker, then also the device is NOT able to connect to MQTT broker.
I don't know what is going wrong. Whether the problem is with access point or it's not possible to connect to MQTT broker running on the same raspi as the one who created the access point. I'm completely stuck. Any help is appreciated.
PS: All the nodemcu I tried had different client id.