Skip to content

Conversation

@maribu
Copy link
Contributor

@maribu maribu commented Oct 17, 2025

Note

This PR includes #203, it should be rebased once #203 is merged

Proposed Changes

  • Extend LoraTag and LoraChannelParameters to carry the sync word
  • Extended LoraPhy to allow configuring the sync word
  • Extended LoraPhy with a "LostPacketBecauseSyncWordMismatch" trace source
  • Extended SimpleGatewayLoraPhy and SimpleEndDeviceLoraPhy to not receive incoming packets when the don't match the configured sync word
  • Added a test that on mismatching sync word the packet is indeed lost and "LostPacketBecauseSyncWordMismatch" is called

An enum instead of a magic number makes the code a lot easier to read.
@maribu maribu changed the title LoraPhy: Use enum for coding rate LoraPhy, LoraChannel: simulate sync word behavior Oct 18, 2025
This adds a simple sync word model: A PHY is configured with a given
sync word and will use that in the preamble of outgoing packets. For
incoming packets, the PHY will only lock onto the transmission if the
sync word of the incoming packet matches the configured sync word.
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

❌ Patch coverage is 96.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.78%. Comparing base (1809ba2) to head (5af17e9).

Files with missing lines Patch % Lines
model/simple-gateway-lora-phy.cc 76.92% 3 Missing ⚠️
model/lora-channel.cc 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #204      +/-   ##
===========================================
+ Coverage    84.61%   84.78%   +0.16%     
===========================================
  Files           67       67              
  Lines         7015     7096      +81     
===========================================
+ Hits          5936     6016      +80     
- Misses        1079     1080       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maribu maribu marked this pull request as ready for review October 18, 2025 12:19
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.

1 participant