I installed the software for the Elecrow LoRaWAN gateway (see Low-Cost LoRaWAN Gateways! ), and enabled the gateway on The Things Network (TTN). I used Raspberry OS bullseye 32-bit lite on a Raspberry Pi A+. I tested this on a B+ with the same OS too.
Instructions from Elecrow: https://www.elecrow.com/wiki/index.php?title=LR1302_LoRaWAN_Gateway_Module
Preparation
sudo apt-get update
sudo apt install -y git
cd ~
run sudo raspi-config to enable
- i2c,
- SPI and
- Serial Port. For Serial Port, do not allow console (question 1: no), but allow enabling of the port (question 2: yes).
Build the software
The following section is different than the vendor's instructions:
clone https://github.com/Elecrow-RD/LR1302_loraWAN.git
cd LR1302_loraWAN
cd LR1302_HAL
cd sx1302_hal
back to the existing instruction
make
Create new TTN Gateway
If you don't have an account yet, create one. Select the suggested settings for your location. Once logged in, navigate to the console. Select Gateways
Register your new Gateway. Accept the suggested frequency and setup. I used https://descartes.co.uk/CreateEUIKey.html to generate an ID
Then download the json file that's created for you. It holds some of the settings you 'll need to update in the gateway's config file later.
Configure the packet_forwarder
The following section is different than the vendor's instructions:
cd packet_forwarder
nano global_conf.json.sx1250.EU868
I had to change this line extra, not in instructions:
"gps_tty_path": "/dev/ttyS0",
back to the existing instruction
change the EUI in the config file, and check the TTN server URL. Save
The following section is different than the vendor's instructions:
chmod +x reset_lgw.sh
Test
back to the existing instruction
./lora_pkt_fwd -c global_conf.json.sx1250.EU868
You will get a log of what's happening:
The TTN console confirms it found you:
And after some time, you will appear on the maps: https://ttnmapper.org/heatmap/
I've tested with an Arduino MKR 1310, and all worked fine:
Proper install of all software (covered fully in the next blog)
There's more than this. To install all software in a location of your choice, check the instructions on git: https://github.com/Elecrow-RD/LR1302_loraWAN/blob/master/LR1302_HAL/sx1302_hal/readme.md
first edit target.cfg, and set your user name and location where to install (must exist)
Then
make install
make install_conf
Full install post: Set up Elecrow TTN LoRaWAN gateway on Raspberry Pi - Pt. 2: full install and run as service
Enjoy
Top Comments