Closed
Description
Seems there is no function to change AP IP configuration, currently setting IP/GW/Subnet works only for Station.
I have modified ESP8266Wifi.cpp/.h to add the missing function and it works so far, it would be good to add it I think.
void ESP8266WiFiClass::configAP(IPAddress local_ip, IPAddress gateway, IPAddress subnet)
{
struct ip_info info;
info.ip.addr = static_cast<uint32_t>(local_ip);
info.gw.addr = static_cast<uint32_t>(gateway);
info.netmask.addr = static_cast<uint32_t>(subnet);
wifi_softap_dhcps_stop();
wifi_set_ip_info(SOFTAP_IF, &info);
wifi_softap_dhcps_start();
}
Metadata
Metadata
Assignees
Labels
No labels