-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers: add support for sx1261/2 and llcc68 radio devices #16177
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
Conversation
The dependency resolution with Kconfig is missing the package modules. This is the reason of this failure. |
Hmm I don't think so, to skip the application we need to change the .murdock script. I think adding something like the following should work ? diff --git a/drivers/llcc68/Kconfig b/drivers/llcc68/Kconfig
index 72fc51b93e..6e8b3f3c44 100644
--- a/drivers/llcc68/Kconfig
+++ b/drivers/llcc68/Kconfig
@@ -8,6 +8,7 @@
config MODULE_LLCC68
bool "LLCC68 LoRa Sub-GHz radio"
depends on HAS_PERIPH_GPIO_IRQ
+ depends on PACKAGE_DRIVER_LLCC68
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO_IRQ
select MODULE_IOLIST
diff --git a/pkg/Kconfig b/pkg/Kconfig
index 4eb8695c0f..1c2e03b9c5 100644
--- a/pkg/Kconfig
+++ b/pkg/Kconfig
@@ -7,6 +7,7 @@
menu "Packages"
rsource "driver_bme680/Kconfig"
+rsource "driver_llcc68/Kconfig"
rsource "semtech-loramac/Kconfig"
rsource "tinydtls/Kconfig"
rsource "umorse/Kconfig"
diff --git a/pkg/driver_llcc68/Kconfig b/pkg/driver_llcc68/Kconfig
new file mode 100644
index 0000000000..d8a8492128
--- /dev/null
+++ b/pkg/driver_llcc68/Kconfig
@@ -0,0 +1,15 @@
+
+config PACKAGE_DRIVER_LLCC68
+ bool "LLCC68 driver package"
+ depends on TEST_KCONFIG
+ depends on HAS_PERIPH_SPI
+ select MODULE_PERIPH_SPI
+ select MODULE_FMT
+ select MODULE_ZTIMER
+ select MODULE_ZTIMER_USEC
+ select MODULE_DRIVER_LLCC68_HAL
+
+config MODULE_DRIVER_LLCC68_HAL
+ bool
+ help
+ HAL implementation for the LLCC68 LoRa radio driver.
diff --git a/tests/driver_llcc68/app.config.test b/tests/driver_llcc68/app.config.test
index 084e754153..f2dce60a4b 100644
--- a/tests/driver_llcc68/app.config.test
+++ b/tests/driver_llcc68/app.config.test
@@ -1,6 +1,7 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_LLCC68=y
+CONFIG_PACKAGE_DRIVER_LLCC68=y
CONFIG_MODULE_SHELL=y
CONFIG_MODULE_SHELL_COMMANDS=y |
Thanks, that works! I don't know why I thought there's was no Kconfig support for package dependency resolution... |
fe2a504
to
66bcd45
Compare
f255fa6
to
daa9a9f
Compare
038e736
to
97108b8
Compare
@aabadie Is the mbed llc68 shield the default parameter configuration still? |
Yes, the pinout seems to be compatible. |
Currently trying to tes with a
Looking into why. |
It could be the Arduino pinout that is slightly different than other nucleo boards. |
That was it thanks! |
@fjmolinas your comments should be addressed now. Regarding the PA configuration, I'm not sure how to handle this properly: it seems that depending on the expected output TX power, difference combinations should be used. For the moment, I kept a single config for 14dBm TX power. I don't know what is the impact of this on other TX powers. |
Can you point me to where in the datasheet this is discussed/specifide? |
In the section "13.1.14 SetPaConfig" and there are optimal combinations given in the "PA optimal settings" subsection. The combinations differ between device variants. |
Ok, this can be left as a follow up but please add a big comment for this :) |
Thanks, and comment added |
@aabadie can you perform the test procedure again? I sadly only have one llc68 and no other LoRa device ATM. |
I was able to test this PR through the |
Ran the PR again between radio modules:
receiver
sender
receiver
sender
|
Squashed! |
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.
ACK!
Thanks @fjmolinas ! |
Contribution description
This PR adds support for the Semtech LLCC68 and SX1261, SX1261 and SX1268 Sub-GHz LoRa radios.
Only LoRa related features are implemented. FSK modulation can be done later I think but this is another PR: I think some sort of pseudo-module should be introduced to select at build time the type of modem to use.
The default configuration of the driver is adapted to the mbed shield plugged on a nucleo-64 board.
It is based on an external package for the low-level part. This low-level implementation made it super simple to adapt to RIOT.
On the RIOT side, only the netdev interface implementation was needed (plus some minor accessors). As a result it should be possible to use with gnrc_lorawan (untested). It should also be possible to adapt the loramac package to make it use the netdev interface instead of directly using the sx127x API, so this driver could also be used there.
Minor problem: for some reason the continuous RX is not working as expected, so only single RX is implemented. A trick is used in the test application to re-set the single RX state after each received packet.
Testing procedure
So far, only raw communication using the
tests/driver_llcc68
application was tested:Sender:
Receiver:
Issues/PRs references
None