How to build a LoRaWAN gateway

Revision as of 14:24, 10 April 2019 by Registered User

Template:ArticleMainWriter Template:ArticleFirstDraftVersion


1. Article purpose[edit source]

This article explains the steps to create your own LoRaWan gateway for the Distribution Package of the OpenSTLinux distribution with the BitBake tool. It also shows how to deploy the results of the cross-compilation on the target.

2. Prerequisites[edit source]

The prerequisites from Installing the OpenSTLinux distribution must be executed.

The board and the host machine are connected through an Ethernet link, and a remote terminal program is started on the host machine: see How to get Terminal.

The target is started, and its IP address (<board ip address>) is known.

This LoRaWan gateway is based on the RAK831

Info white.png Information
more informations about this componant can be found here : https://www.rakwireless.com/en/WisKeyOSH/RAK831


3. Creation of the LoRaWan gateway build[edit source]

To start you need to add the LoRaWan gateway layer to your Distribution Package environment.

 cd <working directory path of distribution>/openstlinux-4.19-thud-mp1-19-02-20/layers/meta-st
 git clone "https://gerrit.st.com/stm32mpuapp/meta/meta-st-stm32mpu-app-lorawan"


The next step is to create the build for the LoRaWan gateway

 cd <working directory path of distribution>/openstlinux-4.19-thud-mp1-19-02-20
 DISTRO=openstlinux-weston-extra MACHINE=stm32mp1-lorawan-a7 source layers/meta-st/scripts/envsetup.sh
 bitbake st-image-lorawan

This may take some time. You can grab some coffee.

The final step is to populate the SD card: see How to populate the SD card with dd command

 cd tmp-glibc/deploy/images/stm32mp1-lorawan-a7/scripts/
 ./create_sdcard_from_flashlayout.sh ../flashlayout_st-image-lorawan/FlashLayout_sdcard_stm32mp157c-lorawan-a7-mx-trusted.tsv
 sudo umount `lsblk --list | grep mmcblk0 | grep part | gawk '{ print $7 }' | tr '\n' ' '`
 sudo dd if=../flashlayout_st-image-lorawan/../flashlayout_st-image-lorawan_FlashLayout_sdcard_stm32mp157c-lorawan-a7-mx-trusted.raw of=/dev/mmcblk0 bs=8M conv=fdatasync status=progress


You can now put the SD card in the right place.
Don't forget to plug the RAK831 on the right pins. Using the converter board is recommended to avoid any trouble.

4. Launching the binaries on the board[edit source]

In this part, Template:Board $ cc

No categories assignedEdit