-
Notifications
You must be signed in to change notification settings - Fork 50
[WIP] Add Waveshare Pico-LoRa-SX1262-868M support #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[WIP] Add Waveshare Pico-LoRa-SX1262-868M support #15
Conversation
…default to SX1276
…xamples: - hello_abp - hello_otaa examples - otaa_temperature_led
Read back information from cache instead of flash. The cache contains the latest context, whereas the flash is only updated periodically. This could cause issues if the flash is not (yet) updated while the context has been updated in the meantime and values are read by LoRaMAC. Therefore just read from flash initially after startup (EepromMcuInit()) and rely on write cache later. This commit effectively makes commit e31d3c1 work for me and therefore is a fix. Previous attemps to use commit e31d3c1... without this commit failed. Error message: "Duty cycle restricted". The error message might not appear at the first startup, but will appear if Raspberry Pi Pico is restarted and values from "EEPROM" / Flash have been read.
Eeprom problem seems to be fixed via #16 |
9ca0775
to
5726f72
Compare
|
Can confirm SX1276 works as expected as the default |
@ThomasLeister thank you for the pull request, and sorry for the delay. We are still thinking about if the SX1262 is something we want to support in this library, and then I would have to get one that is supported for the US915 my testing. In regards to your comment:
Since most RP2040 boards have ample flash space, I'm wondering if the small wrapper around the Semtech library could be used to auto detect the module version on init? |
Sure, take your time to evaluate if this module should be supported by the library. If not, no worries. Then I'll just keep this branch in my personal repo. As far as I have seen, there is no such WaveShare module available for regions other than Eu868. I just send WaveShare a message to get some information on their future plans. Maybe there will be US versions some day? |
I have an update for you. The WaveShare support just replied to my mail:
Sounds good! :) |
Waveshare modules for EU868, US915 and EU433 are now available! https://www.waveshare.com/pico-lora-sx1262-868m.htm 👏 |
The EU868 module works OK on US915 / AU915 just with minor power loss but well suitable for testing purposes. |
Thank you so much for this branch. Hereby the confirmation that the following configuration works:
|
This PR is for adding Pico-LoRa-SX1262-868M support.
Waveshare module:
The module manufacturer has modified the lorawan-library-for-pico to be compatible to the Waveshare module but has not merged back their changes. The original source is available here: ZIP | GitHub . Unfortunately everything is crowded into one commit and SX1276 support seems to be broken in favor of SX1262 support.
I've taken the manufacturer's sources (also BSD-3 clause licensed) and ported the important parts on top of a recent version of the upstream library. Also some updates on README.md have been done and updated example applications include a proper pin configuration struct for the Waveshare module. A compile time switch in CMakeLists.txt lets the user decide between SX1276 and SX1262 support.
SX1267 should not be broken, but working support for the chip is still unconfirmed, because I'm just owning a Waveshare module ;-)
To be done prior to merging this PR:
I'd be happy to get your opinion, @sandeepmistry . Let me know your opinion and suggestions and make this branch / PR ready for merge :-)