Dragino LG01 LoRa User Manual

Dragino LG01 LoRa User Manual

Open source single channel lora gateway. it lets you bridge lora wireless network to an ip network via wifi, ethernet, 3g
Table of Contents

Advertisement

LG01 LoRa Gateway User Manual
Document Version: 1.0
Firmware Version: IoT Mesh v3.4.0
Version
Description
0.1
Initiate
1.0
Release, Add ThingSpeak Examples
LoRa Gateway User Manual ---Update:2017-02-21
www.dragino.com
Date
2016-Oct-29
2016-Dec-9
1 / 44

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LG01 LoRa and is the answer not in the manual?

Questions and answers

Summary of Contents for Dragino LG01 LoRa

  • Page 1 LG01 LoRa Gateway User Manual Document Version: 1.0 Firmware Version: IoT Mesh v3.4.0 Version Description Date Initiate 2016-Oct-29 Release, Add ThingSpeak Examples 2016-Dec-9 LoRa Gateway User Manual ---Update:2017-02-21 1 / 44...
  • Page 2: Table Of Contents

    Index: Introduction ......................4 Overview ....................... 4 What is LG01 ....................4 Specifications ....................4 Features ......................6 System Structure ..................6 Applications ....................7 Hardware Variants ..................8 Quick Start Guide ....................9 Access and config LG01 ................9 Program microcontroller.
  • Page 3 FAQ ......................... 37 10.1 Why there is 433/868/915 version LoRa part? ........37 10.2 What is the frequency range of LG01 LoRa part? ........37 10.3 How may nodes can the LG01 support? ..........37 10.4 What kind of Server the LG01 can support? ........... 37 10.5...
  • Page 4: Introduction

    Introduction Overview What is LG01 The LG01 is an open source single channel LoRa Gateway. It lets you bridge LoRa wireless network to an IP network base on WiFi, Ethernet, 3G or 4G cellular. LG01 runs on open source embedded Linux system;...
  • Page 5 WiFi Spec:  IEEE 802.11 b/g/n  Frenquency Band: 2.4 ~ 2.462GHz  Tx power:  11n tx power : mcs7/15: 11db mcs0 : 17db  11b tx power: 18db  11g 54M tx power: 12db  11g 6M tx power: 18db ...
  • Page 6: Features

    Features  Open source Linux (OpenWrt) inside. User can modify or compile the firmware with custom features and own brand.  Low power consumption.  Compatible with Arduino IDE 1.5.4 or later, user can program, debug or upload sketch to the MCU via Arduino IDE.
  • Page 7: Applications

    Applications LoRa Gateway User Manual ---Update:2017-02-21 7 / 44...
  • Page 8: Hardware Variants

    Hardware Variants There are different LG01 variants for difference applications. Below table shows the difference between these models. Model Photo Description The most general version can be used as a LoRa LG01-P Gateway. Include screw terminal which can connect to external...
  • Page 9: Quick Start Guide

    Quick Start Guide Access and config LG01 The LG01 is configured as a WiFi AP by factory default. User can access and configure the LG01 after connect to its WiFi network. At the first boot of LG01, it will auto generate an unsecure...
  • Page 10: Program Microcontroller

    Program microcontroller. The MCU (microcontroller) M328P is used to communicate with LoRa Radio part and Dragino Linux module. The program language for the MCU is based on C and program tool is Arduino IDE. Below the way shows how to do program it.
  • Page 11  After install Dragino’s board info in the IDE, we can see the boards info from the IDE, as below screenshot. For LG01, we should choose: Arduino Uno – Dragino Yun. Note: If user has trouble to install via Board Manager. User can manually add the board profile.
  • Page 12: Upload A Sketch In The Mcu

    LG01 WiFi SSID, then both devices are in the same WiFi network. In the IDE, select the correct port as below screenshot.  Select the example from IDE --> File --> Examples --> Dragino --> Basic --> Blink Click Upload to upload the sketch to LG01, the LG01 may ask you password to upload, if so, type the password of LG01.
  • Page 13  Check result The blink sketch will set the A2 pin of the MCU to periodically high and low. This pin connects to the HEART LED of the LG01. So if successfully upload this sketch, user can see HEART LED turn on and turn off periodically.
  • Page 14: Simple Lora Wireless Example

    Simple LoRa wireless example To test LoRa wireless, we at least need 2 devices support LoRa. In this example we will use below devices:  LoRa Server: LG01 ; LoRa Client: LoRa Shield + Arduino Uno  LoRa Server: LG01 ; LoRa Client: LG01 Above two combination will shows the same LoRa feature, we provide different devices examples in LoRa Client which is for user convenient only.
  • Page 15: Upload Lora Server Sketch

    2.3.2 Upload LoRa Server Sketch Select the example from: IDE --> File --> Examples --> Dragino --> LoRa --> LoRa_Simple_Server_Yun Upload this Sketch to the LG01, then open the serial monitor to monitor the LG01 status, as below screenshot 2.3.3 Upload LoRa Client Sketch...
  • Page 16: Typical Network Setup

    Typical Network Setup Overview LG01 support flexible network set up for different environment. This section describes the typical network topology can be set in LG01. The typical network set up includes:  WAN Port Internet Mode  WiFi Client Mode ...
  • Page 17: General Wifi Ap Network

    General WiFi AP Network In the General AP Mode, LG01 gets internet access from its WAN port or USB 3G/4G/GPRS. LG01 itself acts as a WiFi Access Point and provide a WiFi AP network. LG01 shares the internet to its AP network or LAN interface.
  • Page 18: Wan Port Internet Mode

    LAN port and WiFi AP network for other devices. WiFi Client Mode In the WiFi Client Mode, Dragino acts as a WiFi client and gets DHCP from uplink router via WiFi. It also shares the internet to its LAN port for other devices.
  • Page 19: Mesh Wifi Network

    Mesh WiFi Network In the mesh network topology, user should choose the device to be a mesh gateway node or mesh client node Mesh Gateway: use WAN port or USB 3G/4G modem to get internet access from uplink router. It also shares the internet to its Mesh Network for other Mesh Clients.
  • Page 20 Network --> LAN and DHCP  Enable DHCP server in its LAN port  Set Gateway to 255.255.255.255 Network --> Access Point  Enable WiFi AP (not necessary), Can set same SSID in the mesh network Network --> Mesh Network ...
  • Page 21: Mesh Client Set Up

    3.5.2 Mesh Client Set Up Network --> Internet Access  Access Internet set to Disable Network --> LAN and DHCP  Disable DHCP server in its LAN port and  Set gateway point to mesh gateway. LoRa Gateway User Manual ---Update:2017-02-21...
  • Page 22 Network --> Access Point  Enable WiFi AP (not necessary,can use same SSID or difference SSID with other mesh node) Network --> Mesh Network  Enable WiFi Mesh Network  Input Mesh Group //Note: Mesh Device within same group can communicate with each other.
  • Page 23: Usb Dial Up Modem Set Up

    USB Dial Up Modem Set Up Dragino USB interface can be used for GPRS/3G/4G connections. Below are some set up examples. WCDMA set up example: 3G EV-DO/CDMA2000 Set Up Example for China Telecom: LoRa Gateway User Manual ---Update:2017-02-21 23 / 44...
  • Page 24: Usb 3G/4G Ethernet Dongle

    USB 3G/4G Ethernet Dongle Some USB dongles are not using the dial up to connect internet. Instead, they appear as a network interface and has built-in router feature. Huawei Hilink dongles are a typical of these. When user plug such dongle into computer, it will auto connect to Internet and redirect to a web interface, when plug such dongle into the MS14, a new interface will appear (typically eth2eth2 or usb0) by running command "ifconfig -a"...
  • Page 25: Linux System

    Linux System The LG01 bases on OpenWrt Linux System. It is open source, and user are free to configure and modify the inside Linux settings. SSH Access for Linux console User can access to the Linux console via SSH protocol. Make sure your PC and the LG01 is in the same network, then use a SSH tool (such as putty) to access it.
  • Page 26: Edit And Transfer Files

    Edit and Transfer files The LG01 support SCP protocol and has a built SFTP server. There are many ways to edit and transfer files using these two protocols. One of the easiest is through WinSCP utility. After access via WinSCP to the device, use can use a FTP alike window to drag / drop files to the LG01 or Edit the files directly in the windows.
  • Page 27: Package Maintain System

    In Linux Console run: root@dragino-169d30:~# opkg update // to get the latest packages list root@dragino-169d30:~# opkg list //shows the available packages root@dragino-169d30:~# opkg install mosquitto-client // install MQTT client, it will auto install the required packages. Installing mosquitto-client (1.3.5-1) to root... Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages/mosquitto-client_1.3.5...
  • Page 28: Bridge Library

    Arduino site:  We recommend user to tried the examples under Arduino IDE --> Files --> Examples --> Dragino first.  When use the Bridge class, user need to call Bridge.begin(115200) in the sketch for LG01.  In the default bridge examples from Arudino IDE, it uses Serial class to print debug info. This doesn’t work in LG01.
  • Page 29: Advance Management

    Advance Management Reset Network or Reset to Factory Default LG01 provide ways for user to reset the device. When the Linux system is running, user can press the toggle button to reset the device. the pressing time will determine which part is to be reset.
  • Page 30: Upgrade Firmware

    Upgrade Firmware We keep improving the LG01 Linux side firmware for new features, bug fixes. The latest firmware can be found on IoT Mesh Firmware, and the Change Log can be found here: Firmware Change Log. The file named as dragino2-IoT--xxxxx-squashfs-sysupgrade.bin...
  • Page 31: Auto-Provisioning

    Auto-Provisioning Advance Examples Upstream: Get data from LoRa node and send to IoT server 9.1.1 Set up hardware Set up the hardware as below, the LoRa node will get sensor data from DHT11 and send these data to LoRa Gateway, when the Gateway get the data, it will pass the data to the IoT server.
  • Page 32: Upload Sketches

    Arduino library directory. Step 2: Select the example from: IDE --> File --> Examples --> Dragino --> IoTServer --> ThingSpeak --> dht11_client And upload this sketch to the LoRa Node Step 3: Select the example from IDE -->...
  • Page 33: Downstream: Get Data From Iot Server And Send To Lora Node

    Downstream: Get data from IoT Server and send to LoRa node 9.2.1 Set up Hardware Set up the hardware as below, the LoRa Gateway will get command from IoT Server and then send the command to LoRa node, the node control the relay state according to the receive command.
  • Page 34: Upload Sketches

    9.2.3 Upload sketches Step 1: Select the example from: IDE --> File --> Examples --> Dragino --> IoTServer --> ThingSpeak --> DownstreamClient And upload this sketch to the LoRa Node Step 2: Select the example from IDE --> File --> Examples --> Dragino --> IoTServer --> ThingSpeak --> DownstreamServer Replace the talkback ID &...
  • Page 35: Multiple Nodes Examples

    The example shows how the gateway can handle multiple nodes up to several hundreds. The example can be found at IDE --> File --> Examples --> Dragino --> LoRa --> Concurrent How it works: This concurrent client sketch is working together with the concurrent gateway sketch. Before using this sketch, please use the write_client_id sketch to write a client ID in the EEPROM.
  • Page 36: More Examples

    More Examples Dragino keep updating examples in our wiki, more examples please refer the link: Dragino Examples Catalog LoRa Gateway User Manual ---Update:2017-02-21 36 / 44...
  • Page 37: Faq

    Frequency, we provide different version for best tune in the LoRa part. That is why we provide different version of LoRa. 10.2 What is the frequency range of LG01 LoRa part? The chip used in the LoRa part is:...
  • Page 38: Can I Make My Own Firmware For Lg01? Where Can I Find The Source Code Of Lg01

    10.5 Can I make my own firmware for LG01? Where can I find the source code of LG01? Yes, User can make own firmware for LG01 for branding purpose or add customized application. The LG01 source code and compile instruction can be found at: https://github.com/dragino/openwrt-bb-1407...
  • Page 39: Trouble Shooting

    11.1 I can’t download the Dragino profile in Arduino IDE. If IDE quite slowly while downloading the Dragino profile in board manager and stuck somewhere. As show below, it is because your network has slow connection to some packages from Arduino IDE.
  • Page 40: Bridge Between Mcu And Linux Module Doesn't Work

    IDE can detect the LG01. 11.4 I get kernel error when install new package, how to fix? In some case, when install package, it will generate kernel error such as below: root@dragino-16c538:~# opkg install kmod-dragino2-si3217x_3.10.49+0.2-1_ar71xx.ipk Installing kmod-dragino2-si3217x (3.10.49+0.2-1) to root... Collected errors:...
  • Page 41: How To Recover The Lg01 If Firmware Crash

    11.5 How to recover the LG01 if firmware crash LG01 provide user a full control on its Linux system, it is possible that the device will brick and can’t boot after improper modification in some booting files. In this case, user can recover the whole Linux system by uploading a new firmware via Web Failsafe mode.
  • Page 42: Order Info

    12 Order Info General Version:  LG01P-433: LoRa Gateway best tune to 433 MHz.  LG01P-868: LoRa Gateway best tuned to 868 MHz.  LG01P-915: LoRa Gateway best tuned to 915 MHz Screw Terminal Version:  LG01S-433: LoRa Gateway best tune to 433 MHz.
  • Page 43 LoRa Gateway User Manual ---Update:2017-02-21 43 / 44...
  • Page 44: Reference

    15 Reference  LG01 LoRa Gateway official wiki  More examples for LG01 LoRa Gateway  Source code for LG01 LoRa Gateway https://github.com/dragino/openwrt-bb-1407  OpenWrt official Wiki http://www.openwrt.org/  Arduino Official Site: https://www.arduino.cc  Arduino bridge examples: https://www.arduino.cc/en/Tutorial/Bridge LoRa Gateway User Manual ---Update:2017-02-21...

Table of Contents

Save PDF