I have been trying to connect my ESP 8266 to an MQTT server on my local network. My current test setup consists of my Laptop, which is running Mosquitto and the ESP8266. The example I run used to give me connection failed rc=2 errors when I was still using a WiFi Mesh.
Since I've recently had some other issues with my home wifi, it has been reconfigured multiple times. One of the things we tried is splitting the 2.4 and 5 GHz networks into separate networks. When we did that, I was able to run Mosquitto on my laptop and connect to the Broker from the ESP. I don't know, what network my laptop was connected to in that setup, but I would assume that it was the 5GHz.
We recently moved to an Orbi System, where I don't have that option, so I'm back to receiving rc=2. In this setup, my Laptop is connected to 5 GHz and the ESP is connected to that same network using 2.4 GHz.
When I look at the output in the broker, the two seem to be seeing each other, but a connection cannot be established. Here's the message I get in Mosquitto for each try to connect:
1546016031: Socket error on client <unknown>, disconnecting.
1546016031: New connection from 192.168.2.39 on port 1883.Is there a possibility to get the two to talk to each other? I really can't have my network split in two.
The program I am using is the relay with button from this post:https://www.esp8266.com/viewtopic.php?t=8746
Your help is appreciated.