Setup dan Troubleshooting Gateway SX1275 LoRa (Long Range) IoT

Setup dan Troubleshooting Gateway SX1275 LoRa (Long Range) IoT

Assalammualaikum Wr. Wb. guys

Hardware yang saya gunakan untuk gateway LoRa disini berbasis chip SX1275, dan untuk processor/backhaul yang saya gunakan disini menggunakan RPI 2 dengan OSMC (debian base) biar bisa sambil Multimedia heheheehheheehh

BOM untuk project ini adalah:

  1. RPI 2 dengan image OSMC
  2. LoRa gateway SX1257 based, disini saya menggunakan produk RAK, DIPERHATIKAN ANTENNA GATEWAY HARUS TERPASANG KARENA BISA MENYEBABAN KERUSAKAN MODULE GATEWAY
  3. Jumper kabel 7ea
  4. Untuk koneksi internet bisa dipilih menggunakan Wifi atau ethernet, bila menggunakan wifi seperti saya, menggunakan wifi dongle USB


Ok langsung aja kita masuk ke step nya:

  • Setting OSMC agar SPI nya aktif yaitu di /boot/config.txt tambahkan parameter dtpram=spi=on, walau lewat OSMC nya sendiri sudah terlihat aktif namun ternyata SPI belum aktif sampai saya tambahan parameter tsb. Sempet berhari-hari puyeng gateway error mulu :-/
  • Bila belum terinstall git gcc dan libc6-dev, install dulu
  • Sudo apt-get update
    Sudo apt-get upgrade
    Sudo apt-get install git gcc libc6-dev
  • Clone source berikut dan ikuti langkah nya:
  • $ git clone -b spi https://github.com/ttn-zh/ic880a-gateway.git ~/ic880a-gateway
    $ cd ~/ic880a-gateway
    $ sudo ./install.sh spi
  • instalasi akan meminta jawaban yes/no untuk remote configuration. karena kita belum membutuhkannya, kita jawab no, kemudian akan diminta mengisi beberapa kolom. Untuk server address bila kita sudah membuat account di TheThingsNetwork atau ResinIoT bisa dimasukkan disini. saya sendiri menggunan TTN dan server yang digunakan adalah ttn.thingsconnected.net
  • Setelah selesai instalasi, gateway harus kita test terlebih dahulu apakah sudah bisa dikenali RPI atau belum
  • $ cd /opt/ttn-gateway/lora_gateway/util_spi_stress/
    $ ./util_spi_stress
    INFO: Starting LoRa concentrator SPI stress-test number 1
    Cycle 0 > did 1000 R/W on an 8 bits reg with no error
    Cycle 1 > did 1000 R/W on an 8 bits reg with no error
    Cycle 2 > did 1000 R/W on an 8 bits reg with no error
    Cycle 3 > did 1000 R/W on an 8 bits reg with no error
    Cycle 4 > did 1000 R/W on an 8 bits reg with no error
    
    
  • Semakin lama cycle tidak ada yang error berarti wiring nya semakin bagus



Dan akhir kata Wassalam

Install SmingHub and Netbeans as IDE at Linux Environment

Hi, this time i'd like to share how to install Sming Framework for ESP8266 and NetBeans as IDE. Before continue, i just to remind you my laptop use Linux Distro Elementary OS, which is Ubuntu base. So for Ubuntu user should be not problem.

Actually  there's no difference with installation from github page. But it's ok right if i rewrite here? I will explain more details if you're noobs at linux.


  • sudo apt-get update && sudo apt-get install make unrar autoconf automake libtool libtool-bin gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat1-dev python sed python-serial python-dev srecord bc git help2man unzip
  • Check /opt directory using command ls /opt if opt directory doesn't exist then create by command sudo mkdir /opt
  • cd /opt
  • git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
  • git clone https://github.com/SmingHub/Sming.git
  • cd /opt/esp-open-sdk
  • wget https://github.com/themadinventor/esptool/archive/master.zip
  • unzip master.zip
  • mkdir esptool
  • mv esptool-master /opt/esp-open-sdk/esptool 
  • git clone https://github.com/raburton/esptool2
  • cd esptool2
  • make
  • cd ..
  • Type: sudo chown -R YOUR_USERNAME ./
  • make
  • cd /opt/sming/Sming
  • make
  • sudo nano /etc/environment type at 2nd row ESP_HOME=/opt/esp-open-sdk and 3rd row SMING_HOME=/opt/sming/Sming and then push ctrl+x and enter twice
Here now we have framework sming, now we will setup Netbeans IDE
  • sudo apt-get install -y netbeans
  • if package not found then follow this instruction
    • sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
    • sudo apt-get update
    • sudo apt-get install netbeans
  • Open netbeans, go to tool menu then click plugins, at tab available plugins choose c/c++ then install
  • go to tool then click options, click c/c++ then follow instruction at picture below 
  • then click tab code assistance and follow picture below 
  • After all environment setup then now we import project by click file menu, choose c/c++ with existing sources, next choose sample at /opt/sming/sample/Basic_Blink
  • At trees left side find Makefile and right click there and choose make
  • Happy coding!