Skip to content
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

isSleeping() ARP Check Addition and ffMonitor() Updates For Client Broadcasts #660

Closed
wants to merge 4 commits into from

Conversation

pmaag
Copy link
Contributor

@pmaag pmaag commented Aug 29, 2017

Fixes for issue #631

isSleeping() has been updated to check the PI's ARP table to help determine if a client is sleeping or awake. This should help clients that inconsistently reply to ICMP ping requests.

ffMonitor() has been re-activated and modified to update a client's state when the client sends a Foreflight heartbeat packet to broadcast.

Logging messages have been added to help troubleshooting. These messages are controlled via the Verbose Message Logging toggle within the GUI.

Updated isSleeping to check the Pi's ARP table for a client's MAC address.  If a client's MAC address is present in the ARP table *and* the client has responded to an ICMP ping request in the past 30 seconds, the client is marked as not sleeping.

Additionally, added logging statements to record when a client transitions from awake to sleep.
Updated the ffMonitor function to look for "i-can-play-ffm-udp" and "i-cannot-play-ffm-udp" from a client.  If either of those broadcast packets are received, we mark the client as awake.

This will help with older iOS hardware not responding via ICMP when their CPU gets busy.  iOS appears to stop replying to ICMP with high CPU, however packet captures have shown that the ForeFlight heartbeat broadcast packets are still sent during the high CPU times.
Updated the ffMonitor function to look for "i-can-play-ffm-udp" and "i-want-to-play-ffm-udp" from a client.  If either of those broadcast packets are received, we mark the client as awake.

This will help with older iOS hardware not responding via ICMP when their CPU gets busy.  iOS appears to stop replying to ICMP with high CPU, however packet captures have shown that the ForeFlight heartbeat broadcast packets are still sent during the high CPU times.
@Ergonomicmike
Copy link

Will this affect the client sleep stuff?

@pmaag
Copy link
Contributor Author

pmaag commented Sep 5, 2017

@Ergonomicmike - I do not believe there will be any difference in behavior between this change and the existing code for sleeping clients. Definitely would appreciate a peer review/testing confirmation of that though.

@pmaag
Copy link
Contributor Author

pmaag commented Sep 17, 2017

Just a heads-up, flew about 10 hours these past few weeks and the ADS-B Disconnected messages are still occurring even with this patch, however much less frequently. I would say I have gotten 3 messages in the past 10 flying hours. I have not had time to pull the logs, but will do so and report back.

@cyoung
Copy link
Owner

cyoung commented Sep 22, 2017

I wonder how this will do on iOS 11?

@cyoung cyoung mentioned this pull request Oct 12, 2017
3 tasks
@pmaag pmaag closed this Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants