In this post I will show you how to setup an OpenWRT based LoRaWAN gateway with Ci40 and iC880a. It has a user-friedly interface to config parameters.
- IMST iC880a SPI concentrator board
- Pigtail for antenna
- Power Supply 2A with micro USB
- MicroSD card
- RPi to iC8880a interface
Ci40 has a 40-pin header which is though not 100% compatible with Raspberry Pi. The header make it possible to connect lots of Raspberry Pi HATs such as this backplane from Tindie.
|iC880a||Description||RPi pin||Ci40 pin|
|21||Supply 5V||2||5v to Raspberry Pi board|
|17||SPI Nss||24||SPI_M0_CS2 (MFIO_28)|
Setting up the software
At first, please following the instruction to prepare the OpenWrt on SD card. I prefer the SD card boot not normal because I want to save lifecycles of NAND FLASH on my board.
Install LoRa packages
From computer log in your Ci40 from serial or ssh.
$ opkg install libc_1.1.15-1_pistachio.ipk
$ opkg install libloragw_5.0.1-1_pistachio.ipk
$ opkg install lora-gateway-tests_5.0.1-1_pistachio.ipk
$ opkg install lora-gateway-utils_5.0.1-1_pistachio.ipk
$ opkg install packet-forwarder-utils_4.0.1-1_pistachio.ipk
$ opkg packet-forwarder_4.0.1-1_pistachio.ipk
$ opkg luci-app-pkt-fwd_1.0-1_all.ipk
You have all the necessary programs to start your LoRa gateway.
In my configuration, I use global_conf.json only and it will be automatically generated by Lua script. So please do not edit this file. The default configuration is for basic EU686 without GPS and beacon supports. You can change the configuration from LuCI interface as you wish.
Start LoRa gateway
Run the packet-forwarder by
$ /etc/init.d/lora_pkg_fwd start
If you want to automatically start after boot, you can do it by
$ /etc/init.d/lora_pkg_fwd enable