Coder Social home page Coder Social logo

seeed-lora-e5's Introduction

Seeed-LoRa-E5

LoRaWAN end node built from scratch using STM32CubeIDE/CubeMX for the LoRa-E5 WLE5x

UPDATE 9 May 2023: you are invited to test the FW1.3 branch, which is the result of letting STM32CubeIDE update to V1.3 FW. I haven't tested it yet but I expect it will work. If you do test it, please let me know and I'll merge it to master.

UPDATE 14 July 2022: I reviewed the V1.2FM merge, enabled LoRaWAN 1.0.4 support (including NV storage of devNonce) and tested in Class A, turning the red LED on and off. I apologize for the flurry of updates in master; future updates will be done properly in a branch.

NOTE: I did a quick merge of STM32WLxx V1.2 firmware support. Basic testing shows it works correctly but please let me know if you encounter any issues.

If you're looking for an RAK3172 version of this, have a look at https://github.com/danak6jq/RAK3172

Note: the project defaults to disabling SWD/probe pins and enabling low-power mode. For development with an ST/Link, I recommend enabling the debugger and disabling low-power mode.

image

This assumes a general familiarity with STM32CubeIDE and LoRaWAN concepts.

If you haven't used STM32CubeIDE before, I suggest doing a couple of smaller projects using ST Nucleo boards to familiarize yourself.

From the Seeed-Studio repo: Before starting

image

  • Before erasing the Seeed factory AT firmware, get the Device EUI. Connect a USB-C cable to the LoRa-E5, and send AT command AT+ID=DevEui to get your Device EUI:

image

  • Do not lose this Device EUI; it is unique for each LoRaWAN device. If you manage to lose the Device EUI, you are able to retrieve it by scanning the QR code on the LoRa-E5 chip using a generic QR code scanner.

Building the repo

  • Clone this repo onto a system with STM32CubeIDE, v1.7.0 or later. Using "Open Projects From Filesystem"

image

  • Locate and open the top-level directory of the cloned repo:

image

  • Modify your Device EUI, Application EUI, Application KEY and your LoRawan Region

  • Use Cube to reconfigure the project to your LoRaWAN commissioning parameters:

image

and

image

  • Save the IOC file and generate code when prompted:

image

image

  • Note that generating code overwrites many files; in particular, if you've selected Hybrid Mode to operate a in a sub-band, you need to check and correct the channel mask after generating code - example here is for US915 Sub-band 2:

image

  • Build project and program it into the LoRa-E5

image

image

Starting a new project

  • Use "Start a new project from an existing configuration file" and select "Seeed-LoRa-E5.ioc" in the repo

image

  • This creates a new "End client framework" project with no user code (such as contained in the repo code) included. You'll want to refer to the repo code and ST documentation for using their LoRaWAN stack.

seeed-lora-e5's People

Contributors

cremus avatar danak6jq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seeed-lora-e5's Issues

SX126x SPI to ARM

Can you please tell us if you can in addition to SPI, on what other pins to the MCU is the SX126x integrated, Busy and SPI select.... etc?

Issue building project

Hi
I have the latest ST Cube MX, IDE etc, and having issues with building the project.

I done the following:

  1. Copied the code from here into my working folder.
  2. Tried opening the project in the IDE, but nothing there.
  3. I opened the project in the cubeMX and created the project, then tried opening project, but again no project within the IDE was displayed.

Do I have to load a project in first, before loading (overwriting ) files from this page?

Many Thanks
Scott

Add example or tutorial

Hi,

Nice work it's not an issue but it would be nice to add examples how to use your repo step by step with Lora-e5

Modifying Pinout - IOC Code Regeneration Question

Building with the default configuration works fine. That said, when changing the pinout in CubeMX (e.g., enabling I2C1) regenerating the code throws several errors as shown below regarding lora_app_version.h not being found. Am I missing something basic?

I'm hoping to use the I2C and UART interfaces on the STM32WL in the LoRa-E5 module, but have had trouble getting over this hump. Thanks!

image

P2P application with LoRa-E5 mini

Hello,
I'm currently trying to make a P2Pproject using SubGHz with a LoRa-E5 (like the pingpong exemple from ST)
But when I try to replace LoRaWAN layer by a ping pong application, SUBGHZSPI_Transmit return HAL_SUBGHZ_ERROR_TIMEOUT.
And when I try to start a new project from your ioc file, radio events never occured (OnTxDone onRxDone...).
Do you have more informations, or tips to make a P2P application with a LoRa-E5 mini ?

Thanks

Hugo

TTN/HeliumConsole Payload Decoder

I'm working on a GPS Tracker based on a LoRa-E5.
Now I'm facing a problem... I can't figure out how to decode the Payload. I found the section in code where the formatting is done (lora_app.c) but reversing it gives me a lot of trouble.
Is out there in the WWW a Decoder that I overlooked? Or maybe you have one at hand?

I thank you for the great work you've done with the "Clean" file! Seed should use your example! :)

IOC file generate fault code

Hi
I have configured pin ADC in ioc file, but ioc file generate faulty code. Debug or GPIO works but i can not generate adc pin.

Add support for RAK3172 module

RAK3172 is nearly identical to the LoRa-E5, differing only in the GPIOs used for antenna control. A simple change to the BSP driver will suffice. Need hardware to test on.

FreeRTOS with LoRaWAN

Hi.

I have been experiencing issues when enabling FreeRTOS with this code.

Anyone having same issues? or have been able to run FreeRTOS with LoRaWAN for Seeed LoRa-E5 Dev Board?

when I enable FREERTOS, lora_app also gets modified and produces error

er1

"Description Resource Path Location Type
'CFG_SEQ_Prio_0' undeclared (first use in this function) lora_app.c line 518 C/C++ Problem
"

Description Resource Path Location Type
'CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent' undeclared (first use in this function) lora_app.c line 517 C/C++ Problem

I need to have FREERTOS enabled since I am building a CLASS C device in which there will be a button that can be triggered anytime to display certain info.

I cant do this on the main loop due to LoRaWAN restrictions (timing issues).

Not an issue but an idea

Hi @danak6jq this is not an issue but maybe an idea, it would be nice to have ping-pong example from ST working with lora-e5, this example is full LoRa example without LoRaWan and I think it would be nice to have it in you repo ;)

Change default to use STM32WL internal EUI

Not everyone will want this, it's configurable in the IOC (and a production app will configure it elsewhere), but I will change to use the internal (static) EUI. Only problem is fetching it from the MCU first time, one really has to watch the serial logging messages

IN865 - downlink not working in Class-A (MAC rxTimeOut)

First of all thanks for the clean example.

I'm trying to do send downlink on Port 2(for led) but when I send downlink from chirpstack I'm getting IRQ_RX_TX_TIMEOUT can you give me some hint where to look ?

Also funny thing is In Class-C downlink works properly.

MW_LORAWAN_VERSION: V2.3.0
MW_RADIO_VERSION:   V1.1.0
###### OTAA ######
###### AppKey:      8B:0C:9A:82:E6:74:A5:11:B9:E5:26:A9:11:87:EB:84
###### NwkKey:      8B:0C:9A:82:E6:74:A5:11:B9:E5:26:A9:11:87:EB:84
###### ABP  ######
###### AppSKey:     2B:7E:15:16:28:AE:D2:A6:AB:F7:15:88:09:CF:4F:3C
###### NwkSKey:     2B:7E:15:16:28:AE:D2:A6:AB:F7:15:88:09:CF:4F:3C
###### DevEui:  2C:F7:F1:20:24:90:0E:A5
###### AppEui:  01:01:01:01:01:01:01:01
###### DevAddr: 05:03:EF:F5
1640001408s476:TX on freq 865402500 Hz at DR 0
1640001409s981:MAC txDone
1640001415s005:RX_1 on freq 865402500 Hz at DR 0
1640001416s824:MAC rxDone

###### = JOINED = OTAA =====================

###### ========== MCPS-Indication ==========
1640001418s499:temp= 21
1640001418s499:VDDA= 254
1640001418s503:TX on freq 865062500 Hz at DR 0
1640001418s516:SEND REQUEST
1640001420s162:MAC txDone
1640001421s187:RX_1 on freq 865062500 Hz at DR 0
1640001422s349:MAC rxDone
1640001422s352:VDDA= 254

###### ========== MCPS-Confirm =============

###### ========== MCPS-Indication ==========
1640001428s499:temp= 21
1640001428s499:VDDA= 254
1640001428s503:TX on freq 865985000 Hz at DR 0
1640001428s516:SEND REQUEST
1640001430s326:MAC txDone
1640001431s351:RX_1 on freq 865985000 Hz at DR 0
1640001432s513:MAC rxDone

###### ========== MCPS-Confirm =============

###### ========== MCPS-Indication ==========
1640001438s499:temp= 21
1640001438s499:VDDA= 254
1640001438s503:TX on freq 865402500 Hz at DR 0
1640001438s516:SEND REQUEST
1640001440s162:MAC txDone
1640001441s187:RX_1 on freq 865402500 Hz at DR 0
1640001442s349:MAC rxDone

###### ========== MCPS-Confirm =============

###### ========== MCPS-Indication ==========
1640001448s499:temp= 20
1640001448s499:VDDA= 254
1640001448s503:TX on freq 865985000 Hz at DR 0
1640001448s516:SEND REQUEST
1640001450s162:MAC txDone
1640001451s187:RX_1 on freq 865985000 Hz at DR 0
1640001452s349:MAC rxDone

###### ========== MCPS-Confirm =============

###### ========== MCPS-Indication ==========
1640001458s499:temp= 21
1640001458s499:VDDA= 254
1640001458s503:TX on freq 865062500 Hz at DR 0
1640001458s516:SEND REQUEST
1640001460s162:MAC txDone
1640001461s187:RX_1 on freq 865062500 Hz at DR 0
1640001461s394:IRQ_RX_TX_TIMEOUT
1640001461s394:MAC rxTimeOut
1640001462s150:RX_2 on freq 866550000 Hz at DR 2
1640001462s226:IRQ_RX_TX_TIMEOUT
1640001462s226:MAC rxTimeOut
1640001465s115:TX on freq 865402500 Hz at DR 0
1640001466s773:MAC txDone
1640001467s797:RX_1 on freq 865402500 Hz at DR 0
1640001468s499:temp= 22
1640001468s499:VDDA= 254
1640001468s959:MAC rxDone

EXTI_IRQHandler not generated from .ioc

Hello, I really love your repo because it helps me a lot. It's been working fine using the 1.2.0 FW of WLE5.
Everything is good except I find that the .ioc file is not generating EXTI_IRQHandler to stm32wlxxit.c if I set a GPIO as external interrupt.
Maybe, would you take a look at this issue?

Any help for this issue is appreciated. Thanks!

Using USART1 for IrDA

Hello,

I want to change the USART1 to IrDA mode. To do that I have change the Platform settings of the LoRaWAN to USART2 and that is all good. But when I generate the code and compile, it gives me an error in the usart_if.c file :

C:/work/Seeed-LoRa-E5/Debug/../Core/Src/usart_if.c:217: undefined reference to `hdma_usart2_tx'

Do you have any idea to resolve this issue ?

Thanks for your code, that is my only problem,

Pablo

Use the code on custom boards

Hello,

I have one custom board and want to connect it to Helium. I've done this using esp32 + grove lora-e5 module. I also got the lora-e5 mini board but I cannot program it. I changed RDP to AA using cubeProgrammer but I'm not sure if this is the AT firmware cleaning or I have to do sth else. I didn't understand the section on seeed blog for lora-e5 mini (you also linked that in your readme).

My final goal is to program my own board and connect it to TTN or Helium. What should I do in order to use your code on my board? Should I just disable pinout configs for push buttons and LEDs? Which ones I have to keep and not change? I try to start a project with stm32wl MCUs but I see the LoRaWAN option in cubeMX is disabled. I'm totally confused here and found your repo as a from scratch gude which I appreciate. If you have any thought that can help me solve this problem, I would be appreciated :)

Thank you,
Isaac

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.