Openwrt and Lora gateway work together

 

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

We have a partner will launch a good SX1301 gateway at matchx.io and gimasi, which uses this WRTnode 2P as the MCU.

Please subscribe there.

Recent Posts

Recent Comments

Archives

Categories

Meta

sheenhx Written by:

9 Comments

  1. […] has been quite a while since my last post about Lora gateway’s FPGA version.  Finally we received the boards! The boards are manufactured by a Chinese PCB manufacture that I […]

  2. May 3, 2016
    Reply

    Fantastic Work!!
    Excelent!!
    Sheen, I’m from a Brazilian IoT company and we are designing a device with a common base as this one. Can we talk more? I think there are some business opportunities.
    Best regards,

    • Sheen
      May 3, 2016
      Reply

      Sure, I guess we will be amazed by your idea. 🙂

      • Camilo Rodegheri
        May 3, 2016
        Reply

        Can you send me a direct mesage to my email? Best regards! 🙂

  3. Al Thomas
    August 2, 2016
    Reply

    Could you make the ipk file available? I should just be able to use that with a USB dongle and a Lora radio, yes?

  4. Al Thomas
    August 3, 2016
    Reply

    Alternately if you could provide your .config file that would be helpful. I only have the 2Q as an architecture option but need the 2P as well as a bunch of other options. I think your recommended optimized config file would be ideal.

    • Sheen
      August 4, 2016
      Reply

      unfortunately the ipk is platform-relevant, so I need to know what are you using, not only the openwrt board, but also the Lora gateway board.

      ipk package should match both boards.

  5. In-Tae Hwang
    March 20, 2017
    Reply

    Hi!
    Do you have a LoRa Gateway Module with LBT support?
    The frequency used is 917 ~ 923.5MHz.
    I would like to know if I can purchase a LoRa Gateway module suitable for the above functions.

Leave a Reply

Your email address will not be published. Required fields are marked *