www.dragino.
com
LG308 LoRaWAN Gateway User Manual
Document Version: 1.2.1
Firmware Version: LG02_LG08--build-v5.3.1581838658-20200216-1539
Version Description Date
1.0 Release 2018-Nov-17
1.1 Add notice for recover mode. Add hardware source code 2019-Jan-10
Add FAQ for customized frequency.
1.1.1 Add how to control LED. Add
1.1.2 Remove SX1276 description and GPS.
1.1.3 Change the HTTP Port and SSH port for firmware version > v5.3 2019-Nov-26
1.2.0 Add more features such packet filter, remote access 2020-Mar-02
1.2.1 Add contents for access to the device 2020-Mar-16
LoRaWAN Gateway User Manual 1 / 37
www.dragino.com
1. Introduction .............................................................................................................................. 4
1.1 What is LG308 ............................................................................................................................ 4
1.2 Specifications.............................................................................................................................. 4
1.3 Features ...................................................................................................................................... 6
1.4 Hardware System Structure........................................................................................................ 6
1.5 LG308 Applications ..................................................................................................................... 7
2. Access LG308 ............................................................................................................................ 8
2.1 Connect via WiFi ......................................................................................................................... 8
2.2 Connect via Ethernet .................................................................................................................. 8
2.3 Access Configure Web UI ............................................................................................................ 9
3. Typical Network Setup ............................................................................................................ 10
3.1 Overview .................................................................................................................................. 10
3.2 Use WAN port to access Internet .............................................................................................. 10
3.3 Access Internet as a WiFi Client. ............................................................................................... 11
3.4 Use built-in 4G modem for internet access .............................................................................. 13
3.5 Check Internet connection ........................................................................................................ 15
4. Example : Configure as a LoRaWAN gateway ........................................................................... 16
4.1 Create a gateway in TTN Server ............................................................................................... 16
4.2 Configure LG308 to connect to TTN .......................................................................................... 18
4.3 Configure frequency ................................................................................................................. 19
4.4 Add a LoRaWAN End Device ..................................................................................................... 20
5. More features ......................................................................................................................... 22
5.1 Packet Filtering ......................................................................................................................... 22
5.2 Remote Access .......................................................................................................................... 22
5.3 More instructions ..................................................................................................................... 22
6. Linux System ........................................................................................................................... 23
6.1 SSH Access for Linux console .................................................................................................... 23
6.2 Edit and Transfer files ............................................................................................................... 24
LoRaWAN Gateway User Manual 2 / 37
www.dragino.com
6.3 File System ................................................................................................................................ 24
6.4 Package maintain system ......................................................................................................... 25
7. Upgrade Linux Firmware ......................................................................................................... 26
7.1 Upgrade via Web UI ................................................................................................................. 26
7.2 Upgrade via Linux console ........................................................................................................ 26
8. FAQ ......................................................................................................................................... 27
8.1 How can I configure for customized frequency band?.............................................................. 27
8.2 Can I make my own firmware for LG308? Where can I find the source code of LG308? .......... 31
8.3 Can I use the 868Mhz version for 915Mhz bands? ................................................................... 31
8.4 Can I control the LEDs? ............................................................................................................. 31
9. Trouble Shooting..................................................................................................................... 32
9.1 I get kernel error when install new package, how to fix? ......................................................... 32
9.2 How to recover the LG308 if firmware crash ............................................................................ 33
9.3 I configured LG308 for WiFi access and lost its IP. What to do now? ....................................... 34
9.4 How can I see if the SIM card is connected insert? ................................................................... 34
10. Order Info ............................................................................................................................... 35
11. Packing Info ............................................................................................................................ 35
12. Support ................................................................................................................................... 35
13. Reference................................................................................................................................ 37
LoRaWAN Gateway User Manual 3 / 37
www.dragino.com
1. Introduction
1.1 What is LG308
The LG308 is an open source LoRaWAN Pico Gateway. It lets you bridge LoRa wireless network
to an IP network via WiFi, Ethernet, 3G or 4G cellular network. The LoRa wireless allows users to
send data and reach extremely long ranges at low data-rates.
The LG308 uses Semtech packet forwarder and fully compatible with LoRaWAN protocol. It
includes a SX1301 LoRa concentrator, which provides 10 programmable parallel demodulation
paths.
LG308 has pre-configured standard LoRaWAN frequency bands to use for different countries.
User can also customized the frequency bands to use in their own LoRa network.
1.2 Specifications
Hardware System:
Linux Part:
400Mhz ar9331 processor
64MB RAM
16MB Flash
LoRaWAN Gateway User Manual 4 / 37
www.dragino.com
Interface:
10M/100M RJ45 Ports x 2
WiFi : 802.11 b/g/n
LoRaWAN Wireless
Power Input: 12V DC, 1 A
USB 2.0 host connector x 1
Mini-PCI E connector x 1
SX1301 + 2 x SX1257
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
Wifi Sensitivity
11g 54M : -71dbm
11n 20M : -67dbm
LoRa Spec:
Up to -142.5dBm sensitivity with SX1257 Tx/Rx front-end
70 dB CW interferer rejection at 1 MHz offset
Able to operate with negative SNR, CCR up to 9dB
Emulates 49x LoRa demodulators and 1x (G)FSK demodulator
Dual digital TX&RX radio front-end interfaces
10 programmable parallel demodulation paths
Dynamic data-rate (DDR) adaptation
True antenna diversity or simultaneous dual-band operation
Cellular 4G LTE (optional):
Quectel EC25 LTE module
Micro SIM Slot
External 4G Sticker Antenna.
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
LoRaWAN Gateway User Manual 5 / 37
www.dragino.com
1.3 Features
Open Source OpenWrt system
Managed by Web GUI, SSH via LAN or WiFi
Emulates 49x LoRa demodulators
LoRaWAN Gateway
10 programmable parallel demodulation paths
1.4 Hardware System Structure
LoRaWAN Gateway User Manual 6 / 37
www.dragino.com
1.5 LG308 Applications
LoRaWAN Gateway User Manual 7 / 37
www.dragino.com
2. Access and configure LG308
The LG308 is configured as a WiFi AP by factory default. User can access and configure the LG308
after connect to its WiFi network.
2.1 Connect via WiFi
At the first boot of LG308, it will auto generate an unsecure
WiFi network call dragino-xxxxxx
Note: In latest version firmware, it has been password
protected and the password is:
dragino+dragino
User can use the laptop to connect to this WiFi network. The
laptop will get an IP address 10.130.1.xxx and the LG308 has
the default IP 10.130.1.1
Note: If device has been configured to work in WiFi Client Mode, the WiFi AP mode will be
disable and user can’t see the dragino wifi SSID.
2.2 Connect via Ethernet
Alternatively, you can connect your PC to the LG308 WAN port via Ethernet cable and obtain an
IP address via DHCP. User can see this ip address from uplink router.
The LAN port is configured as DHCP router by default, user can connect the PC to LAN port and
set PC to DHCP mode, it will get IP from LAN port and be able to access to the device. The default
IP in LAN port is 10.130.1.1
The LAN port also has a fall back ip address for access if user doesn’t connect to uplink router.
LoRaWAN Gateway User Manual 8 / 37
www.dragino.com
2.3 Access Configure Web UI
Open a browser on the PC and type in the LG308 ip address (depends on your connect method)
http://10.130.1.1/ (Access via WiFi AP network or LAN port)
or
http://IP_ADDRESS or http:// IP_ADDRESS:8000 (The web port has been changed to
8000 in WAN interface(WAN port or WiFi Client Mode) since firmware 5.3.xxx firmware)
User will see the login interface of LG308.
The account for Web Login is:
User Name: root
Password: dragino
LoRaWAN Gateway User Manual 9 / 37
www.dragino.com
3. Typical Network Setup
3.1 Overview
LG308 supports flexible network set up for different environment. This section describes the
typical network topology can be set in LG308. The typical network set up includes:
WAN Port Internet Mode
WiFi Client Mode
WiFi AP Mode
USB Dial Up Mode
3.2 Use WAN port to access Internet
By default, the LG308 set to use WAN port as network connection. When connect LG308’s WAN
port to router, LG308 will get IP from router and have internet access. The network status can be
checked as below:
LoRaWAN Gateway User Manual 10 / 37
www.dragino.com
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.
Step2:
Select the wireless AP and join:
Step3:
In network->wireless page, disable WiFi AP network. Notice: After doing that, you will lose
connection if your computer connects to the LG308 via LG308’s wifi network.
LoRaWAN Gateway User Manual 11 / 37
www.dragino.com
After successful associate, the WiFi network interface can be seen in the same page:
LoRaWAN Gateway User Manual 12 / 37
www.dragino.com
3.4 Use built-in 4G modem for internet access
For the LG308 model with 4G version, user can configure the modem for internet access.
Step 1: Add New Interface
LoRaWAN Gateway User Manual 13 / 37
www.dragino.com
Step 2: Configure cellular interface
Step 3: Check Result
Note: In case you don’t know whether your device has 4G modem, you can run lsusb command
in SSH access to check, as below:
LoRaWAN Gateway User Manual 14 / 37
www.dragino.com
3.5 Check Internet connection
User can use the diagnostics page to check and analyze Internet connection.
LoRaWAN Gateway User Manual 15 / 37
www.dragino.com
4. Example : Configure as a LoRaWAN gateway
LG308 is fully compatible with LoRaWAN protocol. It use the legacy Semtech Packet forwarder to
forward the LoRaWAN packets to server, the structure is as below.
This chapter describes how to use LG308 to work with TTN LoRaWAN Server. The method to
work with other LoRaWAN server is similar.
4.1 Create a gateway in TTN Server
Step 1: Get a Unique gateway ID.
Every LG308 has a unique gateway id. The id can be found at LoRaWAN page:
The gateway id is: a840411b8268ffff
LoRaWAN Gateway User Manual 16 / 37
www.dragino.com
Step 2: Sign up a user account in TTN server
Step 3: Create a Gateway
LoRaWAN Gateway User Manual 17 / 37
www.dragino.com
After create the gateway, we can see the gateway info, as below
4.2 Configure LG308 to connect to TTN
We should configure the LG308 now to let it connect to TTN network. Make sure your LG308 has
Internet Connection first.
Step1: Configure LG308 to act as raw forwarder
Step2: Input server info and gateway id
Choose the correct the server address and gateway ID.
LoRaWAN Gateway User Manual 18 / 37
www.dragino.com
Check Result
After above settings, the LG308 should be able to connect to TTN, below is the result seen from
TTN:
4.3 Configure frequency
After doing above LG308 will be able to act as LoRaWAN. Below section shows how to add a
LoRaWAN End device in this LoRaWAN network and see the data from TTN.
We use LT-33222-L as a reference below, for other LoRaWAN devices will be more or less the
same.
LoRaWAN Gateway User Manual 19 / 37
www.dragino.com
4.4 Add a LoRaWAN End Device
Step 1: Create a device in TTN with the OTAA keys from LT IO controller.
Each LT is shipped with a sticker with the default device EUI as below:
User can enter this key in their LoRaWAN Server portal. Below is TTN screen shot:
Add APP EUI in the application.
LoRaWAN Gateway User Manual 20 / 37
www.dragino.com
Add APP KEY and DEV EUI
Step 2: Power on LT and it will auto join to the TTN network. After join success, it will start to
upload message to TTN and user can see in the panel and analyze the data
LoRaWAN Gateway User Manual 21 / 37
www.dragino.com
5. More features
5.1 Packet Filtering
Drop unwanted packets:
See http://wiki.dragino.com/index.php?title=Main_Page#Filter_unwanted_LoRaWAN_packets
5.2 Remote Access
Remote Access Devices for management:
See
http://wiki.dragino.com/index.php?title=Main_Page#Remote_Access_Gateway_via_Reverse_SSH
5.3 More instructions
http://wiki.dragino.com/index.php?title=Main_Page#LoRa.2FLoRaWAN_Gateway_Instruction
LoRaWAN Gateway User Manual 22 / 37
www.dragino.com
6. Linux System
The LG308 bases on OpenWrt Linux System. It is open source, and user are free to configure and
modify the inside Linux settings.
6.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. Below are screenshots:
IP address: IP address of LG308
Port: 22 or 2222
User Name: root
Password: dragino (default)
After log in, you will be in the Linux console and type command here.
LoRaWAN Gateway User Manual 23 / 37
www.dragino.com
6.2 Edit and Transfer files
The LG308 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 LG308 or Edit
the files directly in the windows. Screenshot is as below:
6.3 File System
The LG308 has a 16MB flash and a 64MB RAM. The /var and /tmp directory are in the RAM,
contents stored in /tmp and /var will be erased after reboot the device. Other directories are in
the flash and will keep after reboot.
The Linux system use around 8MB ~10MB flash size which means there is not much room for
user to store data in the LG308 flash. User can use an external USB flash to extend the size for
storage.
LoRaWAN Gateway User Manual 24 / 37
www.dragino.com
6.4 Package maintain system
LG308 uses OPKG package maintain system. 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 LG308 to use iperf
Below is some examples opkgs command, more please refer OPKG 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 iperf // install iperf, it will auto install the required
packages.
root@dragino-169d30:/etc/opkg# opkg install iperf
Installing iperf (2.0.12-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/iperf_2.0.12-1_mips_24kc.ipk
Installing uclibcxx (0.2.4-3) to root...
Downloading
http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/uclibcxx_0.2.4-3_mips_24kc.ipk
Configuring uclibcxx.
Configuring iperf.
LoRaWAN Gateway User Manual 25 / 37
www.dragino.com
7. Upgrade Linux Firmware
We keep improving the LG308 Linux side firmware for new features, bug fixes. The latest
firmware can be found on LoRa Gateway Firmware, and the Change Log can be found here:
Firmware Change Log.
The file named as xxxxx--xxxxx-squashfs-sysupgrade.bin is the upgrade Image. There are
different methods to upgrade, as below:
7.1 Upgrade via Web UI
Go to the page: Web --> System --> Back Up and flash firmware, Select the image and click Flash
Image, the image will be uploaded to the device and then click Process Update to upgrade.
System will auto boot to the new firmware after upgrade.
7.2 Upgrade via Linux console
SCP the firmware to the system /var directory and then run
root@OpenWrt:~# /sbin/sysupgrade -n /var/Your_Image
note: it is important to transfer the image in the /var directory, otherwise it may exceed the flash
size.
LoRaWAN Gateway User Manual 26 / 37
www.dragino.com
8. FAQ
8.1 How can I configure for customized frequency band?
User can customized their LoRaWAN channel since firmware after 2018-Dec-28.
For example: if user want to set the gateway to meet the India LoROIT frequency band:
Step 1: Choose Frequency Band to use “Customized Bands”
LoRaWAN Gateway User Manual 27 / 37
www.dragino.com
Step 2: Configure Radio 0 & 1 Frequency
The LG308 has two Radios from SX1308, we can configure these eights channels base on these
two radios. Go to page Radio Settings and enable Radio 0 to 865700000 / enable Radio 1 to
866500000.
Step 3: Configure Channel Frequency.
What we need to configure for LoRoit is 0~7 multiSF channel frequency and LoRa frequency as
per LoRiot frequency plan.
Each Channel Configure include below parameters:
Radio used for this channel.
Channel IF, frequency shift base on Radio Frequency.
Below is the settings for the LoRiot frequency plan:
Channel 0 frequency=radio0 – 300000Hz
= 865700000-300000 = 865.4Mhz
Channel 1 frequency= 865.6Mhz
Channel 2 frequency= 865.8Mhz
LoRaWAN Gateway User Manual 28 / 37
www.dragino.com
Channel 3 frequency= 866.0Mhz
Channel 4 frequency= 866.2Mhz
Channel 5 frequency= 866.4Mhz
Channel 6 frequency= 866.6Mhz
Channel 7 frequency= 866.8Mhz
Channel LoRaSTD frequency= 865.7Mhz, SF7, BW250Khz
Step 4: Save & Apply & check result in logread page.
LoRaWAN Gateway User Manual 29 / 37
www.dragino.com
LoRaWAN Gateway User Manual 30 / 37
www.dragino.com
8.2 Can I make my own firmware for LG308? Where can I find the source code of
LG308?
Yes, User can make own firmware for LG308 for branding purpose or add customized application.
The LG308 source code and compile instruction can be found at:
https://github.com/dragino/openwrt_lede-18.06
8.3 Can I use the 868Mhz version for 915Mhz bands?
It is possible, you can select US915 frequency band in 868Mhz version hardware, it will work but
you will see performance is highly decrease because the 868Mhz version has RF filter for band
863~870Mhz, all other frequency will have high attenuation.
8.4 Can I control the LEDs?
Except the PWR LED is controlled by +3v3 power directly. 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
Control HEART LED:
First export the gpio27 and set to out
echo 27 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio27/direction
ON: echo 0 > /sys/class/gpio/gpio27/value
OFF: echo 1 > /sys/class/gpio/gpio27/value
LoRaWAN Gateway User Manual 31 / 37
www.dragino.com
9. Trouble Shooting
9.1 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:
* 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
LoRaWAN Gateway User Manual 32 / 37
www.dragino.com
9.2 How to recover the LG308 if firmware crash
LG308 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.
Procedure is as below:
Use a RJ45 cable to connect the PC to LG308’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
All LEDs of the device will blink, release the toggle button after four blinks
All LEDs will then blink very fast once, this means device detect a network connection and
enter into the web-failsafe mode. Your PC should be able to ping 192.168.255.1 after device
enter this mode.
Open 192.168.255.1 in web broswer
Select a squashfs-sysupgrade type firmware and update firmware.
Note: If user sees all LEDs blink very fast in Step 5. This means the network connection is
established. If in this case, PC still not able to see the web page, user can check:
Try different browser.
Check if your PC is in 192.168.255.x
Check if you have connected two RJ45 cable to device, If so, remove the unused one
LoRaWAN Gateway User Manual 33 / 37
www.dragino.com
9.3 I configured LG308 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.
(Note: fallback ip can be disabled in the LAN and DHCP page)
Steps to connect via fall back IP:
1. Connect PC’s Ethernet port to LG01’s LAN port
2. Configure PC’s Ethernet port has IP: 172.31.255.253 and netmask: 255.255.255.252
As below photo:
3. In PC, use 172.31.255.254 to access LG01 via Web or Console.
9.4 How can I see if the SIM card is connected insert?
root@dragino-1bbd90:~# comgt -d /dev/ttyUSB3
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "CHN-CT",7
Signal Quality: 19,99
root@dragino-1bbd90:~#
LoRaWAN Gateway User Manual 34 / 37
www.dragino.com
10. Order Info
PART: LG308-XXX-YYY:
XXX: Frequency Band
868: valid frequency: 863Mhz ~ 870Mhz. for band EU868 or IN865.
915: valid frequency: 902Mhz ~ 928Mhz. for bands US915, AU915, AS923 or KR920
YYY: 4G Cellular Option
EC25-E: EMEA, Korea, Thailand, India.
EC25-A: North America/ Rogers/AT&T/T-Mobile.
EC25-AU: Latin America, New Zeland, Taiwan
EC25-J: Japan, DOCOMO/SoftBank/ KDDI
More info about valid bands, please see EC25-E product page.
11. Packing Info
Package Includes:
LG308 or LG08 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
Packaging with environmental protection paper box
Dimension and weight:
Device Size: 12 x 8.5 x 3 cm
Device Weight: 150g
Package Size / pcs : 21.5 x 10 x 5 cm
Weight / pcs : 360g
Carton dimension: 45 x 31 x 34 cm. 36pcs per carton
Weight / carton : 12.5 kg
12. Support
Try to see if your questions already answered in the wiki.
Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different
timezones we cannot offer live support. However, your questions will be answered as soon
as possible in the before-mentioned schedule.
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
[email protected]
LoRaWAN Gateway User Manual 35 / 37
www.dragino.com
LoRaWAN Gateway User Manual 36 / 37
www.dragino.com
13. Reference
Source code for LG08 LoRa Gateway
https://github.com/dragino/openwrt_lede-18.06
OpenWrt official Wiki
http://www.openwrt.org/
Firmware
http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LG308-OLG308/Firmwa
re/
Hardware Source code:
https://github.com/dragino/motherboard-hardware/tree/master/LG308
LoRaWAN Gateway User Manual 37 / 37