Support downlink scheduling on all gateway antennas - #8017
Closed
vlasebian wants to merge 2 commits into
Closed
Conversation
Uplinks received on antennas other than the first now carry an uplink token and inherit the gateway's downlink path constraint, so that the Network Server can use any antenna as a downlink path. References #48
Each SX1301_conf object in the router configuration now carries the gain of its own board's antenna instead of the first antenna's gain applied to all boards. Antenna gains are aligned index-for-index with the gateway's frequency plans, falling back to the first antenna's gain when fewer antennas are registered than frequency plans. Fractional gains are no longer truncated to integers. References #48
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
The Gateway Server only issued uplink tokens for antenna 0 and disabled the downlink path on all other antennas, so multi-board gateways could never receive downlinks on their other antennas. This PR treats all antennas as downlink paths and sends each board its own antenna gain in the LoRa Basics Station router configuration.
References #48
Changes
DOWNLINK_PATH_CONSTRAINT_NEVERon antennas other than the first.SX1301_confobject in the LBSrouter_confignow carries the gain of its own board's antenna (aligned index-for-index with the gateway's frequency plans, falling back to the first antenna's gain when fewer antennas are registered), instead of the first antenna's gain applied to all boards.Testing
Steps
EU_863_870,EU_863_870) and two antennas with different gains (CLI:--antenna.index N --antenna.gain X).router_configcontains oneSX1301_confper board, each with its ownantenna_gain.rctx: 1) and verify the uplink metadata carries an uplink token and the gateway's downlink path constraint.dnmsgcarriesrctx: 1.Results
Unit tests cover the gain alignment and fallback (
TestNewConnectionAntennaGains) and per-board gains in the router configuration (TestGetRouterConfigWithMultipleFP/DistinctAntennaGains).Regressions
router_configoutput; integral gains marshal identically).Notes for Reviewers
Scheduling downlinks concurrently on different antennas (per-antenna conflict tracking in the scheduler) is a follow-up on this branch; the sub-band duty-cycle accounting intentionally remains per gateway.
Checklist
README.mdfor the chosen target branch.CHANGELOG.md.CONTRIBUTING.md, there are no fixup commits left.