exclude iprange from dhcp

Sprokkie
Posts: 1
Joined: Sun Oct 28, 2018 1:35 pm

exclude iprange from dhcp

Postby Sprokkie » Sun Oct 28, 2018 1:46 pm

Hi,

i have the dhcp server working, works really fine.
The problem i have now is that the dhcp server works on first come first service base.
that means that the ip addresses from different divices change al the time.

The solution would be to hav static ip adresses for other devices and exclude them from the addresspool that the dhcp is using.
Does any one know how to program that ?

this is the code snipper for the accespoint:

Serial.begin(115200);
Serial.println("Configuring access point...");

WiFi.mode(WIFI_AP);
WiFi.softAP(ssid, password);
Serial.println("Wait 100 ms for AP_START...");
delay(100);


Serial.println("Set softAPConfig");
IPAddress Ip(192, 168, 1, 1);
IPAddress NMask(255, 255, 255, 0);
WiFi.softAPConfig(Ip, Ip, NMask);

IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);

Who is online

Users browsing this forum: No registered users and 69 guests