How would the esp know that it's already been assigned given that you have set a static IP on it?
Goto your router and set some reserved addresses - I've told my router to not use 192.168.0.1 (the router) to 192.168.0.10 and if I want a static IP I assign one in this range.
Alternatively have an IP dynamically assigned, from my limited experience with the esp8266 (about a week), the default way of doing it. If this is then a problem cos you don't know the IP address use mDNS services to set a name like esp8266.local to talk to it.
AndyMH:
How would the esp know that it's already been assigned given that you have set a static IP on it?
Goto your router and set some reserved addresses - I've told my router to not use 192.168.0.1 (the router) to 192.168.0.10 and if I want a static IP I assign one in this range.
Alternatively have an IP dynamically assigned, from my limited experience with the esp8266 (about a week), the default way of doing it. If this is then a problem cos you don't know the IP address use mDNS services to set a name like esp8266.local to talk to it.
Q:How would the esp know that it's already been assigned given that you have set a static IP on it?
A: I dont know. Maybe gives "IP CONFLICT" error.
Q:Goto your router and set some reserved addresses - I've told my router to not use 192.168.0.1 (the router) to 192.168.0.10 and if I want a static IP I assign one in this range.
A: I dont want to say to customer "Setup your modem, give me ip range".
Q:Alternatively have an IP dynamically assigned, from my limited experience with the esp8266 (about a week), the default way of doing it. If this is then a problem cos you don't know the IP address use mDNS services to set a name like esp8266.local to talk to it.
A: I saw mDNS. Can i use the multiple esp8266 in same network with MDNS?
If you go for a static IP go for a high one, e.g. 192.168.0.200 - much less chance of the router assigning an IP this high.
yes you should be able to have multiple 8266's on the network, just give each one a different name. As a newbie, found mDNS very easy to set up:
library
#include <ESP8266mDNS.h>
global constant
const String intname = "esp8266e"; //internet access will be http://esp8266e.local
in setup()
if (!MDNS.begin(intname.c_str())) {
  //note use of c_str() to get type right using a string to hold intname
  while (1) { }
   //This is an infinite loop which will run till a break statement is issued
   //explicitly. Interestingly not while(1) but any integer which is non-zero
MDNS.addService("http", "tcp", 80); //setup a listening port
Somewhere in loop()
MDNS.update();
I've got mine setup with a dynamic IP address, but mDNS so it is easy to get to.
AndyMH:
Didn't realise there was a customer involved
If you go for a static IP go for a high one, e.g. 192.168.0.200 - much less chance of the router assigning an IP this high.
yes you should be able to have multiple 8266's on the network, just give each one a different name. As a newbie, found mDNS very easy to set up:
library
#include <ESP8266mDNS.h>
global constant
const String intname = "esp8266e"; //internet access will be http://esp8266e.local
in setup()
if (!MDNS.begin(intname.c_str())) {
//note use of c_str() to get type right using a string to hold intname
while (1) { }
//This is an infinite loop which will run till a break statement is issued
//explicitly. Interestingly not while(1) but any integer which is non-zero
MDNS.addService("http", "tcp", 80); //setup a listening port
Somewhere in loop()
MDNS.update();
I've got mine setup with a dynamic IP address, but mDNS so it is easy to get to.
My tablet application is android. But MDNS not support for android