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

Add support for receiving basic fragmented messages #669

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

ThomasKulin
Copy link

I am not much of a developer but I have found your project to be very useful and would like to contribute a change that I made to implement fragmented message support. This likely needs to be expanded to respect the EzspConfigId.CONFIG_FRAGMENT_WINDOW_SIZE and EzspConfigId.CONFIG_FRAGMENT_DELAY_MS configuration parameters.

@puddly
Copy link
Contributor

puddly commented Feb 26, 2025

Interesting! Are fragmented frames something you're seeing with a consumer device, or is this a device that you're working on?

@ThomasKulin
Copy link
Author

I haven't seen them used in any consumer device so far. This is for something relating to solar inverters where Zigbee is used for data collection. Some of the data packets are large enough to necessitate fragmentation. This code works for my specific application where the device fragment window size is set to 1 (requiring an ack for each transmitted fragment). I have no way of testing with other window sizes. Feel free to recommend changes and I'll gladly make them!

Copy link
Contributor

@puddly puddly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments regarding the cleanup code. Let me know if you have any questions.

Thanks again!

@puddly
Copy link
Contributor

puddly commented Feb 27, 2025

For the failing CI, you can set up pre-commit to auto-format your code and point out issues that CI would detect:

pip install pre-commit
pre-commit install
pre-commit run --all-files

This will also run every time you make a new Git commit, for future changes.

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.23%. Comparing base (bdb7374) to head (13c376a).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #669      +/-   ##
==========================================
+ Coverage   99.21%   99.23%   +0.01%     
==========================================
  Files          51       52       +1     
  Lines        3695     3769      +74     
==========================================
+ Hits         3666     3740      +74     
  Misses         29       29              

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

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