* [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
@ 2026-09-20 21:15 i.n.a
2026-09-20 21:38 ` Andrew Lunn
0 siblings, 1 reply; 6+ messages in thread
From: i.n.a @ 2026-09-20 21:15 UTC (permalink / raw)
To: netdev@vger.kernel.org; +Cc: linux-wpan@vger.kernel.org
Hi,
I'm working on a general-purpose Linux driver for the Semtech SX126x family of sub-GHz radio transceivers, initially targeting the SX1262.
Semtech provides a portable C driver for the radio, with the platform-specific interface abstracted behind read, write, reset and wakeup operations:
https://github.com/Lora-net/sx126x_driver
I'm currently implementing the Linux side using SPI, GPIO and IRQ infrastructure.
The SX126x supports LoRa and (G)FSK packet modes, but isn't inherently tied to a particular higher-level protocol. My intention is therefore to keep protocols such as LoRaWAN, AX.25 and Reticulum outside the hardware driver and expose generic packet TX/RX, PHY configuration, radio state and receive metadata such as RSSI/SNR.
I was considering exposing the radio as a character device, for example `/dev/sx126x0`, with a small userspace API for configuration and packet I/O. However, before defining an out-of-tree UAPI that may turn out to be the wrong abstraction, I'd appreciate some guidance:
1. Is there an existing Linux subsystem suitable for this class of packet radio?
2. If not, would a character device be an appropriate interface, or is there another abstraction I should investigate?
3. Would it make sense for the hardware driver to remain protocol-agnostic, with networking/protocol interfaces implemented above it?
The aim is for the driver to be generic across SX1261/SX1262/SX1268 hardware rather than tied to a particular board. I'm also interested in supporting different transports where practical; my initial hardware is SPI-connected.
I wanted to ask about the architecture early, before too much code or a userspace ABI becomes established.
Thanks,
Ina
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
2026-09-20 21:15 i.n.a
@ 2026-09-20 21:38 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2026-09-20 21:38 UTC (permalink / raw)
To: i.n.a; +Cc: netdev@vger.kernel.org, linux-wpan@vger.kernel.org
On Sun, Sep 20, 2026 at 09:15:16PM +0000, i.n.a wrote:
> Hi,
>
> I'm working on a general-purpose Linux driver for the Semtech SX126x family of sub-GHz radio transceivers, initially targeting the SX1262.
>
> Semtech provides a portable C driver for the radio, with the platform-specific interface abstracted behind read, write, reset and wakeup operations:
>
> https://github.com/Lora-net/sx126x_driver
>
> I'm currently implementing the Linux side using SPI, GPIO and IRQ infrastructure.
>
> The SX126x supports LoRa and (G)FSK packet modes, but isn't inherently tied to a particular higher-level protocol. My intention is therefore to keep protocols such as LoRaWAN, AX.25 and Reticulum outside the hardware driver and expose generic packet TX/RX, PHY configuration, radio state and receive metadata such as RSSI/SNR.
>
> I was considering exposing the radio as a character device, for example `/dev/sx126x0`, with a small userspace API for configuration and packet I/O.
One thing to keep in mind is that there are other vendors producing similar devices, e.g:
https://www.microchip.com/en-us/products/wireless-connectivity/sub-ghz/lora
https://www.st.com/en/microcontrollers-microprocessors/stm32wl-series.html
You want to make whatever API you design vendor independent.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
@ 2026-09-20 21:50 i.n.a
2026-09-20 22:15 ` Andrew Lunn
0 siblings, 1 reply; 6+ messages in thread
From: i.n.a @ 2026-09-20 21:50 UTC (permalink / raw)
To: andrew@lunn.ch; +Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org
> You want to make whatever API you design vendor independent.
Thanks, that's a good point. I'll keep the API vendor-independent. Is there an existing kernel abstraction you'd suggest as a starting point?
Thanks,
Ina
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
2026-09-20 21:50 i.n.a
@ 2026-09-20 22:15 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2026-09-20 22:15 UTC (permalink / raw)
To: i.n.a; +Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org
On Sun, Sep 20, 2026 at 09:50:17PM +0000, i.n.a wrote:
> > You want to make whatever API you design vendor independent.
>
> Thanks, that's a good point. I'll keep the API
> vendor-independent. Is there an existing kernel abstraction you'd
> suggest as a starting point?
This is not really my area, but i would look at the ieee802154 code in
the kernel. They are different technologies, but is the MAC interface
that different? Both need to pass packets to send, both need to
receive packets. There needs to be some why to select frequency, etc.
Is stacking protocols on top of the MAC that different to IEEE
802.15.4?
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
@ 2026-09-20 23:06 i.n.a
2026-09-24 1:32 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: i.n.a @ 2026-09-20 23:06 UTC (permalink / raw)
To: andrew@lunn.ch; +Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org
>Is stacking protocols on top of the MAC that different to IEEE
802.15.4?
Had a look through `mac802154` and `ieee802154_ops`, the hardware boundary does look quite similar, particularly packet TX/RX, start/stop, TX power and energy detection.
The main differences seem to be the 802.15.4-specific parts such as channel/page addressing, CSMA parameters and address filtering, versus PHY-specific configuration for LoRa/GFSK.
Would it make sense to investigate factoring out a small generic packet-radio layer beneath the MAC-specific interfaces?
Thanks,
Ina
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
2026-09-20 23:06 [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support i.n.a
@ 2026-09-24 1:32 ` Jakub Kicinski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2026-09-24 1:32 UTC (permalink / raw)
To: i.n.a; +Cc: andrew@lunn.ch, linux-wpan@vger.kernel.org,
netdev@vger.kernel.org
On Sun, 20 Sep 2026 23:06:39 +0000 i.n.a wrote:
> >Is stacking protocols on top of the MAC that different to IEEE
> 802.15.4?
>
> Had a look through `mac802154` and `ieee802154_ops`, the hardware boundary does look quite similar, particularly packet TX/RX, start/stop, TX power and energy detection.
>
> The main differences seem to be the 802.15.4-specific parts such as channel/page addressing, CSMA parameters and address filtering, versus PHY-specific configuration for LoRa/GFSK.
>
> Would it make sense to investigate factoring out a small generic packet-radio layer beneath the MAC-specific interfaces?
Not an expert, but IMO, you'll need to take it up with ieee802154
maintainers. If they are not interested in broadening the support
I'd say keeping the code in user space seems perfectly fine.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-24 1:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-20 23:06 [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support i.n.a
2026-09-24 1:32 ` Jakub Kicinski
-- strict thread matches above, loose matches on Subject: below --
2026-09-20 21:50 i.n.a
2026-09-20 22:15 ` Andrew Lunn
2026-09-20 21:15 i.n.a
2026-09-20 21:38 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox