pkg/radiolib: add RadioLib as external package#22271
Conversation
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Declare RiotHal class inheriting RadioLibHal with all pure-virtual overrides. Expose pkg/radiolib/include/ via Makefile.include. Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Implement all RadioLibHal pure-virtual methods using RIOT periph/gpio, periph/spi, and ztimer APIs. Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Murdock results❌ FAILED 6e5a7c7 tests/pkg/radiolib: add SX1276 PingPong test on b-l072z-lrwan1 Build failures (16)
Artifacts |
- add Doxygen /** doc blocks to all override methods - wrap C includes in extern "C" block - guard entire C++ content with #ifdef __cplusplus Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
Upstream RadioLib triggers -Wmissing-braces in Cryptography.cpp (subobject initialization) and -Woverloaded-virtual in LR11x0 (getTimeOnAir/setOutputPower hide base class overloads). Both are upstream code issues outside RIOT control. Signed-off-by: Baptiste Le Duc <baptiste.leduc@etik.com>
There are 20 of them available on IoT-LAB: https://www.iot-lab.info. See https://www.iot-lab.info/docs/boards/st-b-l072z-lrwan1/ You can book an experiment on the testbed and use "IOTLAB_NODE=auto" with |
Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
Oh thanks ! Is it expected to manually reset the node after each flash? Running make flash term with |
Normally the node is reset automatically after flashing but the boot message might be missed before you attached to the serial port. |
|
It seems not. I also tested with define default-flash-recipe
$(call check_cmd,$(FLASHER),Flash program)
$(PROGRAMMER_FLASH)
endef
flash-recipe ?= $(default-flash-recipe)It could be fixed by adding this patch : diff --git a/dist/testbed-support/makefile.iotlab.single.inc.mk b/dist/testbed-support/makefile.iotlab.single.inc.mk
index 6f35fcee40..2bc52172c0 100644
--- a/dist/testbed-support/makefile.iotlab.single.inc.mk
+++ b/dist/testbed-support/makefile.iotlab.single.inc.mk
@@ -215,6 +215,14 @@ else
endif
+define iotlab-flash-recipe
+ $(call check_cmd,$(FLASHER),Flash program)
+ $(PROGRAMMER_FLASH)
+ $(call check_cmd,$(RESET),Reset program)
+ $(PROGRAMMER_RESET)
+endef
+flash-recipe = $(iotlab-flash-recipe)
+
ifneq (,$(filter firefly iotlab-a8-m3 zigduino,$(BOARD)))
# Debugger not supported on these boards
DEBUGGER = |
- Wire board pins via RiotHal (SPI1, NSS/DIO0/RESET/DIO1 from board.h). - TX/RX selected at build time with -DRADIOLIB_TEST_TX. - Enable radiolib_sx127x in pkg build and dep files. Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
I opened a dedicated PR for that: #22287 |
Two-node blocking PingPong using RadioLib transmit()/receive() at 868 MHz. Build with PING=1 for the initiating node, default for the responder. Debug output (RSSI, SNR, frequency error, RX timeouts) gated behind ENABLE_DEBUG. Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
|
The PingPong test in |
Contribution description
This PR adds RadioLib as an external package (
pkg/radiolib), providing a universal radio transceiver library for RIOT applications. This is particularly useful for #22267, as the SeeedStudio T1000-E board carries a Semtech LR1110 LoRa transceiver not currently supported natively in RIOT.The package integrates RadioLib via RIOT's standard
pkg/mechanism and includes:radiolib_core,radiolib_utils,radiolib_physicallayer,radiolib_lr11x0)pkg/radiolib/contrib/radiolib_riotos.{h,cpp}) implementingRadioLibHalusingperiph/gpio,periph/spi, andztimerTesting procedure
Tested on the
b-l072z-lrwan1(SX1276, supported by RadioLib) using the IoT-LAB testbed (Saclay site).Build:
Hardware (IoT-LAB, 2× b-l072z-lrwan1, Saclay):
The
tests/pkg/radiolibapplication includes a SX1276 PingPong test. Flashed on two nodes; one transmits a Ping, the other receives and replies with a Pong. Both nodes exchanged packets successfully.Issues/PRs references
#22267
Declaration of AI Tools / LLMs usage