Skip to content

gs: Fix rctx field name in LBS LNS upstream messages - #8004

Merged
vlasebian merged 1 commit into
v3.37from
fix/up-info-field-name
Aug 26, 2026
Merged

gs: Fix rctx field name in LBS LNS upstream messages#8004
vlasebian merged 1 commit into
v3.37from
fix/up-info-field-name

Conversation

@vlasebian

@vlasebian vlasebian commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The Gateway Server parsed the rctx field in the upinfo object of upstream messages of the LoRa Basics Station LNS protocol using a misspelled JSON tag (rtcx). Since Basics Station gateways send rctx (per the LNS protocol), the radio context they reported was silently ignored and the antenna index was always 0. This PR fixes the field name so the value is actually consumed.

Changes

  • Fix the JSON tag of UpInfo.RCtx from rtcx to rctx.
  • Update test expectations accordingly.
  • Add a CHANGELOG entry.

Testing

Steps

Run the package tests:

go test ./pkg/gatewayserver/io/semtechws/lbslns/
Results
ok  go.thethings.network/lorawan-stack/v3/pkg/gatewayserver/io/semtechws/lbslns  2.732s
Regressions

Behaviour changes on multi-radio Basics Station gateways.

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.

@vlasebian vlasebian self-assigned this Aug 21, 2026
@github-actions github-actions Bot added the c/gateway server This is related to the Gateway Server label Aug 21, 2026
@vlasebian
vlasebian marked this pull request as ready for review August 21, 2026 14:19
@vlasebian
vlasebian requested a review from a team as a code owner August 21, 2026 14:19
@vlasebian
vlasebian force-pushed the fix/up-info-field-name branch from fc019df to 0f4cd42 Compare August 21, 2026 14:30
The rctx field in the upinfo object of upstream messages was misspelled
as rtcx, so the radio context reported by gateways was ignored and the
antenna index in the uplink metadata was always 0. The parsed value is
now reflected in the uplink metadata and echoed in class A downlinks.
@vlasebian
vlasebian force-pushed the fix/up-info-field-name branch from 0f4cd42 to 7821167 Compare August 21, 2026 14:32

@johanstokking johanstokking left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This fix is fine, but I'm not sure if this makes downlink work to other antennas than the first:

if md.AntennaIndex != 0 {
// TODO: Support downlink path to multiple antennas (https://github.com/TheThingsNetwork/lorawan-stack/issues/48)
md.DownlinkPathConstraint = ttnpb.DownlinkPathConstraint_DOWNLINK_PATH_CONSTRAINT_NEVER
continue
}

Let's merge this as-is and let's continue the discussion in #48.

@vlasebian
vlasebian merged commit 14a2601 into v3.37 Aug 26, 2026
13 of 15 checks passed
@vlasebian
vlasebian deleted the fix/up-info-field-name branch August 26, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/gateway server This is related to the Gateway Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants