Seeed-Studio / LoRaWan-E5-Node

Applications on LoRa-E5 mini/ LoRa-E5 Development Kit with v1.1.0 STM32Cube MCU Package for STM32WL series(SDK)
56 stars 26 forks source link

LoRa-E5-LoRaWAN-End-Node

This guide is for LoRa-E5 mini/ LoRa-E5 Development Kit aiming at building several applications with STM32Cube MCU Package for STM32WL series(SDK).

Note: We have now updated the library to support v1.1.0 which is the latest version of STM32Cube MCU Package for STM32WL series.

Before starting

connection

GPIO Configuration Overview

SDK Example Label GPIO of NUCLEO-WL55JC GPIO of LoRa-E5 Mini and LoRa-E5 Dev Board
RF_CTRL1 PC4 PA4
RF_CTRL2 PC5 PA5
RF_CTRL3 PC3 None
BUT1 PA0 PB13 (Boot Button)
BUT2 PA1 None
BUT3 PC6 None
LED1 PB15 None
LED2 PB9 PB5
LED3 PB11 None
DBG1 PB12 PA0 (D0 Button)
DBG2 PB13 PB10
DBG3 PB14 PB3
DBG4 PB10 PB4
Usart Usart2(PA2/PA3) Usart1(PB6/PB7)

Getting Started

1. Build the LoRaWAN End Node Example

pir

pir

pir

build

pir

Now we will modify our Device EUI, Application EUI, Application KEY and LoRawan Region

// LoRaWAN/App/se-identity.h

/*!
 * App/Join server IEEE EUI (big endian)
 */
#define LORAWAN_JOIN_EUI                                   { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07 }
// LoRaWAN/App/se-identity.h

/*!
 * end-device IEEE EUI (big endian)
 */
#define LORAWAN_DEVICE_EUI                                 { 0x2C, 0xF7, 0xF1, 0x20, 0x24, 0x90, 0x03, 0x63 }

/*!
 * Network root key
 */
#define LORAWAN_NWK_KEY                                    2B,7E,15,16,28,AE,D2,A6,AB,F7,15,88,09,CF,4F,3C

pir

// LoRaWAN/App/lora_app.h

/* LoraWAN application configuration (Mw is configured by lorawan_conf.h) */
/* Available: LORAMAC_REGION_AS923, LORAMAC_REGION_AU915, LORAMAC_REGION_EU868, LORAMAC_REGION_KR920, LORAMAC_REGION_IN865, LORAMAC_REGION_US915, LORAMAC_REGION_RU864 */
#define ACTIVE_REGION                               LORAMAC_REGION_US915

pir

pir

pir

pir

You will see the message Download verified successfully, once programming is finished.

pir

Note: LoRa-E5 only supports high power output mode, so you can't use these macro definitions in radio_board_if.h :

#define RBI_CONF_RFO     RBI_CONF_RFO_LP_HP
// or
#define RBI_CONF_RFO     RBI_CONF_RFO_LP

Eventhough RBI_CONF_RFO is defined as RBI_CONF_RFO_LP_HP in radio_board_if.h, it will not be used because USE_BSP_DRIVER is defined and BSP_RADIO_GetTxConfig() function returns RADIO_CONF_RFO_HP