Build LoRaWAN Gateway with Ci40 and iC880a

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.

#Hareware#

  1. IMST iC880a SPI concentrator board
  2. Pigtail for antenna
  3. Ci40
  4. Power Supply 2A with micro USB
  5. MicroSD card
  6. 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.

Pins

iC880a Description RPi pin Ci40 pin
21 Supply 5V 2 5v to Raspberry Pi board
22 GND 6 GND
13 Reset 22 MFIO_21
14 SPI CLK 23 SPI_M0_MCLK
15 SPI MISO 21 SPI_M0_MISO
16 SPI MOSI 19 SPI_M0_MOSI
17 SPI Nss 24 SPI_M0_CS2 (MFIO_28)

Setting up the software

OpenWrt Preparation

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.

you don’t need to compile your own OpenWrt with lora-feed. I have prepared compiled ipk packages for this tutorial. Downloading these packages and copy to the SD card.

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

Advertisements
This entry was posted in Ci40, LEDE, LoRa, OpenWRT. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s