Conversation
morselib defaults the station re-scan interval to a 512s limit with an exponential backoff, so after a few failed attempts a station that has lost its AP re-scans only every several minutes. Set base 2s / limit 10s so a transient loss recovers within seconds instead of minutes. Signed-off-by: kwagyeman <5694981+kwagyeman@users.noreply.github.com>
The scan morselib runs internally when connecting is serviced from the network poll, which otherwise pumps the driver continuously. On a board that radiates a scan-time spur into its own receiver, that steady SPI-bus activity adds switching noise across the band, masks the beacon being scanned for, and association takes many sweeps to catch it. Between real events -- serviced at once whenever the transceiver asserts its IRQ line -- hold the bus quiet, pumping only at a bounded floor so the scan still advances. Confined to the JOIN scan, so the data path and the IRQ-driven association handshake are untouched. On the AE3 this brings the median association time on the affected channel from 3.5s to 2.3s, matching a clear channel, with no change on a clear channel or in throughput. Signed-off-by: kwagyeman <5694981+kwagyeman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits, both making STA association robust when a scan misses the beacon.
1. Cap the STA re-scan backoff
2s/10sinstead of the2s/512sdefault, so a station that loses its APreconnects in seconds instead of minutes.
2. Hold the SPI bus quiet during the connect scan
On a board that radiates a scan-time spur into its own receiver (OpenMV AE3,
near 921.5 MHz), the continuous SPI polling done between events adds switching
noise that masks the beacon being scanned for, so association takes many sweeps.
This holds the bus quiet between real events during the JOIN scan, servicing the
transceiver at once whenever it asserts IRQ and pumping only at a bounded floor
otherwise. Gated to the JOIN scan, so the data path and the IRQ-driven
association handshake are untouched. Knob is
MM_HALOW_SCAN_QUIET_MS, default 3.Bench results
AE3, AP parked on the affected channel, 12 associations per run:
aftermedian matches a clear channel; the worst-case tail is roughly halved.MM_HALOW_SCAN_QUIET_MS1 to 6: 1 to 4 all pin the median at theclear-channel floor, 5 to 6 overshoot and degrade.