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

Source routing fixes #626

Merged
merged 8 commits into from
Jul 23, 2024
Merged

Source routing fixes #626

merged 8 commits into from
Jul 23, 2024

Conversation

puddly
Copy link
Contributor

@puddly puddly commented May 28, 2024

Two fixes:

  1. setSourceRoute is a no-op in EZSPv9 and above, the command does nothing. There is currently no known way to send packets with a specific source route in these EZSP versions. Maybe emberOverrideAppendSourceRouteHandler can help if we create a custom XNCP command to maintain a temporary table of source routes per NWK address?
  2. According to Silicon Labs, IEEE address discovery broadcasts are their solution to the missing source route problem. The coordinator will use them in place of normal routing commands to discover routes to a specific device if the NCP isn't aware of a source route to it. Enabling normal route discovery will actually cause issues with routers, as they will flip between source routing and normal routing when receiving these packets.

CC @TheJulianJES

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.16%. Comparing base (8eb257d) to head (2bc218e).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #626      +/-   ##
==========================================
+ Coverage   99.13%   99.16%   +0.02%     
==========================================
  Files          50       50              
  Lines        3456     3459       +3     
==========================================
+ Hits         3426     3430       +4     
+ Misses         30       29       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheJulianJES
Copy link
Contributor

Applied this fix on my production setup. Unfortunately, I'm still seeing "missing routes" when testing 7 minutes after rebooting HA (just unable to toggle certain lights). I'll do more testing later.

@dmulcahey
Copy link
Contributor

I have a branch somewhere where I was trying to manually send a MTOR request right after startup. Wonder if that is worth exploring more.

@dmulcahey
Copy link
Contributor

I have a branch somewhere where I was trying to manually send a MTOR request right after startup. Wonder if that is worth exploring more.

dev...dmulcahey:bellows:dm/refresh-routes

dev...dmulcahey:bellows:dm/improve-source-routing

looks like I had 2 branches out there.... maybe some combo of this + tweaking will help. I never got too far w/ testing.

@puddly
Copy link
Contributor Author

puddly commented May 28, 2024

I've implemented "dumb" source routing as a firmware extension. Alternate branches:

Network startup and mass command sending is now fast 😄

@puddly puddly merged commit 93c671b into zigpy:dev Jul 23, 2024
14 checks passed
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.

3 participants