Skip to content

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

Merged
merged 6 commits into from
Mar 30, 2021

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Mar 10, 2021

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:

  • between 2 llcc68 modules: using SF7 to SF11 (no SF12 supported by this chip) and different coding rates
  • between 1 llcc68 and 1 sx1276: using different SF and CR

Sender:

> sx126x get freq
sx126x get freq
Frequency: 868300000
> sx126x get bw
sx126x get bw
Bandwidth: 125kHz
> sx126x get sf
sx126x get sf
Spreading factor: 7
> sx126x get cr
sx126x get cr
Coding rate: 1
> sx126x tx "hello lora world" 
sx126x tx "hello lora world"
sending "hello lora world" payload (17 bytes)
> Transmission completed
> sx126x set sf 11
sx126x set sf 11
sf set
> sx126x tx "hello slow lora world"
sx126x tx "hello slow lora world"
sending "hello slow lora world" payload (22 bytes)
> Transmission completed

Receiver:

> sx126x get freq
sx126x get freq
Frequency: 868300000
> sx126x get bw
sx126x get bw
Bandwidth: 125kHz
> sx126x get sf
sx126x get sf
Spreading factor: 7
> sx126x get cr
sx126x get cr
Coding rate: 1
> sx126x rx start
sx126x rx start
Listen mode started
> Data reception started
Received: "hello lora world" (17 bytes) - [RSSI: 226, SNR: 14]
> sx126x set sf 11
sx126x set sf 11
sf set
> Data reception started
Received: "hello slow lora world" (22 bytes) - [RSSI: 226, SNR: 14]

Issues/PRs references

None

@aabadie aabadie added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: LoRa Area: LoRa radio support labels Mar 10, 2021
@aabadie aabadie requested a review from fjmolinas March 10, 2021 10:47
@aabadie aabadie requested a review from jia200x as a code owner March 10, 2021 13:08
@aabadie
Copy link
Contributor Author

aabadie commented Mar 10, 2021

The dependency resolution with Kconfig is missing the package modules. This is the reason of this failure.
@leandrolanzieri, is there any chance that this could be fixed without having to adapt the .murdock script ? (I'm putting aside on purpose the implementation in Kconfig of the dependency resolution of packages, too much work for now).

@leandrolanzieri
Copy link
Contributor

The dependency resolution with Kconfig is missing the package modules. This is the reason of this failure.
@leandrolanzieri, is there any chance that this could be fixed without having to adapt the .murdock script ? (I'm putting aside on purpose the implementation in Kconfig of the dependency resolution of packages, too much work for now).

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

@aabadie
Copy link
Contributor Author

aabadie commented Mar 10, 2021

I think adding something like the following should work ?

Thanks, that works! I don't know why I thought there's was no Kconfig support for package dependency resolution...

@aabadie aabadie force-pushed the driver_llcc68 branch 2 times, most recently from fe2a504 to 66bcd45 Compare March 11, 2021 12:49
@aabadie aabadie force-pushed the driver_llcc68 branch 3 times, most recently from f255fa6 to daa9a9f Compare March 15, 2021 17:49
@aabadie aabadie force-pushed the driver_llcc68 branch 3 times, most recently from 038e736 to 97108b8 Compare March 27, 2021 15:34
@aabadie aabadie changed the title drivers: add support for llcc68 radio drivers: add support for sx1261/2 and llcc68 radio devices Mar 27, 2021
@fjmolinas
Copy link
Contributor

@aabadie Is the mbed llc68 shield the default parameter configuration still?

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

Is the mbed llc68 shield the default parameter configuration still?

Yes, the pinout seems to be compatible.

@fjmolinas
Copy link
Contributor

Currently trying to tes with a p-nucleo-wb55 + an embed LLC68 shield, so far its stuck on boot:

2021-03-30 14:34:58,600 # main(): This is RIOT! (Version: 2021.04-devel-1185-g2e4eb-pr-16238)
2021-03-30 14:34:58,604 # [sx126x] init: SPI_0 initialized with success

Looking into why.

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

Looking into why.

It could be the Arduino pinout that is slightly different than other nucleo boards.

@fjmolinas
Copy link
Contributor

Looking into why.

It could be the Arduino pinout that is slightly different than other nucleo boards.

That was it thanks!

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

@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.

@fjmolinas
Copy link
Contributor

@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?

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

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.

@fjmolinas
Copy link
Contributor

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 :)

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

this can be left as a follow up but please add a big comment for this :)

Thanks, and comment added

@fjmolinas
Copy link
Contributor

@aabadie can you perform the test procedure again? I sadly only have one llc68 and no other LoRa device ATM.

@fjmolinas
Copy link
Contributor

@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 semtech_loramac integration. It worked fine for me. But if you can re-test again it would be better, since your testing was more extense :). Otherwise You please squash.

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

Ran the PR again between radio modules:

  • sx1261:
receiver
$ PORT=/dev/ttyACM1 DEBUG_ADAPTER_ID=0671FF554852707267103032  BOARD=nucleo-l476rg make -C tests/driver_sx126x flash term
make: Entering directory '/work/riot/RIOT/tests/driver_sx126x'
Building application "tests_driver_sx126x" for "nucleo-l476rg" with MCU "stm32".

"make" -C /work/riot/RIOT/pkg/driver_sx126x
"make" -C /work/riot/RIOT/build/pkg/driver_sx126x/src -f /work/riot/RIOT/pkg/driver_sx126x/driver_sx126x.mk
"make" -C /work/riot/RIOT/boards/nucleo-l476rg
"make" -C /work/riot/RIOT/boards/common/nucleo
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/stm32
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/stm32/periph
"make" -C /work/riot/RIOT/cpu/stm32/stmclk
"make" -C /work/riot/RIOT/cpu/stm32/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/sx126x
"make" -C /work/riot/RIOT/pkg/driver_sx126x/contrib
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/iolist
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  22152	    176	   3792	  26120	   6608	/work/riot/RIOT/tests/driver_sx126x/bin/nucleo-l476rg/tests_driver_sx126x.elf
For full programmer output add PROGRAMMER_QUIET=0 or QUIET=0 to the make command line.
 ✓ Flashing done! (programmer: 'openocd' - duration: 3.01s)
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-03-30 15:39:17,864 # Connect to serial port /dev/ttyACM1
Welcome to pyterm!
Type '/exit' to exit.
reboot
2021-03-30 15:41:55,800 # reboot
2021-03-30 15:41:55,811 # �in(): This is RIOT! (Version: 2021.04-devel-1189-g3e69f-driver_llcc68)
2021-03-30 15:41:55,821 # Initialization successful - starting the shell now
> sx126x get freq
2021-03-30 15:43:17,839 # sx126x get freq
2021-03-30 15:43:17,841 # Frequency: 868300000Hz
> sx126x get bw
2021-03-30 15:43:23,055 # sx126x get bw
2021-03-30 15:43:23,057 # Bandwidth: 125kHz
> sx126x get sf
2021-03-30 15:43:28,736 # sx126x get sf
2021-03-30 15:43:28,738 # Spreading factor: 7
> sx126x get cr
2021-03-30 15:43:34,089 # sx126x get cr
2021-03-30 15:43:34,089 # Coding rate: 1
> sx126x rx start
2021-03-30 15:43:41,730 # sx126x rx start
2021-03-30 15:43:41,731 # Listen mode started
> 2021-03-30 15:43:47,150 # Data reception started
2021-03-30 15:43:47,186 # Received: "hello lora world" (17 bytes) - [RSSI: 230, SNR: 13, TOA: 26ms]
sx126x set sf 11
2021-03-30 15:43:54,592 # sx126x set sf 11
2021-03-30 15:43:54,593 # sf set
> 2021-03-30 15:44:03,074 # Data reception started
2021-03-30 15:44:03,489 # Received: "hello slow lora world" (22 bytes) - [RSSI: 230, SNR: 8, TOA: 332ms]
sx126x set sf 12
2021-03-30 15:44:10,311 # sx126x set sf 12
2021-03-30 15:44:10,312 # sf set
> 2021-03-30 15:44:18,311 # Data reception started
2021-03-30 15:44:19,136 # Received: "hello slow lora world" (22 bytes) - [RSSI: 232, SNR: 5, TOA: 664ms]
2021-03-30 15:44:31,506 # Exiting Pyterm
sender
$ PORT=/dev/ttyACM0 DEBUG_ADAPTER_ID=005300273137510639383538 BOARD=nucleo-g431rb make -C tests/driver_sx126x flash term
make: Entering directory '/work/riot/RIOT/tests/driver_sx126x'
Building application "tests_driver_sx126x" for "nucleo-g431rb" with MCU "stm32".

"make" -C /work/riot/RIOT/pkg/driver_sx126x
"make" -C /work/riot/RIOT/build/pkg/driver_sx126x/src -f /work/riot/RIOT/pkg/driver_sx126x/driver_sx126x.mk
"make" -C /work/riot/RIOT/boards/nucleo-g431rb
"make" -C /work/riot/RIOT/boards/common/nucleo
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/stm32
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/stm32/periph
"make" -C /work/riot/RIOT/cpu/stm32/stmclk
"make" -C /work/riot/RIOT/cpu/stm32/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/sx126x
"make" -C /work/riot/RIOT/pkg/driver_sx126x/contrib
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/iolist
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  22820	    176	   3780	  26776	   6898	/work/riot/RIOT/tests/driver_sx126x/bin/nucleo-g431rb/tests_driver_sx126x.elf
For full programmer output add PROGRAMMER_QUIET=0 or QUIET=0 to the make command line.
 ✓ Flashing done! (programmer: 'openocd' - duration: 2.01s)
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-03-30 15:39:17,894 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
reboot
2021-03-30 15:41:57,744 # reboot
2021-03-30 15:41:57,753 # main(): This is RIOT! (Version: 2021.04-devel-1189-g3e69f-driver_llcc68)
2021-03-30 15:41:57,762 # Initialization successful - starting the shell now
> sx126x get freq
2021-03-30 15:43:18,911 # sx126x get freq
2021-03-30 15:43:18,913 # Frequency: 868300000Hz
> sx126x get bw
2021-03-30 15:43:23,919 # sx126x get bw
2021-03-30 15:43:23,920 # Bandwidth: 125kHz
> sx126x get sf
2021-03-30 15:43:29,479 # sx126x get sf
2021-03-30 15:43:29,481 # Spreading factor: 7
> sx126x get cr
2021-03-30 15:43:34,776 # sx126x get cr
2021-03-30 15:43:34,777 # Coding rate: 1
> sx126x tx "hello lora world"
2021-03-30 15:43:47,121 # sx126x tx "hello lora world"
2021-03-30 15:43:47,125 # sending "hello lora world" payload (17 bytes)
> 2021-03-30 15:43:47,179 # Transmission completed
sx126x set sf 11
2021-03-30 15:43:56,007 # sx126x set sf 11
2021-03-30 15:43:56,008 # sf set
> sx126x tx "hello slow lora world"
2021-03-30 15:44:02,720 # sx126x tx "hello slow lora world"
2021-03-30 15:44:02,724 # sending "hello slow lora world" payload (22 bytes)
> 2021-03-30 15:44:03,469 # Transmission completed
sx126x set sf 12
2021-03-30 15:44:13,526 # sx126x set sf 12
2021-03-30 15:44:13,526 # sf set
> sx126x tx "hello slow lora world"
2021-03-30 15:44:17,609 # sx126x tx "hello slow lora world"
2021-03-30 15:44:17,613 # sending "hello slow lora world" payload (22 bytes)
> 2021-03-30 15:44:19,099 # Transmission completed
2021-03-30 15:44:32,426 # Exiting Pyterm
  • llcc68:
receiver
$ LORA_DRIVER=llcc68 PORT=/dev/ttyACM1 DEBUG_ADAPTER_ID=0671FF554852707267103032  BOARD=nucleo-l476rg make -C tests/driver_sx126x flash term
make: Entering directory '/work/riot/RIOT/tests/driver_sx126x'
Building application "tests_driver_sx126x" for "nucleo-l476rg" with MCU "stm32".

"make" -C /work/riot/RIOT/pkg/driver_sx126x
"make" -C /work/riot/RIOT/build/pkg/driver_sx126x/src -f /work/riot/RIOT/pkg/driver_sx126x/driver_sx126x.mk
"make" -C /work/riot/RIOT/boards/nucleo-l476rg
"make" -C /work/riot/RIOT/boards/common/nucleo
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/stm32
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/stm32/periph
"make" -C /work/riot/RIOT/cpu/stm32/stmclk
"make" -C /work/riot/RIOT/cpu/stm32/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/sx126x
"make" -C /work/riot/RIOT/pkg/driver_sx126x/contrib
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/iolist
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  22152	    176	   3792	  26120	   6608	/work/riot/RIOT/tests/driver_sx126x/bin/nucleo-l476rg/tests_driver_sx126x.elf
For full programmer output add PROGRAMMER_QUIET=0 or QUIET=0 to the make command line.
 ✓ Flashing done! (programmer: 'openocd' - duration: 3.01s)
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-03-30 15:48:09,363 # Connect to serial port /dev/ttyACM1
Welcome to pyterm!
Type '/exit' to exit.
reboot
2021-03-30 15:48:23,278 # reboot
2021-03-30 15:48:23,289 # main(): This is RIOT! (Version: 2021.04-devel-1189-g3e69f-driver_llcc68)
2021-03-30 15:48:23,298 # Initialization successful - starting the shell now
> sx126x get freq
2021-03-30 15:48:26,848 # sx126x get freq
2021-03-30 15:48:26,851 # Frequency: 868300000Hz
> sx126x get bw
2021-03-30 15:48:32,839 # sx126x get bw
2021-03-30 15:48:32,840 # Bandwidth: 125kHz
> sx126x get sf
2021-03-30 15:48:37,743 # sx126x get sf
2021-03-30 15:48:37,745 # Spreading factor: 7
> sx126x get cr
2021-03-30 15:48:43,888 # sx126x get cr
2021-03-30 15:48:43,889 # Coding rate: 1
> sx126x rx start
2021-03-30 15:48:52,200 # sx126x rx start
2021-03-30 15:48:52,202 # Listen mode started
> 2021-03-30 15:48:57,526 # Data reception started
2021-03-30 15:48:57,561 # Received: "hello lora world" (17 bytes) - [RSSI: 225, SNR: 13, TOA: 26ms]
sx126x set sf 11
2021-03-30 15:49:02,216 # sx126x set sf 11
2021-03-30 15:49:02,217 # sf set
> 2021-03-30 15:49:08,230 # Data reception started
2021-03-30 15:49:08,272 # Received: "hello slow lora world" (22 bytes) - [RSSI: 225, SNR: 13, TOA: 332ms]
2021-03-30 15:49:16,894 # Exiting Pyterm
sender
$ LORA_DRIVER=llcc68 PORT=/dev/ttyACM0 DEBUG_ADAPTER_ID=005300273137510639383538 BOARD=nucleo-g431rb make -C tests/driver_sx126x flash term
make: Entering directory '/work/riot/RIOT/tests/driver_sx126x'
Building application "tests_driver_sx126x" for "nucleo-g431rb" with MCU "stm32".

"make" -C /work/riot/RIOT/pkg/driver_sx126x
"make" -C /work/riot/RIOT/build/pkg/driver_sx126x/src -f /work/riot/RIOT/pkg/driver_sx126x/driver_sx126x.mk
"make" -C /work/riot/RIOT/boards/nucleo-g431rb
"make" -C /work/riot/RIOT/boards/common/nucleo
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/stm32
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/stm32/periph
"make" -C /work/riot/RIOT/cpu/stm32/stmclk
"make" -C /work/riot/RIOT/cpu/stm32/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/sx126x
"make" -C /work/riot/RIOT/pkg/driver_sx126x/contrib
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/iolist
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  22820	    176	   3780	  26776	   6898	/work/riot/RIOT/tests/driver_sx126x/bin/nucleo-g431rb/tests_driver_sx126x.elf
For full programmer output add PROGRAMMER_QUIET=0 or QUIET=0 to the make command line.
 ✓ Flashing done! (programmer: 'openocd' - duration: 2.01s)
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-03-30 15:48:10,257 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
reboot
2021-03-30 15:48:24,886 # reboot
2021-03-30 15:48:24,895 # main(): This is RIOT! (Version: 2021.04-devel-1189-g3e69f-driver_llcc68)
2021-03-30 15:48:24,904 # Initialization successful - starting the shell now
> sx126x get freq
2021-03-30 15:48:27,887 # sx126x get freq
2021-03-30 15:48:27,889 # Frequency: 868300000Hz
> sx126x get bw
2021-03-30 15:48:33,671 # sx126x get bw
2021-03-30 15:48:33,672 # Bandwidth: 125kHz
> sx126x get sf
2021-03-30 15:48:38,687 # sx126x get sf
2021-03-30 15:48:38,688 # Spreading factor: 7
> sx126x get cr
2021-03-30 15:48:44,583 # sx126x get cr
2021-03-30 15:48:44,584 # Coding rate: 1
> sx126x tx "hello lora world" 
2021-03-30 15:48:57,496 # sx126x tx "hello lora world"
2021-03-30 15:48:57,500 # sending "hello lora world" payload (17 bytes)
> 2021-03-30 15:48:57,555 # Transmission completed
sx126x set sf 11
2021-03-30 15:49:02,984 # sx126x set sf 11
2021-03-30 15:49:02,984 # sf set
> sx126x tx "hello slow lora world"
2021-03-30 15:49:08,201 # sx126x tx "hello slow lora world"
2021-03-30 15:49:08,205 # sending "hello slow lora world" payload (22 bytes)
> 2021-03-30 15:49:08,265 # Transmission completed
2021-03-30 15:49:16,150 # Exiting Pyterm

@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

Squashed!

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK!

@aabadie aabadie merged commit 18a0889 into RIOT-OS:master Mar 30, 2021
@aabadie aabadie deleted the driver_llcc68 branch March 30, 2021 17:02
@aabadie
Copy link
Contributor Author

aabadie commented Mar 30, 2021

Thanks @fjmolinas !

@kaspar030 kaspar030 added this to the Release 2021.04 milestone Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: LoRa Area: LoRa radio support CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants