Skip to content

Add option to use externally defined radio - #1014

Open
dala318 wants to merge 2 commits into
mcci-catena:masterfrom
dala318:master
Open

Add option to use externally defined radio#1014
dala318 wants to merge 2 commits into
mcci-catena:masterfrom
dala318:master

Conversation

@dala318

@dala318 dala318 commented Jul 7, 2025

Copy link
Copy Markdown

Have been experimenting to use this LoRaWAN stack in ESPHome but would in that case want to re-use the native ESPHome LoRa radio integrations. For that this library will have to allow proxying the radio communication parts to code outside the library code.

This PR adds this possibility by adding the build-flag -D CFG_external_radio=1

ESPHome PR /dala318/esphome/pull/16

@terrillmoore

Copy link
Copy Markdown
Member

Thanks for the PR, @dala318. The use case is valid -- being able to substitute an external radio driver is something we need.

However, we're deferring this for now because it intersects with two larger efforts:

  1. Radio driver interface design (V7 architecture: structured initialization and configuration layering #1067). The internal functions that a radio driver must implement (os_radio(), radio_init(), radio_config(), etc.) are not a stable or documented interface. The v6.0.0 refactor added os_radio_v2() and changed how radio state is managed. Simply suppressing the built-in drivers and hoping an external implementation matches the current internals is fragile. We need to define a proper radio driver contract first.

  2. LoRaWAN-over-Meshtastic (LWoM). We're actively working on tunneling LoRaWAN Class A traffic over Meshtastic transport, which requires replacing the radio layer with something that isn't a LoRa PHY at all -- Meshtastic packet transport with soft RX timing and runtime region selection. This is a more demanding version of the same abstraction your PR enables, and the interface design needs to accommodate both use cases.

We'll keep this open as a reference. When the radio driver interface is properly specified (likely as part of a v7 architecture effort), we'll revisit enabling external radio drivers in a way that's maintainable.

@dala318

dala318 commented Apr 5, 2026

Copy link
Copy Markdown
Author

Thanks for the update.
My LoRaWAN projects has been put on hold for a while now due to lack of time but am looking forward to your future improvements. Might spring some new life into my attempt of adding LoRaWAN support to ESPHome.

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.

2 participants