Skip to content

Downlink support for multiple antennas - #8018

Draft
vlasebian wants to merge 2 commits into
v3.37from
feat/downlink-support-for-multiple-antennas
Draft

Downlink support for multiple antennas#8018
vlasebian wants to merge 2 commits into
v3.37from
feat/downlink-support-for-multiple-antennas

Conversation

@vlasebian

Copy link
Copy Markdown
Contributor

References: #48.

Summary

Changes

  • Drop the DOWNLINK_PATH_CONSTRAINT_NEVER constraint to allow using other antennas for the downlink path, not only antenna 0.
  • Align the antenna gains with the frequency plans and set them in the LBS router_config. Fallback on the gain of the first antenna if fewer antennas are registered than frequency plans.
  • Change the antenna gain from int to float32 to match the antenna gain in the proto definition (TODO: check correctness)

Testing

TODO

Steps

...

Results
Regressions

...

Notes for Reviewers

...

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

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
@vlasebian vlasebian self-assigned this Sep 2, 2026
@github-actions github-actions Bot added c/gateway server This is related to the Gateway Server c/gateway conf server This is related to the Gateway Configuration Server labels Sep 2, 2026
@vlasebian

vlasebian commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@johanstokking I started doing some work on this. I covered what was in your last comment, but I see there are some changes that have to be done in the GS scheduler regarding the emissions too:

pkg/gatewayserver/scheduling.SubBand should have an emissions array per antenna as conflicts are per antenna, not per gateway. The duty-cycle is still the compound of these arrays, as that is per gateway

From my understanding, there has to be a per-gateway duty cycle budget that takes into consideration the air time of all the messages regardless of the antennas. That should stay as is.

However, multiple antennas allow for concurrent downlinks to be sent and two downlinks sent on different antennas will not conflict. Currently, the code does see it as a conflict and has to be updated to allow for it. This is tracked in the emisisons of the gateway scheduler - this scheduler is per frequency plan (not the sub-band scheduler emissions). This has to be changed to an array that tracks emissions per antenna.

So something like:

type Scheduler struct {
	clock                *RolloverClock
	fps                  []*frequencyplans.FrequencyPlan
	timeOffAir           frequencyplans.TimeOffAir
	timeSource           TimeSource
	subBands             []*SubBand
	mu                   sync.RWMutex
	emissionsPerAntenna  []Emissions // this becomes an array indexed by antenna index
	scheduleAnytimeDelay time.Duration
}

Did I get this right?

@johanstokking

Copy link
Copy Markdown
Member

I have a bit of progressive insight on #48 (comment).

If we would support concurrent downlink, we would indeed have to account for gateway-level duty-cycle and we would have to avoid conflicts where two downlinks use the same frequency.

For now, I would keep it simple and not design for concurrent downlinks. So if we have a multiple antennas, downlink should be sent from the right antenna but not concurrently with downlink on other antennas. This is still beneficial over using one antenna only for downlink, because antennas can be directional (like two antennas covering 180 degrees).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/gateway conf server This is related to the Gateway Configuration Server c/gateway server This is related to the Gateway Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants