Category: OpenWrt

All the things about OpenWrt

February 1, 2017 / / OpenWrt

 

Lora Gateway SX1301

 

Recently I am working on Lora gateway SX1301, more specifically SX1301AP2 reference design, which has a FPGA.

 

 

It is the most update version of Lora gateway, however it is not widely available right now. So we go for IMST’s older version:

ic880a-spi

 

 

This on is insanely expensive: 189EUR per piece, and they removed the FTDI’s chip for compatibility of gateway software V3.2.0.


 

Openwrt Board

 

This Openwrt board WRTnode2P comes from WRTnode in Beijing, before that I used their WRTnode one to design Somabar, which is a kickstarter project.

And the idea seems to be really popular around the world and they won CES innovation award in 2016.

2P2

Okay, let’s give a little bit spec about this board.

 

  • 10USD with Ethernet port
  • in NGFF M.2 as 22*42mm
  • MTK MT7628AN: 802.11n 2*2, 580Mhz
  • 64/128/256MB DDR2ram
  • 4/8/16/32MB SPI flash

 

 


 

The goal of this post is to reproduce my work on making Lora gateway work with Openwrt.

Build environment: WRTnode static SDK on CC 15.05: https://github.com/WRTnode

Kernel version: 3.18.23

We already know that Semtech has release the Lora Gateway software for IMST’s board and SX1301AP2, the link direct to my fork of the repo, which correct some bugs and modified the configuration for WRTnode 2P.

Correct steps for building a package for openwrt:

  1. Download WRTnode sdk

  2. Put the openwrt makefile in /package/lora folder

  3. make menuconfig

  4. chose the package

  5. compile

Then you will see a package in /bin/rampis/package/base, called lora_gateway_3.2.0_rampis.ipk

Then opkg install it, you will find all the binaries in /root/lora

 

Some people may experience errors like this:

Package lora-gateway is missing dependencies for the following libraries:
librt.so.0
make[3]: *** [/home/sheen/openwrt/bin/ar71xx/packages/lora/lora-gateway_3.2.0_ar71xx.ipk] Error 1

add librt.so.0 in the makefile will solve the problem


 

Hardware connection:

 

sx13012

 

2Psh

 

I tested the total current consumption in normal state:

IMG_7806

 

And we have the total consumption after one day:

img_7824.jpg

 

Almost 5000mAh, quite a lot!

 


 

 

Real test:

 

./util_tx_test –r 1257 –f 866.5

You will see the output like:

Sending -1 packets on 866500000 Hz (BW 125 kHz, SF 10, CR 1, 16 bytes payload, 8 symbols preamble) at 14 dBm, with 1000 ms between each INFO: concentrator started, packet can be sent

Sending packet number 1 …OK

Sending packet number 2 …OK

Sending packet number 3 …OK

Congrats!!

 


Update:

 

Share a useful tool that you can estimate your lora client’s battery life:

LoRaMAC_life_calculator_wiki

April 5, 2016 / / OpenWrt
November 4, 2015 / / OpenWrt
November 2, 2015 / / OpenWrt