-
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
IP math #3637
IP math #3637
Conversation
FWIW, Even with this fix, the underlying support for user-supplied DHCP range seems not to work. My ESP8266 SoftAP continues to give my PC an IP address of local PI + 1, not +99 as the default start range attempts. |
Which parameters are you using? |
I'm using the original softAPConfig() interface that provides default <local_subnet>.100 DHCP start address. It does emit the expected ""[APConfig] DHCP IP start" and "[APConfig] DHCP IP end" messages, but still leases <local_subnet>.2 to my PC when I connect. |
And no, it doesn't emit any "[APConfig]" error messages. |
So, IIUC, you get |
Uhm... Found ugly code in tools/sdk/lwip/src/app/dhcpserver.c:wifi_softap_set_dhcps_lease : it always assumes a /24 mask. |
There's a branch with lwip2. Maybe lwip2 behaves better? |
I'm still quite new to git and github... Just basic usage. How can I test with LWIP2 branch? And will it be included in 2.4.0? |
Found another snippet of code in wifi_softap_init_dhcps_lease() that repeats the same check as above. |
Ok, i'll try to find some information about wifi_softap_dhcps_start, and will revert the original commit in the meantime. |
Reverted in eb891cd. |
@NdK73 have you made any progress with this? |
@NdK73 latest git now allows building with lwip2. Can you still pursue this? |
|
Tks for the hint. I'll have a lok asap (currently I'm working on reading ADC from an ISR w/o disabling WiFI... something I'll probably put in another "issue" when ready). |
@NdK73 did you have some time to look at this? |
Not yet, sorry. Currently looking at #4028 that's a showstopper and would speed up considerably the debugging process (OTA is faster than serial...). |
@NdK73 This has a conflict now. |
@d-a-v while the original patch seems to make sense, the current code doesn't even have the broadcast address anywhere in it when I try and resolve the merge conflicts, so there are no changes to apply. If things have been refactored, maybe you should close this as no longer applicable. |
You are right the patch makes sense. |
Sorry for being silent for so long. |
Closing since it seems this portion of the code has been completely redone. The original bug fix was good, but there's no comparable portion anywhere in existing code with the same problem. |
Logical 'not' instead of bit-inversion... Sigh.