Kiwi TLG8411V1 User manual

Gateway TLG8411V1
User Manual
V1.0.0
July 2020

Gateway TLG8411V1 User Manual V1.0.0
I
July 2020
Table of Contents
1. Introduction ....................................................................................................................... 2
2. Getting Started.................................................................................................................. 4
2.1. Hardware Setup ....................................................................................................................4
2.2. Software Setup......................................................................................................................5
3. Gateway Setting................................................................................................................ 6
3.1. Gateway Portal Overview......................................................................................................6
3.2. Channel Setup.......................................................................................................................8
3.3. LoRaWAN Packet Forwarder Setting ..................................................................................11
3.4. Node-RED Setting...............................................................................................................12
3.5. MQTT Setting......................................................................................................................13
3.6. System Settings ..................................................................................................................14
3.7. System Status.....................................................................................................................19
4. Application Development .................................................................................................22
4.1. LoRaScript ..........................................................................................................................22
4.1.1. LoRaScript API.............................................................................................................29
4.1.2. Parse LoRaWAN Packet ..............................................................................................34
4.1.3. Implement a Simple Protocol........................................................................................36
4.2. Node-RED...........................................................................................................................39
4.2.1. Node-RED Example: Receive LoRa Packet .................................................................39
4.2.2. Node-RED Example: Send LoRa Packet......................................................................41
4.2.3. Node-RED Example: Parse LoRaWAN Packet.............................................................43
5. MQTT Basic Concept and Demo .....................................................................................45
6. LoRa Packet Statistics and Logs .....................................................................................48
7. Troubleshooting ...............................................................................................................49
7.1. LoRaWAN Packet Forwarder Cannot Send Packets ...........................................................49
8. Revisions .........................................................................................................................51
8.1. V1.0.0..................................................................................................................................51
9. References.......................................................................................................................52
10.Japan compliance statement..........................................................................................53

Gateway TLG8411V1 User Manual V1.0.0
2
July 2020
1.Introduction
Kiwitec TLG8411V1 is hybrid LoRa Gateway which can provide the LoRa Concentrator to
receive all packets with different spreading factors at fixed frequencies. The Packet For-
warder can redirect packets to the Internet, and support Machine-to-Machine protocol MQTT
for connecting Internet of Things. You can access quickly TLG8411V1 through our Web Portal;
it also supplies online scripting LoRaScript and Node-RED for customizing data processing.
You can use modern browsers such as Chrome and Firefox to manage TLG8411V1 to setup
concentrator channel, packet forwarding, MQTT broker, and network configuration and cus-
tomize your plugins for designated purpose. The followings are TLG8411V1’s software and
hardware specification and its overall views.
Software Specification
Table 1-1 Software Specification of TLG8411V1
Administration Portal
Support Chrome or Firefox
Discovery Tool
Windows 7 or above
M2M Protocol
MQTT
Packet Forwarder
Compatible with ANNWS.01.2.1.W.SYS Gateway to
Server Interface
Firmware Upgrading
Support Online Upgrading through Web browser
Network Interface
Support DHCP, Static IP and DHCP Server

Gateway TLG8411V1 User Manual V1.0.0
3
July 2020
Hardware Specification
Table 1-2 Hardware Specification of TLG8411V1
Model
TLG8411V1
Transceiver
Semtech SX1301
CPU
TI AM3352 (ARM Cortex-A8)
Memory
512 Mbytes (DDRIII)
Flash
256 Mbytes (NAND Type)
Connectivity
Ethernet 10/100 Mbps
Wireless
LTE
Full duplex LoRa
Power Supply
12V/2A DC Adaptor
Frequency Range
920 MHz ~ 928 MHz
Modulation
LoRa (spreading spectrum)
Number of Channels
16
Operation Temp.
-20 ~ 65℃
Storage Temp.
-40 ~ 85℃
IP Rating
IP52
Figure 1-1 TLG8411V1 Gateway Overall View
SD Card Slot
Ethernet/USB
SIM Card Slot
Power Jack
Front View:
Rear View:
Left View:
Right View:

Gateway TLG8411V1 User Manual V1.0.0
4
July 2020
2.Getting Started
2.1. Hardware Setup
Before starting to use TLG8411V1 gateway, the power and Ethernet need to be connected
well. The RJ45 is used to connect to a network router which can access Internet. The power
supply is used a DC12V power input. To access Internet through LTE cellular network, a
SIM card (nano-sim) must be installed.
Figure 2-1 Setup

Gateway TLG8411V1 User Manual V1.0.0
5
July 2020
2.2. Software Setup
The quick start to using TLG8411V1 Gateway as follows:
1. Search wireless SSID with TLG8411- prefix, Figure 2-2, and connect it via laptop. The
default password for connecting wireless is "tlg8411ap".
2. Open browser and input 10.42.43.1 at URL.
3. TLG8411V1 administration portal can be seen in browser, as shown in Figure 2-3.
4. Enter username and password to login, the default username is "admin" and password
is "admin".
5. Go to System → Network Configuration to check the IP address of Ethernet and make
sure it can access Internet.
6. Go to Setup → Channel Setup to set up the LoRa concentrator, including receiving fre-
quency, spreading factor. For more detailed refers to section 3.2 Channel Setup.
7. Activate your LoRa Nodes and start to send packet.
8. Go to Status → LoRa Receive Log to observing status of receiving LoRa packets.
Figure 2-2 Search Wireless SSID
Figure 2-3 TLG8411V1 Login

Gateway TLG8411V1 User Manual V1.0.0
6
July 2020
3.Gateway Setting
3.1. Gateway Portal Overview
Kiwitec TLG8411V1 Gateway is a hybrid gateway for processing complexity LoRa packet.
Besides, receiving LoRa packet from fixed frequencies, it also provides the LoRaWAN packet
forwarding to transport packets to other machines or nodes, and MQTT for machine-to-ma-
chine communication between IoT devices. For customized data processing, TLG8411V1
also has its APP development environment, namely LoRaScript which is a Kiwitec’s proprie-
tary online scripting, and Node-RED with our particular components for visualizing deploy-
ment in a data flow.
Figure 3-1 TLG8411V1 Portal
Figure 3-1 is TLG8411V1 gateway portal overview; the portal provides concentrator channel
setup and LoRaWAN packet forwarder in Setup section. We also provide Concentrator and
MQTT controlling for enable/disable concentrator and manage MQTT broker and publisher
status. A demonstration of MQTT is present in section 5.
For customization, TLG8411V1 support two JavaScript-based scripting approaches, the Lo-
RaScript and Node-Red, using them to process packets in a specific way and define packet's
next routing hop. For online statistics, TLG8411V1 has a LoRa Packet Statistics, it accumu-
lates packets number in each frequency. For examining packets in real-time, you can use the

Gateway TLG8411V1 User Manual V1.0.0
7
July 2020
LoRa Receive Logs, it acts as virtual terminal and reveals all received packets content on
the fly. TLG8411V1 network configuration supplying three configurations, DHCP client, Static
IP, and DHCP server, you can choose any one of them in customizing network environments.
For security and system management, TLG8411V1 can change its password and support
online upgrading in the Change Password and System Status.
Section 3.3 describes LoRaWAN Packet forwarder Setup, section 3.4 and 3.5 introduces
Node-RED and MQTT settings, System settings and network configuration are illustrated in
3.6, and 3.7 presents System Upgrading and Reset on TLG8411V1.

Gateway TLG8411V1 User Manual V1.0.0
8
July 2020
3.2. Channel Setup
Channel setup, as shown in Figure 3-2. To setup LoRa concentrator frequencies for receiv-
ing packets, there are some parameters must be set, such as using LoRaWAN or not, de-
fine Sync Word for identifying the packet prefix, choosing each radio’s central frequencies,
setup frequency bias in each channel, to define standard LoRa channel bandwidth and
other options. Table 3-1 describes each parameter’s options.
Figure 3-2 Channel Setup

Gateway TLG8411V1 User Manual V1.0.0
9
July 2020
Table 3-1 Channel Setup Parameters
Name
Value
Comment
LoRaWAN
True / False
Use LoRaWAN or not.
Sync Word
Number in decimal
Set packet prefix Sync-Word for trigger-
ing gateway to receive packet.
If LoRaWAN is true, Sync-Word is fixed
to 52 (0x34).
radio_0 / radio_1
Set central frequency of radio 0 and radio 1.
chan_Lora_std
The LoRa standard channel setting includes interface hooking (ra-
dio_0 / radio_1) spreading factor, bandwidth and frequency bias.
The chan_Lora_std only accept packet in particular spreading factor
in that frequency. The actual frequency is shown in red color as last
field in Figure 3-2.
chan_multiSF
(0-7)
The general channel settings include enable / disable channel, inter-
face hooking (radio_0 / radio_1) and frequency bias.
The chan_multiSF_x will receive packets with all spreading factor
(SF7~SF12) in designated frequency. The actual frequency is shown
as red color at last field in Figure 3-2.
Note that chan_multiSF_x can only operate in 125K bandwidth.
Because radio_0 and radio_1 can only down-converts 1.0MHz spectrum, all channels must
be fitted in two 1.0MHz wide intervals, as shown in Figure 3-2. Figure 3-4 shows an example
that multiSF0 exceeds interval of radio 0. In this case, multiSF0 exceeding interval,
TLG8411V1 would not start correctly.
912.5 MHz
radio 0
916.5 MHz
multiSF0
LoRaStd
multiSF1
multiSF2
multiSF3
multiSF4
multiSF5
multiSF6
multiSF7
1.0MHz
radio 1
1.0MHz
Figure 3-3 Frequency Setup Example

Gateway TLG8411V1 User Manual V1.0.0
10
July 2020
912.5 MHz
radio 0
916.5 MHz
multiSF0
LoRaStd
multiSF1
multiSF2
multiSF3
multiSF4
multiSF5
multiSF6
multiSF7
1.0MHz
radio 1
1.0MHz
Figure 3-4 multiSF0 Exceeds Interval of radio 0
In addition, this two radio central frequencies can be set independently therefore TLG8411V1
can operate over two independent chunk of 1.0MHz, as shown in Figure 3-5. The two 1.0MHz
intervals can overlap without problem and the number of channels in each interval is also
arbitrary, as show in Figure 3-6.
915.7 MHz
radio 0
916.5 MHz
multiSF0
LoRaStd
multiSF1
multiSF2
multiSF3
multiSF4
multiSF5
multiSF6
multiSF7
1.0MHz
radio 1
1.0MHz
Figure 3-5 Overlap of Radio Interval
912.5 MHz
radio 0
916.5 MHz
multiSF0
LoRaStd
multiSF1
multiSF2
multiSF3
multiSF4
multiSF5
multiSF6
multiSF7
1.0MHz
radio 1
1.0MHz
Figure 3-6 All multiSFs in Single Interval

Gateway TLG8411V1 User Manual V1.0.0
11
July 2020
3.3. LoRaWAN Packet Forwarder Setting
Figure 3-7 shows the LoRaWAN packet forwarder setting, all incoming and emitting packets
are forwarding according to the setting; the Gateway ID describes the TLG8411V1 ID. Server
Address, and Server Port Up are used to set LoRaWAN server to forward packets. All for-
warding packets will through IP/UDP link to a destination. The Keepalive Interval, Statistic
Interval, and Push Timeout define the aggressive connection policy and its refresh time. If
the Fake GPS enable, each forward packet would append the GPS information. The Packet
Forwarder Control provide user to stop or restart packet forwarder.
Figure 3-7 LoRaWAN Packet Forwarder Setting

Gateway TLG8411V1 User Manual V1.0.0
12
July 2020
3.4. Node-RED Setting
Node-RED Setting is presented in Figure 3-8. Node-RED is a visual tool for wiring the Internet
of Things, referring http://nodered.org for detailed usage. The Node-RED provides an online
web-based editor; packet's processing task can be formed using wiring components in Node-
RED. For login Node-RED, the default login user account and the password are "admin",
however for a customizing, the password can reset through Reset Password. In the setting
page, the Status shows the Node-RED stopped or running. You can change Node-RED sta-
tus through Stop and Start button, but be patient, the initialization start time of the Node-RED
in TLG8411V1 is about 20 seconds. Because TLG8411V1 is an Ajax-based web portal, re-
starting Node-RED may cause the web browser frozen; it will recover after Node-RED startup.
Figure 3-8 Node-RED Setting

Gateway TLG8411V1 User Manual V1.0.0
13
July 2020
3.5. MQTT Setting
TLG8411V1 provides MQTT setting (Figure 3-9) to link the machine-to-machine communica-
tion in Internet of Things. MQTT broker is respond for transferring publishing message and
handle subscribing topics to all clients; it acts as a central transportation to move messages
to subscribers in designated topics. MQTT Publisher is a charge of receiving LoRa packets
and publish message to MQTT broker. MQTT Subscriber subscribes transmit packet from
broker and emit the packet. The topic string for MQTT Publisher and MQTT Subscriber can
be set at Receive Packet Publish Topic and Transmit Packet Subscribe Topic.
You can stop or restart MQTT broker or MQTT publisher/subscriber through control buttons
in MQTT management. The Status in each panel shows the MQTT service situation in the
TLG8411V1 gateway.
Figure 3-9 MQTT Management

Gateway TLG8411V1 User Manual V1.0.0
14
July 2020
3.6. System Settings
Password Setting
You can change the password as shown in Figure 3-10. Fill the new password and press
Reset Password button, the new password applied in the next login. Instead of the default
password, which is admin, password needs to be at least 8 letters and must contain at
least one number and one uppercase alphabet.
Figure 3-10 Change Password

Gateway TLG8411V1 User Manual V1.0.0
15
July 2020
Network Setting
TLG8411V1 provides three network configurations for Ethernet connection, DHCP (Figure
3-11), Static IP (Figure 3-12) and DHCP Server (Figure 3-13). To use the DHCP, enable the
DHCP checkbox. Static IP needs information about IP address, network mask, and default
gateway. To act as DHCP Server, the IP address, network mask and DHCP start and end
address must be provided.
Figure 3-11 Network Configuration
Figure 3-12 Static IP Setup

Gateway TLG8411V1 User Manual V1.0.0
16
July 2020
Figure 3-13 DHCP Server Setup
Wireless Network Setting
TLG8411V1 provides a wireless AP for connected by laptop. This wireless AP function can
be enable/disable from Wireless Network, Figure 3-14. The SSID is also shown on this con-
figuration page. The password for connecting to TLG8411V1 via wireless is "tlg8411ap".
Figure 3-14 Wireless Configuration

Gateway TLG8411V1 User Manual V1.0.0
17
July 2020
Cellular Network Setting
TLG8411V1 also provides cellular network if the 3G/4G module is present. The setup of cel-
lular network is shown at Figure 3-15. Please contact your cellular operator for the setting of
APN, Username, and Password (some operator setting only needs APN). The Dial Number
is usually "*99***1#" in most of countries. DONOT change APN if you are not sure the
number.
Figure 3-15 Cellular Network Setup

Gateway TLG8411V1 User Manual V1.0.0
18
July 2020
IP Forward Setting
IP Forward is a function to share TLG8411V1 network to devices connecting to TLG8411V1
through wireless or LAN. For example, a laptop can access Internet via wireless connection
to TLG8411V1 if cellular network onTLG8411V1 is connected.
Figure 3-16 IP Forward Setup

Gateway TLG8411V1 User Manual V1.0.0
19
July 2020
3.7. System Status
System Upgrade and Reset
Upgrading and Reset are located in the System Status as shown in Figure 3-17. TLG8411V1
provides online upgrading functionality to let the off-the-shelf gateway refresh with new firm-
ware; when a new firmware published, you can download a new firmware from our website,
and use Choose File to select a new firmware and Upgrade. The upgrading must keep the
gateway power-on until upgrading finished. The gateway time can be modified using Modify
button, and final when something wrong, you can press Reboot to restore gateway in an
initial status.
If you press Factory Reset button on the TLG8411V1 front panel, TLG8411V1 restores its
system configuration to original status. All settings, such as concentrator channel, packet
forwarder and MQTT, would be restored as default settings. Be careful to use Factory Reset,
the important settings might be lost in restore operation. When system is in reset, the LED of
power status at front-side is turned to red.
Auto Reboot
Auto Reboot is a function that can let gateway reboot at specified time every day.
Figure 3-17 TLG8411V1 Upgrading
Table of contents
Other Kiwi Gateway manuals