Introduction ..........................6 What is LG02 & OLG02 ....................... 6 Specifications ..........................7 Features ............................9 System Structure ........................9 Applications ..........................10 Hardware Variants ........................11 Install SIM card in 4G module ....................12 Firmware Change log ....................... 12 Access LG02 ..........................
Page 4
Can I develop my own application for LG02? ............... 55 13.5 Can I make my own firmware for LG02? Where can I find the source code of LG02? ..55 13.6 Can I change the LoRa behavior of LG02? ................55 13.7...
Page 5
14.2 How to recover the LG02 if firmware crash ................. 59 14.3 I configured LG02 for WiFi access and lost its IP. What to do now?........60 Order Info ..........................61 Packing Info ..........................61 Support ........................... 61 Reference ..........................63...
LG02 & OLG02 provide a low cost for your IoT network connection. Compare to the cost with normal SX1301 LoRaWAN solution. LG02 & OLG02 is only of its 1/4 or less cost. This makes the LG02 very suitable to set up small scale LoRa network or use it to extend the coverage of current LoRaWAN network.
Low RX current of 10.3 mA, 200 nA register retention. Fully integrated synthesizer with a resolution of 61 Hz. FSK, GFSK, MSK, GMSK, LoRaTM and OOK modulation. Built-in bit synchronizer for clock recovery. LG02 LoRa Gateway User Manual 7 / 63...
Page 8
Up to 150Mbps downlink and 50Mbps uplink data rates Worldwide LTE,UMTS/HSPA+ and GSM/GPRS/EDGE coverage MIMO technology meets demands for data rate and link reliability in modem wireless communication systems LG02 LoRa Gateway User Manual 8 / 63...
Limited support in LoRaWAN/ Support Private LoRa protocol Support upto 300 nodes LoRa band available at 433/868/915/920 Mhz Max range in LoRa: 5~10 km. Density Area:>500m 1.4 System Structure LG02 LoRa Gateway User Manual 9 / 63...
1.6 Hardware Variants The LG02 and OLG02 use the same firmware and have the same feature in the software side. In this document, we will use LG02 as the model number to explain the feature. Model Photo Description Indoor version for dual channel LoRa Gateway,...
1.7 Install SIM card in 4G module For LG02 & OLG02 4G version, the 4G module is inside the box, please open the box and use below direction to install the SIM card 1.8 Firmware Change log Please see this link for firmware change log: http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LG02-OLG02/Firmware/&file...
2. Access LG02 Access and configure LG02 The LG02 is configured as a WiFi AP by factory default. User can access and configure the LG02 after connect to its WiFi network. At the first boot of LG02, it will auto generate an unsecure WiFi network call dragino-xxxxxx User can use the laptop to connect to this WiFi network.
3.2 Use WAN port to access Internet By default, the LG02 set to use WAN port as network connection. When connect LG02’s WAN port to router, LG02 will get IP from router and have internet access. The network status can be checked as below:...
3.3 Access Internet as a WiFi Client. In the WiFi Client Mode, Dragino acts as a WiFi client and gets DHCP from uplink router via WiFi. The step to set is as below: Step1: In network -> Wireless, select Radio0 interface and scan.
Page 16
After successful associate, the WiFi network interface can be seen in the same page: LG02 LoRa Gateway User Manual 16 / 63...
3.4 Use built-in 4G modem for internet access For the LG02 model with 4G version, user can configure the modem for internet access. Step 1: Add New Interface LG02 LoRa Gateway User Manual 17 / 63...
Page 18
Step 2: Configure cellular interface Step 3: Check Result Note: In case you don’t know if your device has 4G modem, you can run lsusb command in SSH access to check, as below: LG02 LoRa Gateway User Manual 18 / 63...
4. Example 1: Configure as a LoRaWAN gateway – LoRaWAN mode LG02 has two LoRa channels and can be configured as a Dual Channel LoRaWAN gateway. LG02 is pre-configured to support one uplink channel and one downlink channel in the LoRaWAN mode.
Page 21
Step 3: Create a Gateway in TTN A8 40 41 1b 6f c4 41 50 LG02 LoRa Gateway User Manual 21 / 63...
4.2 Configure LG02 Gateway 4.2.1 Configure to connect to LoRaWAN server We should configure the LG02 now to let it connect to TTN network. Make sure your LG02 has Internet Connection first. Step1: Configure LG02 to act as raw forwarder Step2: Input server info and gateway id Choose the correct the server address and gateway ID.
Check Result After above settings, the LG02 should be able to connect to TTN, below is the result seen from TTN: 4.2.2 Configure LG02’s RX frequency Now we should configure LG02 to act receive the LoRaWAN packets. This is in Channel 1, we configure is to use 868.1Mhz (868100000 Hz) as below.
LG02 supports LoRaWAN End Node, in LoRaWAN protocol, it requires LoRaWAN node to send data in a hopping frequency. Since LG02 only support one single frequency, it will only able to receive the packet which is of the same Radio Frequency set up in LG02 Radio 1.
Install this library https://github.com/dragino/arduino-lmic to the Arduino Library path. Before compiling the End Device software, User needs to change the Frequency Band to use with LG02. What user need to change is in the file arduino\libraries\arduino-lmic \src\lmic\config.h. Changes are as below:...
4.3.3 Test with OTAA LoRa end node (LoRa Shield + UNO) Step 1: Create an OTAA device in TTN server -- > Application page. LG02 LoRa Gateway User Manual 26 / 63...
Page 27
2: Input keys into Arduino Sketch. The sketch for the LoRa Shield is in Arduino –IDE --> Examples -->LMIC_Arduino ttn-otaa Choose Arduino UNO to upload the sketch to LoRa Shield and UNO LG02 LoRa Gateway User Manual 27 / 63...
Page 28
Step 3: Check Result for OTAA Note: The LG02_DNWFREQ value in Arduno_LMIC/src/lmic/config.h should match downlink frequency from TTN. TTN shows 868.1 here, So LG02_DNWFREQ should be 868100000 LG02 LoRa Gateway User Manual 28 / 63...
Page 29
Downlink message Send out from TTN after the next uplink message arrive. In TTN --> Gateway --> Traffic Downlink message arrives gateway In LG02 --> Service --> Logread Downlink message arrives LoRa Shield In Arduino IDE --> Serial Monitor LG02 LoRa Gateway User Manual...
4.3.4 Test with ABP LoRa end node (LoRa Shield + UNO) Step 1: Create an ABP device in TTN server -- > Application page. And change it to ABP mode. LG02 LoRa Gateway User Manual 30 / 63...
Page 31
Make sure the Network Session Key and App Session Key are in MSB order Arduino Sketch ttn-abp Input the keys from TTN Choose Arduino UNO to upload the sketch to LoRa Shield and UNO LG02 LoRa Gateway User Manual 31 / 63...
Page 32
In Arduino IDE --> Serial Monitor Packet Arrive Gateway. In page Service-->logread Packet Arrive TTN. In TTN --> Gateway --> Traffic Packet Arrive TTN Device Page. In TTN --> Application --> Device --> Data LG02 LoRa Gateway User Manual 32 / 63...
Page 33
Downlink message Send out from TTN after the next uplink message arrive. In TTN --> Gateway --> Traffic Downlink message arrives gateway In LG02 --> Service --> Logread Downlink message arrives LoRa Shield In Arduino IDE --> Serial Monitor LG02 LoRa Gateway User Manual...
| Send packet immediately (will ignore tmst & time) tmst | number | Send packet on a certain timestamp value (will ignore time) tmms | number | Send packet at a certain GPS time (GPS synchronization required) LG02 LoRa Gateway User Manual 34 / 63...
Page 35
1) First set up a LoRa Shield with this code: LoRaReceiver. So the LoRa Shield will receive the data at frequency 915.6Mhz, SF7BW125, CR: 4/5 2) Edit a file (any name) under /var/iot/push/ with below content. {"txpk":{"freq":915.6,"powe":20,"datr":"SF7BW125","codr":"4/5","ipol":false,"data":"test"}} And then we can see below output LG02 LoRa Gateway User Manual 35 / 63...
5.2 Use LoRa radio device directly There are two SPI devices in LG02, user can use lg02_single_rx_tx to control this SPI device for transmit and receive. When use the lg02_single_rx_tx command to transmit, it will initiate the SPI device on each call and it will add delay to start transmit, this will be slower than the pkt_fwd...
Page 37
Then set up a LoRa node to send out LoRa packet, We use LoRa Shield + UNO in this example. The library use in Arduino UNO is LoRa-Master. And the source code is LoRaSender.. Result screen shot: LG02 LoRa Gateway User Manual 37 / 63...
Page 38
Step 3: Use lg02_single_rx_tx to transmit Command: root@dragino-1b6fb0:~# lg02_single_rx_tx -t -d 2 -f 915600000 –m “hello from dragino” Use radio 2 to transmit a message at frequency 9156000000 Set up a LoRa node to send out LoRa packet, We use LoRa Shield + UNO in this example.
Most IoT server support MQTT connection, for those servers, we can use MQTT to connect it to publish data or subscribe to a channel. A detail of how to use MQTT plus Video instruction can be found at: http://wiki.dragino.com/index.php?title=MQTT_Forward_Instruction LG02 LoRa Gateway User Manual 39 / 63...
7. Example 4: TCP IP Client Mode In the TCP IP Client mode, LG02 can accept LoRa packets and send it to the TCP-IP server. The working topology is as below. In this mode, The Uplink LoRa packets should use a customized format.
Page 41
For example, if we have configured 2 channels 12345 and 34567. And there is are three LoRa End nodes sending: 12345,34567,78 The LG02 will accept the data from 12345 and 34567, it will ignore the data from Node 78 Case 1: Node 12345 send <12345>field1=0.0&field2=1102.0...
8. Example 5: Write a customized script LG02 supports customized script to process LoRa data. This chapter describes about the data format from LoRa End node and How to write the script. The data flow from LoRa End Node to LG02 is as below: Example: Store Data in a file.
Page 43
Step 4: Configure the LoRa End Device to send sensor data. Here is an example code for LoRa Shield: End Device Code Outputs: End node send out packages: Gateway receive packet & Script find packet Script store data into file LG02 LoRa Gateway User Manual 43 / 63...
9. Example 6: LoRaWAN Packet Relay mode The LG02 has two radio channels, we can use these two channels as LoRaWAN relay to improve the network coverage. 9.1 How it works Basic concept: Get data in Radio 1 with match frequency, transmit the same data on Radio2 with pre-configure frequency.
Page 45
Step 3: Configure transmit channel info For example, if we want to transmit all received packets on: Frequency: 903.9Mhz, sf=7, bw=125000, cr=5, wd=0x34, bandwidth= 125k. Below is the configuration. LG02 LoRa Gateway User Manual 45 / 63...
Uplink channels 1-9 (RX1) 869.525 - SF9BW125 (RX2 downlink only) For uplink: if we set LG02 to listen on 868.3 , SF7, BW125, and transmit at 868.3,SF7,BW125. The LG02 will receive all end node’s packet at 868.3 SF7BW125 and can’t receive other frequency from end node.
10.2 More instructions http://wiki.dragino.com/index.php?title=Main_Page#LoRa.2FLoRaWAN_Gateway_Instruction 11. Linux System The LG02 bases on OpenWrt Linux System. It is open source, and user are free to configure and modify the inside Linux settings. 11.1 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.
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 LG02 or Edit the files directly in the windows. Screenshot is as below: 11.3 File System The LG02 has a 16MB flash and a 64MB RAM.
Page 50
4% /overlay //Flash: Remain after reboot Reset to factory default: mtd erase rootfs_data -r Except /tmp and /var. all data will be store in flash. /tmp and /var are store in RAM LG02 LoRa Gateway User Manual 50 / 63...
There are more than 3000+ packages available in our package server for user to install for their applications. For example, if user wants to add iperf tool, they can install the related packages and configure LG02 to use iperf Below is some examples opkgs command, more please refer...
12. Upgrade Linux Firmware We keep improving the LG02 Linux side firmware for new features, bug fixes. The latest firmware can be found on LG02 Firmware & release note The file named as dragino-LG02_LG08----xxxxx-squashfs-sysupgrade.bin is the upgrade Image. There are different methods to upgrade, as below: 12.1...
End node transmits at 868.1Mhz, The LG02’s RX setting must be 868.1Mhz so to receive this packet. 2/ It works only for one DR at a time. DR specifies the Spreading Factor and Bandwidth. In LG02, even the rx frequency match , if DR doesn’t match, it still can’t get the sensor data.
Page 54
// g-band LMIC_setupChannel(8, 868800000, DR_RANGE_MAP(DR_FSK, DR_FSK), BAND_MILLI); // g2-band So the LG02 will only able to receive the packet and will not receive others. Means 868100000, SF7 only one packet will arrive the TTN server in every 8 packet sent from the LoRaWAN end node.
-software-before-build-the-image 13.5 Can I make my own firmware for LG02? Where can I find the source code of LG02? Yes, User can make own firmware for LG02 for branding purpose or add customized application. The LG012source code and compile instruction can be found at: https://github.com/dragino/openwrt_lede-18.06...
User can reset the device to factory default in different ways: Method 1: Reset via Web UI. Click the button in Web UI --> System --> Back up / Flash firmware --> Perform Reset LG02 LoRa Gateway User Manual 56 / 63...
Can I control the LEDs? Except the PWR LED and sensor LED, all other LEDs can be controlled by developer. Control Globe LED: ON: echo 1 > /sys/class/leds/dragino2\:red\:wlan/brightness OFF: echo 0 > /sys/class/leds/dragino2\:red\:wlan/brightness LG02 LoRa Gateway User Manual 57 / 63...
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-dragino2-si3217x: kernel (= 3.10.49-1-4917516478a753314254643facdf360a) * * opkg_install_cmd: Cannot install package kmod-dragino2-si3217x. In this case, user can use the –force-depends option to install such package. opkg install kmod-dragino2-si3217x_3.10.49+0.2-1_ar71xx.ipk --force-depends LG02 LoRa Gateway User Manual 58 / 63...
In this case, user can recover the whole Linux system by uploading a new firmware via Web Failsafe mode. Procedure is as below: Use a RJ45 cable to connect the PC to LG02’s port directly. Set the PC to ip 192.168.255.x, netmask 255.255.255.0 Pressing the toggle button and power on the device...
14.3 I configured LG02 for WiFi access and lost its IP. What to do now? The LG01 has a fall-back ip in its LAN port. This IP is always enabled so user can use fall back ip to access LG01 no matter what the WiFi IP is. The fall back ip is useful for connect and debug the unit.
16. Packing Info Package Includes: LG02 or OLG02 LoRa Gateway x 1 Stick Antenna for LoRa RF part. Frequency is one of 433 or 868 or 915Mhz depends the model ordered Power Adapter: EU/AU/US type power adapter depends on country to be used ...
Page 62
Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to support@dragino.com LG02 LoRa Gateway User Manual 62 / 63...
OpenWrt official Wiki http://www.openwrt.org/ Download of this manual or Update version http://www.dragino.com/downloads/index.php?dir=UserManual/LG02_OLG02/ LMIC library for Arduino LoRaWAN end device use with LG02. https://github.com/dragino/arduino-lmic Hardware Source LG02 = LoRa G Dual OLG02= PAN v2.0 LoRa G Dual...
Need help?
Do you have a question about the LG02 and is the answer not in the manual?
Questions and answers