You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the original functions are still in the SDK header. Since the lwip1 code is removed, this is just a linking error for the existing programs pre 3.0.0 that use any of wifi_softap_..._dhcps_... funcs
boolwifi_softap_add_dhcps_lease(uint8*macaddr); // add static lease on the list, this will be the next available @
#endif// dhcp server
I'd propose keeping the SDK API, but still have a custom class for an netif when actually warranted (maybe in cases like Ethernet?). This will also remove the need for the WiFi class code to reference the SoftAP DHCPS through an Arduino sketch-like API (...which also means, there will be no need to have headers with carefully placed externs)
#6680 was merged before lwIP-v1 was removed.
So I think these functions from user_interface.h could be safely hidden or removed.
A prerelease of lwIP-2.1.3 is out, changes can happen at that time
Another (possibly minor) note about using objects. We are in C++ environment, and we also may run into an issue of init order when dealing with state inside of certain objects declared across the Core
Basic Infos
Platform
Problem Description
Something noticed while building lwip2 here
Since #6680 (51c2a14#diff-39ab7a280ef46486a19b45c179a5a160a836d57ab164f627ade75cb92ee94d54), old lwip-bundled dhcps was extracted and rewritten into a class
Current example for SoftAP replaced the original calls with the Arduino-API-like global object:
Arduino/libraries/ESP8266WiFi/examples/StaticLease/StaticLease.ino
Lines 74 to 80 in 211606f
And the internal WiFi code is also forced to work through the wrapper:
Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp
Line 247 in 211606f
While the original functions are still in the SDK header. Since the lwip1 code is removed, this is just a linking error for the existing programs pre 3.0.0 that use any of
wifi_softap_..._dhcps_...
funcsArduino/tools/sdk/include/user_interface.h
Lines 385 to 395 in 211606f
I'd propose keeping the SDK API, but still have a custom class for an netif when actually warranted (maybe in cases like Ethernet?). This will also remove the need for the WiFi class code to reference the SoftAP DHCPS through an Arduino sketch-like API (...which also means, there will be no need to have headers with carefully placed externs)
cc @d-a-v
also, there is slightly more up-to-date rtos sdk implementation (which also has english comments)
https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/components/lwip/apps/dhcpserver/dhcpserver.c
but, it is interesting that the esp32 variant of idf does not include any alternative to add/remove reserved mac feature
https://github.com/espressif/esp-idf/blob/master/components/lwip/include/apps/dhcpserver/dhcpserver.h
The text was updated successfully, but these errors were encountered: