Re: [RFC] Appropriate subsystem/UAPI for Semtech SX126x packet radio support
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-20 21:38:19
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