cancel
Showing results for 
Search instead for 
Did you mean: 

Step by Step guide on how to config LoRaWAN from scratch for a custom board

IKarg.1
Associate II

Hi,

I'm a new user of STM MCUs. I have a custom board with stm32wle5 on it, and I try to config the lorawan to send data to Helium. I searched over the internet, but all the examples are based on the Nucleo board and use a pre-configured .ioc file. Is there any step-by-step guide on configuring Lora from scratch on a custom board? how to do the config in cubeMX and write a simple code just to send a number. There are many documents and videos but non of them helped me. I'm completely lost here.

Thank you

12 REPLIES 12
Andrew Neil
Evangelist III

There's really two separate issues here

  1. The IOC file is really just about the microcontroller hardware - GPIO allocations, clocks, etc. Nothing specific to LoRaWAN.
  2. The LoRaWAN settings - credentials, frequency bands, etc - are not dependent on the hardware.

Which one is it that you're asking about?

IKarg.1
Associate II

I think there is a config part in lorawan in ioc file and the codes generated in lora_app.c to send data. I used the code in the stm32cubeWL examples, set the info that I got from Helium like app eui and app key, and built the code but I cannot see anything on the Helium dashboard. I try to use the same code as examples to send fake data. I just copy paste stuff but don't know what I'm doing. Need some guides about necessary steps to make the connection and send data. Either it is IOC file or lora configs in the code.

@IKarg.1​ "I just copy paste stuff but don't know what I'm doing"

Rather than leaping straight into making a custom board, I would strongly suggest getting started with a Nucleo.

Follow this video series on getting connected to TTN:

https://www.youtube.com/watch?v=vuc6914B0KM

Also this workshop series:

https://www.youtube.com/watch?v=SJkZ9FQ2gr8

Once you've gained familiarity on the Nucleo, then you should be in a better position to proceed with a custom design (and a different network).

Thank you for the links. I have watched all of them. I'm asking sth else. Even with the development boards, they had to start from scratch and config lora simply. Not loading a pre-configured one and continue from there. I can easily buy a board and load an example and be happy. They should focus on the chip, not the board.

Well, we'll have to disagree on that one!

I find it far more useful to have a known-good example to start from.

As I said, once you've gained familiarity & understood that, you can see what needs to be tweaked for a custom board.

It also gives a reference for when your custom board doesn't work - you can go back and look at the original, and see where things go awry.

And it far easier to get support on a well-known, standard platform.

If you really want to go from scratch, you could work direct from the Semtech code...

IKarg.1
Associate II

Thank you guys. I ordered a development board. I ordered a lora-e5 mini before but couldn't connect to it (I connected to it and changed the RDP to AA but cannot program it through cubeide). I ordered a new nucleo-wl55jc this time.

Thanks again

highimpedance
Associate III

hi IKarg.1,

I've tried same things like you.

I have a B-L072Z-LRWAN1 board.

Firstly, I tried suggested Ardunio example of this board and it worked. But I want to connect and send/receive messages by compiling STCUBEIde project.

I tried STM32CubeExpansion_LRWAN_V2.1.0 library that downloaded from ST production page. I am able to compile LoRaWAN_End_Node example changed DevEui, AppEui and Appkey and some other "#define bla bla" configuraitons. I managed to see Join Accept on the hellium console but on the COM port serial monitor it says "rxtimeout" several times and then says "JOIN FAILED".

So I agree with you if possible a guide document of ST or of Hellium shared for developers.

If I managed to JOIN the network I can share my code too.

Maybe any other may help us. Thanks

Hi dear friend

Did you manage to connect to Helium network?

If possible, share your codes

And is it possible to help me to connect to Helium network?

Yes, jSALA.1 I managed to join with ardunio project but still I could not join by stm32 project.
I am not working on it for months.
STM32CubeExpansion_LRWAN_V2.1.0 maybe you can try.