Multiple esp8266 on same network - connection issues?
Posted: Fri Dec 25, 2015 10:11 am
Hello! Merry xmas! Happy Holidays! etc!
I just gave my family their "Mitchine" boxes, which are, as far as I know, working beautifully at this point (thanks in large part to this forum). But, one thing that I never tested (but knew MIGHT be an issue, hopefully solveable!) is connecting multiple esp8266 to the same network.
Currently, at the moment, it seems that one box connected to the network works beautifully. No problem. But when I connect a second box, only one of the boxes seems to work.
That's the relevant code for connecting to the network, in theory the box should be using DHCP though so only the first bit of code runs (and the ssid/password are correct - again the boxes connect just fine by themselves!).
Any ideas what might be causing this?
Also, FYI, the full code is available here: https://github.com/develpr/mitchine
Thank you for any tips!
I just gave my family their "Mitchine" boxes, which are, as far as I know, working beautifully at this point (thanks in large part to this forum). But, one thing that I never tested (but knew MIGHT be an issue, hopefully solveable!) is connecting multiple esp8266 to the same network.
Currently, at the moment, it seems that one box connected to the network works beautifully. No problem. But when I connect a second box, only one of the boxes seems to work.
Code: Select all
void ConfigureWifi()
{
Serial.println("Configuring Wifi");
WiFi.begin (config.ssid.c_str(), config.password.c_str());
if (!config.dhcp)
{
WiFi.config(IPAddress(config.IP[0],config.IP[1],config.IP[2],config.IP[3] ), IPAddress(config.Gateway[0],config.Gateway[1],config.Gateway[2],config.Gateway[3] ) , IPAddress(config.Netmask[0],config.Netmask[1],config.Netmask[2],config.Netmask[3] ));
}
}
That's the relevant code for connecting to the network, in theory the box should be using DHCP though so only the first bit of code runs (and the ssid/password are correct - again the boxes connect just fine by themselves!).
Any ideas what might be causing this?
Also, FYI, the full code is available here: https://github.com/develpr/mitchine
Thank you for any tips!