Repository navigation
Fix a bug where the espnow peer list gets out of sync with the maintained PeerListClass. - #20
Merged
Merged
Conversation
Contributor
Author
|
Pinging @gmag11 @blazoncek Any word on this? Do you want something changed about it? |
Contributor
|
I don't use peer list. I only use broadcasts. |
gmag11
approved these changes
Sep 24, 2025
gmag11
left a comment
Owner
There was a problem hiding this comment.
Thank you @blakethepatton. It makes sense.
3 of 4 tasks
oe1wkl
added a commit
to oe1wkl/Morserino-32
that referenced
this pull request
May 22, 2026
The released QuickEspNow 0.8.1 has two problems that bite when ESP-NOW is
brought up and down repeatedly (as the M32 does when alternating between
WiFi Trx and ESP-NOW games):
- addPeer() calls ESP_ERROR_CHECK(esp_now_get_peer(...)) on a peer that
its own peer_list still tracks but esp_now_deinit() already removed,
so the second ESP-NOW session abort()s. This is why entering a game
after a WiFi session currently forces a memory-clearing reboot.
- stop() never frees the tx/rx queues it created, leaking a few KB per
cycle.
The crash is already fixed on upstream main (PR gmag11/QuickESPNow#20,
addPeer self-heals a stale peer) but unreleased. The leak fix is our
PR gmag11/QuickESPNow#25. Pin lib_deps to our fork at the commit that
carries both until upstream publishes a release containing them.
No source/behaviour change here — the rebootIfWifiAlreadyUsed() guards
stay in place for now; removing them is a separate, hardware-validated
follow-up. Builds clean on pocketwroom and heltec_wifi_lora_32_V2.
Co-authored-by: Claude Opus 4.7 <[email protected]>
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.
Fixes an issue with stopping and starting quickespnow.
I suspect it's mentioned here: #19 (comment)
Personally, I'm experiencing an issue where when you stop espnow in order to enter light sleep and then resume espnow after waking back up, when you attempt to send a message to a peer that you've talked to before, an exception is thrown and the system reboots.
I think it'd be more beneficial to remove all peers with a call to quickespnow stop, however with message encryption perhaps that would throw a wrench into things.