# Lorawan implementation using stm32f407vgtx disc1

**URL:** <https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899>\
**Category:** End Devices (Nodes)\
**Tags:** guide, end-devices\
**Created:** [May 8, 2023, 9:52am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899 "2023-05-08T09:52:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wattttheheck](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/wattttheheck/32/43619_2.png) [@wattttheheck](https://www.thethingsnetwork.org/forum/u/wattttheheck)\
**Post date:** [May 8, 2023, 9:52am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/1 "2023-05-08T09:52:24Z")

</div>

I am using STM32F4 board. I would want to implement lorawan with the same board. Could anyone provide me necessary resources (libraries, resources) to do so.

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [May 8, 2023, 9:59am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/2 "2023-05-08T09:59:46Z")

</div>

Easiest solution - given you will need a LoRa radio anyhow is perhaps just add a COTS LoRaWAN Module connected over UART/Serial then you dont have to worry about libs, LoRaWAN Stack implementation, application s/w integration (and anyLoRaWAN timing constraints), etc. so it ‘just works’! 🙂

Otherwise you will need it identify to the community which LoRa transciever you wish to target, and havent looked at whether the F4 you are considering has the resources needed to handle a modern LoRaWAN stack with correct MAC handling etc. (and still have room for your application) or if you would still need to add a supporting MCU running the stack.

---

<div class="post-metadata">

**Author:** ![wattttheheck](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/wattttheheck/32/43619_2.png) [@wattttheheck](https://www.thethingsnetwork.org/forum/u/wattttheheck)\
**Post date:** [May 8, 2023, 11:26am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/3 "2023-05-08T11:26:14Z")

</div>

Given that, I’m using a COTS LoRaWAN module connected through SPI, I’m requesting to share the libraries available for STM32F4 discovery board to implement LoRaWAN, if available.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 8, 2023, 11:56am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/4 "2023-05-08T11:56:36Z")

</div>

Have you checked what STM has to offer? They have a lorawan module for their development environment.

---

<div class="post-metadata">

**Author:** ![wattttheheck](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/wattttheheck/32/43619_2.png) [@wattttheheck](https://www.thethingsnetwork.org/forum/u/wattttheheck)\
**Post date:** [May 8, 2023, 12:20pm UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/5 "2023-05-08T12:20:50Z")

</div>

Yes, but the issue is that the application I am using requires wolfSSL, which is not supported by the b-l072z-lrwan1 board. The challenge I am facing is that I want to port the necessary libraries so that I can implement LoRaWAN on the STM32F4 Discovery board with an externally connected LoRa module. I would appreciate some help with this.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 8, 2023, 1:46pm UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/6 "2023-05-08T13:46:00Z")

</div>

If your application uses SSL, why do you need LoRaWAN (a very small bandwidth protocol)?

The STM development environment provides the required sources to drive an SPI connected LoRa module. You will need to modify the code/settings if you are not using the board it is primarily targeted for.

Another option is to go to GitHub and search for [LoRaMAC-node](https://github.com/Lora-net/LoRaMac-node) or [LMIC](https://github.com/mcci-catena/arduino-lmic).

Or get yourself a UART connected LoRaWAN module and use that. A whole lot less hassle as it has a lorawan certified stack and reliefs you of implementing the very timing critical code.

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [May 8, 2023, 4:15pm UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/7 "2023-05-08T16:15:30Z")

</div>

> [@kersing](#):
>
> Or get yourself a UART connected LoRaWAN module

@wattttheheck As above! 🙂 Far easier 🙂

> [@Jeff-UK](#):
>
> Easiest solution … just add a COTS LoRaWAN Module connected over UART/Serial then you dont have to worry

> [@wattttheheck](#):
>
> I’m using a COTS LoRaWAN module

Which one? or do you mean a LoRa module? otherwise no need for

> [@wattttheheck](#):
>
> libraries available for STM32F4 discovery board to implement LoRaWAN

As that is what is running on the LoRa **WAN** module with its own internal stack hence no need for LoRaWAN libs? You just send messages over UART/serial from your F4 board, and the LoRaWAN module takes care of the associated transmission and reception activities related to RF & LoRaWAN…

---

<div class="post-metadata">

**Author:** ![chrisr1](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@chrisr1](https://www.thethingsnetwork.org/forum/u/chrisr1)\
**Post date:** [May 15, 2023, 9:13am UTC](https://www.thethingsnetwork.org/forum/t/lorawan-implementation-using-stm32f407vgtx-disc1/62899/8 "2023-05-15T09:13:05Z")

</div>

A bit of confusion here ?  
First you wish to use a F407 board, now a B-L072 board?  
You might try the WL55 board that has F4 and F0 in the same module.

The ST libraries pointed to by kersing are good, and od the whole job.  
You will need to integrate the wolff SSL libraries , or use an alternate SSL layer and adapt your application code.

Using a UART LoRa module will also work, this is effectively what the WL55 module is.  
The STM offering works well using cube.
