Closed
Description
Basic Infos
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have searched the issue tracker for a similar issue.
Feature Description
I think it would be usefull to have option of DHCP IP address reservations. One could make sure client (one or more of them) uses strict IP address without setting up static address on the clients themselves. This would require knowledge of devices MAC address, which shouldn't be very hard even if it is not printed on device itself - just connect to example sketch like here
[MCVE] - how it might look like
#include <Arduino.h>
#include <ESP8266WiFi.h>
const char* ssid = "wifi_ssid";
const char* password = "wifi_pass";
IPAddress staticIP(10,0,3,1);
IPAddress gateway(10,0,3,1);
IPAddress subnet(255,255,255,0);
// set up of our reserved client
uint8_t importantClientMAC[6] = [0x5e, 0xcf, 0x7f, 0x8b, 0x10, 0x13];
IPAddress importantClientIP(10,0,3,14);
void setup() {
Serial.begin(115200);
WiFi.softAPConfig(staticIP, gateway, subnet);
// an example of how it might work
WiFi.addReservedIP(importantClientMAC , importantClientIP);
WiFi.softAP(ssid, pass);
}
void loop() {
}
This has many use cases - for example when your IoT device does not support static IP address setup and you want to be able to connect to it without fiddling around (just set it up to automatically connect to ESP AP)
Metadata
Metadata
Assignees
Labels
No labels