Repository navigation
Rediscover the route and retry once on APS_NO_ACK in send_packet - #289
Open
zigpy-review-bot wants to merge 1 commit into
Open
zigpy-review-bot wants to merge 1 commit into
zigpy-review-bot wants to merge 1 commit into
Conversation
A stale next hop can MAC-ACK frames without forwarding them, and Z-Stack reports `APS_NO_ACK` instead of `NWK_NO_ROUTE` in that case, so the route was never repaired.
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.
Summary
Fixes #288. A stale next hop in the coordinator's routing table can keep MAC-ACKing frames without forwarding them, and Z-Stack then reports
APS_NO_ACKrather thanNWK_NO_ROUTE. Since #260,send_packetonly rediscovers a route onNWK_NO_ROUTE(#273) and afterMAC_TRANSACTION_EXPIRED, so the route is never repaired and downlink to the device stays dead until a restart.Changes
send_packetnow treatsAPS_NO_ACKlikeNWK_NO_ROUTEfor a unicast to a known device: it calls_discover_routeand retries once. A second failure is raised as aDeliveryErroras before.MAC_TRANSACTION_EXPIREDassociation recovery is untouched.Open items
send_packetcall, on top of zigpy's own request retries.APS_NO_ACKcan also mean the frame arrived and only the APS ack was lost, so the retry can repeat a non-idempotent command. This matches the behaviour before Zigpy application-level retries #260, whenAPS_NO_ACKwas a routing error.Testing
The full suite passes (397 tests) with zigpy 1.5.0. With zigpy 2.4.1 installed, the suite already fails on
dev(138 failures, for exampleAF.DataRequestExtanswered withCommandNotRecognized); that is unrelated to this change. Not tested on hardware.