-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WiFi: ARP gratuitous API for wifi station mode #6889
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
Conversation
Just looking at the code and I think this is probably not optimal to use. bool ESP8266WiFiSTAClass::stationKeepAliveEnabled ()
{
return _keepStationAliveUs != 0;
}
void ESP8266WiFiSTAClass::stationKeepAliveStop ()
{
_keepStationAliveUs = -1;
// will be set to 0 at recurrent call
}
bool ESP8266WiFiSTAClass::stationKeepAliveSetupMs (int ms)
{
if (_keepStationAliveUs != 0 || ms <= 0)
return false;
[...] So on other words, you can only change the value by calling stop and then wait for the next scheduled interval before you can even set a new value. Also I do miss to send (or restart the scheduler) when a wifi connection to the AP is established. |
@TD-er please review the API change |
@TD-er the API has changed, based on your use case. Setting the interval will:
|
Novice question, is there a simple way I can test this branch in platformio? |
If you are using git for this repository in your platformIO setup, then yes. |
Sorry for replying sooo late. We had no equipment until now to reproduce the issue (of not beeing reachable via http after a while) in our wifi setups. Since a few days i have a OpenWRT AP which has this issue... It would be great if you merge this PR that all users can benefit from this option to solve issues |
I confirm this feature is useful with some wifi routers. I ported this feature in Tasmota, and it would be great for it to be integrated natively in Arduino Core. Some other projects might benefit from it. |
ticker: +comment gratuitous: use attach_ms_scheduled_accurate
Per internal review comment:
|
@ivankravets @platformio I need help with this issue: Following change does not help (because in that case arduino does not compile
This |
Moving |
Hi @d-a-v ! Looks like these changes are going to affect a lot of PlatformIO users since
|
What about just leaving the |
@valeros good idea but as @s-hadinger says, it may include Ticker for nothing if gratuitous is not used (unless it is moved in a separate directory ?). |
Based on multiple reports and examples
fixes #6886
fixes #5998 (together with #6484, hopefully)