-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHCPS included in the Core and the old SDK implementation #8307
Comments
#6680 was merged before lwIP-v1 was removed. |
I actually meant to restore them + slightly adjust the additional code introduced by the lib. Or it's a no-go? |
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 https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/C_002b_002b-Attributes.html#index-init_005fpriority-variable-attribute |
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: