-
Notifications
You must be signed in to change notification settings - Fork 7.4k
LoRa: Initial integration of LoRa Basics Modem for LoRa API & SX126x and SX127x #89241
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?
Conversation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 added project Note: This message is automatically posted and updated by the Manifest GitHub Action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates the LoRa Basics Modem into Zephyr for the LoRa API, providing initial support for the standalone SX126x and SX127x chipsets.
- Added new header file (lbm_common.h) containing common data structures, enums, and function prototypes for modem configuration
- Included an inline helper function for optional GPIO pin configuration
Files not reviewed (11)
- boards/shields/semtech_sx1262mb2das/semtech_sx1262mb2das.overlay: Language not supported
- doc/connectivity/lora_lorawan/index.rst: Language not supported
- drivers/lora/CMakeLists.txt: Language not supported
- drivers/lora/Kconfig: Language not supported
- drivers/lora/lora_basics_modem/CMakeLists.txt: Language not supported
- drivers/lora/lora_basics_modem/Kconfig: Language not supported
- drivers/lora/loramac_node/CMakeLists.txt: Language not supported
- modules/Kconfig: Language not supported
- modules/lora_basics_modem/CMakeLists.txt: Language not supported
- modules/lora_basics_modem/Kconfig: Language not supported
- modules/lora_basics_modem/sx126x.cmake: Language not supported
70a6e3b
to
00580f6
Compare
I'm happy to give this a try with a non trivial application on the TTGO T-Beam board. Many thanks for doing the port to the new driver. |
I can confirm that this properly works on this board (RX & TX). Had to switch the syncword in |
Thanks for validating. I also have a use-case for changing the sync word, but I don't want to pile too many changes in this PR. |
Sure, agree!
I would implement that using a new API function |
Move the current implementation of the LoRa API using `loramac-node` to a dedicated folder in preparation for the LoRa basics modem implementation. Signed-off-by: Jordan Yates <jordan@embeint.com>
Import the lora-basics-modem module as an alternate backend for LoRa and LoRaWAN, since loramac-node has been deprecated. Support is currently limited and experimental. Signed-off-by: Jordan Yates <jordan@embeint.com>
As a first integration of the LoRa Basics Modem backend, implement the LoRa API for the standard SX126x/SX127x chips. Much of the logic from `lbm_common.c` is taken from the loramac-node `sx12xx_common` implementation, but it should now be agnostic for all LoRa RF transceivers. Signed-off-by: Jordan Yates <jordan@embeint.com>
Add testcases for `CONFIG_LORA_MODULE_BACKEND_LORA_BASICS_MODEM` in the LoRa API samples. Signed-off-by: Jordan Yates <jordan@embeint.com>
Document the current status of LoRaMAC-node and LoRa Basics Modem. Signed-off-by: Jordan Yates <jordan@embeint.com>
Hi @JordanYates, I'm testing this PR (#89241) on a custom board with an SX1262 for basic LoRa with the send and receive samples. I'm seeing a fatal exception and "LoRa send failed, -22" (EINVAL). This does not happen with loramac-node driver. My Setup:
Relevant
Console Logs:
Request: |
Thanks for taking the time to try it out @mirzasadiqassb. Based on the provided logs, it looks like the TX done interrupt is not being seen by the micro. This is interesting since the logic works on my SX1262 shield. Can you run the test again with the |
@JordanYates i will definitely give it a try on this but not during this week, for sure on next week. |
Here is the log when I commented out the
And here is my SX1262 devicetree node:
|
My best guess would be a problem related to the external TCXO configuration, which the MBed shield does not have. I should have access to hardware with an external TCXO in the next few weeks, so I can investigate further then. Don't let that dissuade you from digging deeper if you want, I would appreciate any fixes :) |
Running some initials tests is indicating that everything is so far so good.
Tests have been made on a custom board featuring sx1262.
I just forgot to bring another extra board to completely test the tx/rx modes. |
Packets are arriving on receiver:
|
This PR contains the initial integration of LoRa Basics Modem (Semtech's replacement for LoRaMAC-node) with Zephyr.
To limit the scope, only the LoRa API is considered, and only the standalone SX126x and SX127x chipsets are ported.
The new drivers use the same devicetree definitions as the current drivers, so the only change required to use the updated drivers is
CONFIG_LORA_MODULE_BACKEND_LORA_BASICS_MODEM=y
.Once this PR is merged, we can start to look at:
PR has been tested with the lora send and receive samples between a
semtech_sx1262mb2das
andsemtech_sx1272mb2das
shield in both directions.The SX1262 transmitter, SX1272 receiver setup currently receives packets with ~10dB lower RSSI than the reverse, which I will continue to look into.
Issue for the creation of the module: #89251.