1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/drivers/rn2xx3
Hugues Larrive 3c465836f2 examples and tests: add atmega8 to relevent Makefile.ci
using dist/tools/insufficient_memory/add_insufficient_memory_board.sh
2023-07-11 21:22:02 +02:00
..
app.config.test tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
main.c tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
Makefile tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
Makefile.ci examples and tests: add atmega8 to relevent Makefile.ci 2023-07-11 21:22:02 +02:00
README.md treewide: replace occurrences of tests/driver_ with new path 2023-05-06 15:38:21 +02:00

About

This is a manual test application for testing RN2483/RN2903 LoRa Microchip modules:

RN2483 can be used in Europe region and RN2903 in US region.

For easy testing, those modules can be found soldered on Bee-like layout. To run this test with this kind of setup, you need to connect the following pins of the Bee-like module to your board:

  • UART RX
  • UART TX
  • VCC (3V3)
  • GND

NOTE: when you use an Arduino Wireless Proto shield, the RN2483/RN2903 module can potentially be connected to the same UART as RIOTs standard out. This is the case for Arduino UNO, and most of the Nucleo 64 boards. In this case you must redefine STDIO_UART_DEV to another UART interface in the board.h and connect a UART-to-USB adapter to that UART. This is not the case with Arduino-zero or some Nucleo144 boards.

Build and flash the application

Use the DRIVER variable to select the right driver module between rn2483 and rn2903 depending on your region. Example in EU:

    make DRIVER=rn2483 BOARD=arduino-zero -C tests/drivers/rn2xx3 flash term

Usage

For testing the LoRaBee driver, use the shell commands provided by this test application: sys and mac:

  • sys contains subcommands for controlling the device at a low-level
  • mac contains subcommands for connecting to a LoRaWAN network, sending, receiving paquets and getting/setting some LoRaMAC parameters.

The full list of available parameters for each command is described in the following documents:

  • For EU region (868MHz and 433MHZ bands): RN2483
  • For US region (915MHZ band): RN2903

The radio level commands are not supported by this driver (yet).

Examples of commands:

  • Reset the module:
    > sys reset
    RN2483 1.0.1 Dec 15 2015 09:38:09
  • Put the module into sleep (5s is the default):
    > sys sleep
  • Set a LoRaMAC dev eui (put yours instead of the fake one given as example here), 8 bytes in hex string representation:
    > mac set deveui 0000000000000000
  • Set a LoRaMAC application eui, 8 bytes in hex string representation:
    > mac set appeui 0000000000000000
  • Set a LoRaMAC application key, 16 bytes in hex string representation:
    > mac set appkey 00000000000000000000000000000000
  • Save your parameters in the module EEPROM. After that, setting deveui, appeui, appkey is not required anymore, even after rebooting the module:
    > mac save

Warning: when using OTAA activation, it's important to not use mac save after joining the network. Thus, before starting the join procedure, ensure a null devaddr is written to the EEPROM:

    > mac set devaddr 00000000
    > mac save
  • Join your network using Other-the-air-activation:
    > mac join otaa
  • Send data AAAA to the LoRaWAN server:
    > mac tx AAAA