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.