jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.54k stars 384 forks source link

[SX1280] Sync word setting API for LoRa? #311

Closed jg1uaa closed 3 years ago

jg1uaa commented 3 years ago

Currently, there is no sync word setting API for SX1280/LoRa. This has "LoRa Synch Word" register at address 0x944 and 0x945, and the default value is 0x14 and 0x24 respectively. Different from SX127x series, I understand that current RadioLib works 0x1424 as sync word on this 2.4GHz chip.

I want to know what value will be set to SX1280 when we use it as "private-0x12" on SX1278. And Semtech proposes 2.4GHz extentsion https://lora-developers.semtech.com/library/tech-papers-and-guides/physical-layer-proposal-2.4ghz/ ; it uses value 0x21 so we have to any API to configure sync word for this chip.

jgromes commented 3 years ago

At the time SX1280 support was being added, there was no documented way to change LoRa sync word - such is life with Semtech docs, unfortunately, they're largely incomplete.

Looks like they documented a couple more registers, including one that lets use set LoRa sync word. I added a new API method to do it, it works just like SX127x/SX126x setSyncWord. The default value is 0x12, thanks for pointing this out!