Skip to content

lora/lora-sx127x-pycom: Add unified SX1272/SX1276 LoRa driver#1102

Open
ddtdanilo wants to merge 1 commit intomicropython:masterfrom
ddtdanilo:add-pycom-lora
Open

lora/lora-sx127x-pycom: Add unified SX1272/SX1276 LoRa driver#1102
ddtdanilo wants to merge 1 commit intomicropython:masterfrom
ddtdanilo:add-pycom-lora

Conversation

@ddtdanilo
Copy link
Copy Markdown

@ddtdanilo ddtdanilo commented Apr 2, 2026

Summary

Add lora-sx127x-pycom: a unified SX1272/SX1276 LoRa radio driver for micropython-lib.

The existing lora-sx127x package only supports SX1276 (version register 0x12); this driver also handles SX1272 (0x22), which has a different register layout for bandwidth encoding, coding rate bits, CRC location, and RSSI calculation offsets.

This package is consumed by the Pycom LoPy (SX1272) and LoPy4 (SX1276) board definitions in micropython/micropython#19026.

Testing

Related

Add a LoRa radio driver that handles both SX1272 and SX1276
transceivers. The existing lora-sx127x package only supports
SX1276 (version register 0x12); this driver also handles SX1272
(version 0x22) with its different register layouts for bandwidth,
coding rate, CRC, and RSSI calculation.

Used by Pycom LoPy (SX1272) and LoPy4 (SX1276) boards as defined
in micropython/micropython#19026.

Signed-off-by: Danilo D <danilodt@gmail.com>
Copy link
Copy Markdown
Contributor

@projectgus projectgus left a comment

Choose a reason for hiding this comment

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

This looks really exciting, thanks @ddtdanilo! Had always hoped the LoRa micropython-lib support would be enough for someone to build a LoRaWAN driver.

Do you mind moving the lorawan support into its own PR, please? There's a lot of new code here, and it will be easier to review and merge these independently.

@ddtdanilo
Copy link
Copy Markdown
Author

Hi @projectgus — thanks for the review!

I've split the LoRaWAN MAC layer into its own PR as you suggested:

➡️ #1111 (lora-lorawan)

This PR (#1102) now contains only the lora-sx127x-pycom driver. The two are independently reviewable and mergeable. Force-pushed add-pycom-lora to keep just the driver commit (c9c9d04); the MAC commit is on add-pycom-lorawan for #1111.

Let me know if you'd like any further changes to either one.

@ddtdanilo ddtdanilo changed the title lora: Add SX1272/SX1276 unified driver and LoRaWAN MAC layer lora/lora-sx127x-pycom: Add unified SX1272/SX1276 LoRa driver May 9, 2026
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