Skip to content

lora: update examples for the new sx126x and sx127x radio control API - #14

Open
deadprogram wants to merge 2 commits into
lora-use-drivers-typesfrom
lora-drivers-api
Open

deadprogram wants to merge 2 commits into
lora-use-drivers-typesfrom
lora-drivers-api

Conversation

@deadprogram

@deadprogram deadprogram commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

This PR updates the examples for the new sx126x and sx127x radio control API from tinygo-org/drivers#953 and tinygo-org/drivers#954. It is stacked on #13.

Changes:

  • Pass DIO interrupt setup functions to NewRadioControl for sx126x and sx127x
  • Pick the STM32WL RF switch per board for the Nucleo-WL55JC, GNSE and LoRa-E5
  • Return the SetRadioController error from SetupLora
  • Update the drivers dependency in the root and example modules

It should not be merged yet since the drivers dependency points at an unmerged commit from tinygo-org/drivers#955. It should be bumped to the dev commit once the drivers PRs are merged.

Tested with go test ./... and TinyGo builds of the LoRaWAN examples for pybadge with the FeatherWing, pico with sx126x, nucleo-wl55jc, lorae5 and gnse, plus the morse, afsk, fsk4 and wspr examples. On lgt92 basic-demo builds, and atcmd still overflows flash as it did before.

Pass DIO interrupt setup functions to NewRadioControl, pick the STM32WL
RF switch per board, and return the SetRadioController error. Update the
drivers dependency in the root and example modules.
@deadprogram
deadprogram marked this pull request as ready for review December 2, 2026 20:34
@deadprogram
deadprogram added this pull request to stack #15 December 2, 2026 20:35
@deadprogram

Copy link
Copy Markdown
Member Author

The drivers dependency now points at 7b93c90 from tinygo-org/drivers#955. The earlier commit 78aa4cd is no longer on that branch after the drivers PRs were squashed.

The two dependency commits here are now one, 553c52d. 7b93c90 also changes the sx128x public sync word to 0x21 for LoRaWAN 2.4 GHz, which #16 uses.

Tested with go test ./..., go vet in the afsk, fsk4, morse and wspr examples, and TinyGo builds of basic-demo for pybadge with the FeatherWing, lorae5, pico with sx126x, nucleo-wl55jc and the simulator.

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