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
airbase: fix beacon interval timing #2177
base: master
Are you sure you want to change the base?
Conversation
5546137
to
f546358
Compare
Hi, Would you mind rebasing on top of the lastest Thanks! |
Hello! rebased on master. Quickly gave it a test run and it still seems to work. |
I am concerned that big-endian machines will fail. An example is the timestamp; this value is internally CPU native but has been encoded in fixed form dependent on native CPU endianess. |
Do you mean the part like ( Also, it seems to be ok, as its updating the beacon 1 byte at a time so byte ordering shouldn't come into play. |
@Mister-X- Is this PR ready for merge? |
By the way, monotonic clock is still affected by jumps of time, like If I'm understanding correctly we'd have to use the TAI clock to be unaffected, however, that's Linux only. |
Could you also check and fix codestyle? We have a |
5552912
to
b3028d1
Compare
The current implementation had a few problems. * the beacons timing would not scale correctly for multiple ssids. If the time was 100 ms, and 5 ssids were beaconing, each ssid would beacon every 500ms instead of every 100ms. * The beacon timing would drift after some time. * The gettimeofday() is affected by discontinuous jumps in the system time. * the rtc code seemed to over complicate the timing code. Beacon frames are usually 100ms. A timer that takes into account small amounts of jitter should be sufficient for beacon timing. Tested with 50 ssids, on a ARMv7 @ 400mhz and didn't have any problem keeping up. I saw jitter somewhere between 400us-1.5ms
Hmm, I updated the comment about the NTP, perhaps I must have been thinking about monotonic_raw. Also, I don't see any changes with clang 3.8, although I do with clang-format 14 (was already installed in my system). Perhaps I missed something |
Hello. This pull request tries to fix up some of the beacon timing in airbase that I came across. Please let me know if there is anything I need to fixup to be accepted.
The current implementation had a few problems.
the time was 100 ms, and 5 ssids were beaconing, each ssid would beacon
every 500ms instead of every 100ms.
time (NTP adjustments and such).
frames are usually 100ms. A timer that takes into account small
amounts of jitter should be sufficient for beacon timing.
Tested with 50 ssids, on a ARMv7 @ 400mhz and didn't have any problem
keeping up. I saw jitter somewhere between 400us-1.5ms