Sensing Labs SLgateway V2.5 Series User manual

©2020 Sensing-labs
1
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Table des matières
General overview ............................................................................................................... 4
The Gateways range ............................................................................................................ 4
SLgateway main features ...................................................................................................... 5
LoRaWan ..................................................................................................................... 5
Graphical user interface (GUI)........................................................................................... 5
Data APIs access ........................................................................................................... 5
SLgateway specification........................................................................................................ 6
STEP 1: Configuration & Installation of gateway ........................................................................... 7
SLgateway assembly (picoGW) ................................................................................................ 7
SLgateway assembly (Gateway-8CH) ......................................................................................... 8
SLgateway positioning .......................................................................................................... 9
First access to the GUI (over ethernet on 192.168.2.1) ................................................................... 9
Set SLgateway local time .....................................................................................................11
Authentication password configuration .....................................................................................13
Ethernet interface configuration ............................................................................................13
GSM/GPRS configuration (picoGW only) .................................................................................... 13
Easy gateway update from GUI (from V2.3.0)..............................................................................14
SFTP access (for Update & advanced configuration) (for expert in network management only) ...................14
Advanced configuration (for expert in network management only) ................................................... 15
DynDNS ...................................................................................................................... 15
NTP server....................................................................................................................15
Hostname/hosts customization .........................................................................................16
DNS server customization ................................................................................................16
Custom OpenVPN client ................................................................................................. 17
Firewall rules.................................................................................................................18
STEP 2: Device provisioning into gateway .................................................................................. 19
Add a new device .............................................................................................................. 19
Add multiple devices at once................................................................................................. 19
Remove a device ............................................................................................................... 20
STEP 3: Activation of device..................................................................................................20
Device network activation process .......................................................................................... 20
Device application start .......................................................................................................20
Device data transmission......................................................................................................21
STEP 4: Device data access via APIs ......................................................................................... 22
Rest API..........................................................................................................................23

©2020 Sensing-labs
2
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
HTTP Callback .................................................................................................................. 23
HTTP Callback configuration (SLgateway side).......................................................................... 24
Callback format............................................................................................................ 24
MQTT.............................................................................................................................25
MQTT configuration (SLgateway side) ....................................................................................25
MQTT format ................................................................................................................26
CSV to FTP....................................................................................................................... 26
File format ...................................................................................................................26
CSV to FTP configuration ...................................................................................................26
Elasticseach ..................................................................................................................... 27
Elasticseach configuration (SLgateway side) ............................................................................27
Sentilo ...........................................................................................................................28
Sentilo configuration (SLgateway side)...................................................................................28
Modbus API ......................................................................................................................28
Modbus mapping configuration ............................................................................................29
Troubleshooting ................................................................................................................ 30
I don’t succeed to activate my device onto the gateway ................................................................30
I have forgotten the current IP network gateway configuration ........................................................31
I have forgotten the user and/or password to access to the GUI .......................................................31
How to configure my SLgateway to static IP address (Ethernet)? .......................................................32
How to come back to the default Ethernet configuration (static 192.168.2.1)? ......................................32
How to recover all data stored in my SLgateway? .........................................................................33
Do you have any other questions?............................................................................................33
How to get technical support?................................................................................................ 33
Annex - GUI .....................................................................................................................34
GUI structure (V2.4.x) .........................................................................................................34
Application –device list ....................................................................................................... 35
Application –device detail.................................................................................................... 35
Network –device list...........................................................................................................36
Network –device detail .......................................................................................................37
Tools –Remote management ................................................................................................. 39
Tools –SLTester ................................................................................................................ 39
Maintenance - Network settings ............................................................................................. 42
Maintenance - Services ........................................................................................................43
Maintenance - System .........................................................................................................43
Legals ............................................................................................................................ 44

©2020 Sensing-labs
3
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I

©2020 Sensing-labs
4
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Thank you for choosing our SLgateway product!
General overview
SLgateway is an IoT station developed with the aim to reduce the cost of deploying a
radio network for small and medium size applications.
The gateway integrates the SLbase software designed to meet the need for a plug and
play LoRaWAN™ local network solution:
•All in one LoRaWan solution with RF modem, Network & Application layers
•Graphical user interface for managing LoRa devices, accessing to application
data (measures, payloads) and RF network information, and secured access to
gateway
•Various types of API to access device data (Rest API, HTTP Callback, Modbus, MQTT)
The Gateways range
All gateways references embed SLGatewayV2.
Part number
Gateway name
Modem
Channels
Protection level
Dimensions / Weight
(without accessories)
PIC-LAB-63NS
Pico GPRS
GPRS
3 CH
IP30
(indoor use)
101x74x35 mm / 135 gr
GAT-LAB-6NN3
Gateway-8CH
No
8 CH
IP30
(indoor use)
126x80x46 mm / 290 gr
Pico GPRS Gateway-8CH
LoRa devices
(sensors...) SLgateway
Final customer
Application
•WebApp
•PLC
•...
Figure 1 : SLGateway basic diagram

©2020 Sensing-labs
5
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
SLgateway main features
LoRaWan
✓Support of LoRaWan 868MHz devices, configurable in ABP / OTAA for PUBLIC
network with configurable AppEUI
✓Network level supervision with highlight of disconnected devices
✓Up to 200 devices with 1 message transmission every hour
✓Storage of all received data for 100 days
For more information about the LoRaWAN concept and technology, we advise you to
read these documents:
•General overview: LoRaWAN™ What is it?
•Technical description: LoRaWAN™ 101 – A Technical Introduction
(source: lora-alliance.org)
Graphical user interface (GUI)
✓Add/ Import/Remove devices
✓Quick visualization of current device measures
✓Quick visualization of current device network state
✓Export all displayed data in CSV format file
✓Export all stored data in CSV format file (since V2.3.0)
✓Remotely downlink message management (reconfiguration for Senlab)
✓Graphical configuration of system (IP network, log access, …)
✓Backup/restore services configuration
✓RF range test dashboard and results export: SLtester tool
✓Same GUI for all SLgateway references
Data APIs access
✓REST API: SLbase HTTP standard API for accessing all data in application/xml or
application/json formats
✓HTTP Callback(s): Real time customer listener notification of received
data/payload/status in json or xml format
✓Modbus API: Gateway as a TCP Modbus slave for getting data threw a PLC system
✓CSV to FTP: Periodic transfer of CSV format file on an FTP/SFTP server of last received
data (for Senlab only)
✓MQTT: Subscription management to services, real time data notification to
customer server
✓Elasticsearch: RESTful search and analytics engine capable of solving a growing
number of use cases (www.elastic.co)
✓Sentilo: open source sensor and actuator platform designed to fit in the Smart City
architecture (www.sentilo.io)
(refer to section “STEP 4” for more details and “how to use” for each APIs)

©2020 Sensing-labs
6
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
SLgateway specification
Specification
Description
Operating system (OS)
Linux Debian
Ethernet
RJ45 plug
GSM/GPRS (picoGW only)
GPRS modem (full-size SIM card)
Database
Storage of last 100 days data
Data APIs access
IoT platform compatibility
Rest API, HTTP Callback(s), CSV to FTP, Modbus TCP
DEXCell(Dexma), Sentilo
MQTT, Elasticsearch
Graphical User Interface
Light GUI for gateway configuration & management
Security
Login/Password authentication (HTTP security)
Firewall rules
RTC (picoGW only)
Hold current clock/date without external power supply.
Software maintenance
Easy update from GUI (or SFTP)
Advanced configuration processes (SFTP)
Backup/Restore
Backup and restore all service configuration of the SLgateway
For massive SLgateway configuration
CSV data export
Export all data or from selected days to CSV file
Remote access
VPN: Easy activation for remote access for SL support team
(you can also to connect to your own OpenVPN server)
DynDNS: need dynDNS account and a public IP
Ngrok: need ngrok account, work with private or public IP
Remote management
(since V2.4.x)
Embedded tools and features for GW fleet management:
(with REST API, MQTT, HTTP callback, or ngrok):
- automatic send of gateway and device status
- remote reconfiguration for gateway and devices
RF
ISM 868Mhz band (Power +14dBm / Sensitivity -137dBm)
RF Range tester
Local LoRaWAN network coverage test dashboard
(required a Senlab Test devices)
LoRaWan network server
ABP or OTAA activation mode
PUBLIC (default since V2.0.2) or PRIVATE network type
Downlink acknowledge option
picoGW: 3 channels (868.1,868.3,868.5MHz)mono datarate (SF12)
Gateway-8CH: 8 channels - ADR from DR0 (SF12) to DR5 (SF7)
LoRaWan application server
Application messages Decryption & Encryption
Integrates SLcodec for Senlab messages decoding

©2020 Sensing-labs
7
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Before starting, remember the 4 steps to make the global system fully operational:
STEP 1
STEP 2
STEP 3
STEP 4
This document describes all these 4 steps.
We strongly advise to back up the full gateway configuration after the on-site
deployment step, after first data (Refer to Maintenance - Services section)
STEP 1: Configuration & Installation of gateway
SLgateway assembly (picoGW)
The delivered package includes:
1. A GSM/GPRS antenna (the smaller)
2. An 868MHz LoRa antenna (the longer)
3. An ethernet cable (Cat 5.e - 1m)
4. A 230V power adapter
5. The SLgateway
6. The “Getting started” document
Assembly of the SLgateway (picoGW)
1. Insert SIM card:
✓open the upper side of the gateway casing
✓LOCK the grey cap by pushing it outwards
✓Close the upper side of the gateway casing
2. Screw both antennas
3. Plug the power supply
✓To prevent electronic damage:
the gateway must not be powered without antennas
Configuration &
Installation of
gateway
Device
provisioning
into gateway
Activation of
the device Device data
access via APIs
1
2
3
4
5
6

©2020 Sensing-labs
8
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
SLgateway assembly (Gateway-8CH)
The delivered package includes:
1. An 868MHz LoRa antenna
2. An ethernet cable (Cat 5.e - 1m)
3. A 230V power adapter (microUSB)
4. The SLgateway
5. The “Getting started” document
Assembly of the SLgateway (Gateway-8CH)
1. Screw the antenna
2. Plug the power supply on micro USB port (see photo)
✓To prevent electronic damage:
the gateway must not be powered without antenna
1
2
3
4
5

©2020 Sensing-labs
9
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
SLgateway positioning
➢Position both antenna with 90° elbow and its main part upwardly (vertical) in free
space area
➢Avoid positioning the SLgateway against or inside metallic/electric elements
oIf not possible, use RF cable extension to position outside the LoRa antenna
(see photos on next page)
➢If LoRa devices are in a different building than or outside the building where the
gateway is installed, it is recommended to deport antennas (at least LoRa
antenna) and/or SLgateway on a higher position.
First access to the GUI (over ethernet on 192.168.2.1)
Computer SLgateway

©2020 Sensing-labs
10
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Steps to follow with default configuration
1
:
1. Start your SLgateway (power up)
2. Configure your computer1
IPv4 static address: 192.168.2.2
subnet mask 255.255.255.0
(PC network Ethernet properties)
3. Connect your computer to SLgateway using the Ethernet cable
4. Access to http://192.168.2.1 (check this FAQ here about browsers compatibility)
5. Enter default user/password when asked: public/public
Congratulations! You are now connected to the SLgateway.
1
Default configuration of SLGateway is static IP 192.168.2.1
Trick: If the time is frozen, the
connection is lost (or bad)

©2020 Sensing-labs
11
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Set SLgateway local time
After 1st boot, you have to synchronize the timestamp of the gateway:
1. Check if your computer local time is OK?
2. Access to the “Maintenance →System” page
3. Click and confirm at the pop-up screen.
4. Check the new SLgateway UTC time in the right bottom part of the GUI screen.
Some important points to know about SLgateway clock:
- because of the hardware clock drift, and because all data are timestamped
with this clock, you need to be sure the clock is often updated.
- you need to update it manually (“Sync Date Time” button) before to start any
communication with devices
- “PicoGW” hold the current clock (with drift) even if not powered
- “Gateway-8CH” don’t have internal self-powered RTC: it will restart with the last
clock

©2020 Sensing-labs
12
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
GW with internet access ?
(Ethenet or GPRS)
YES
Nothing more to do:
Clock is automaticly
updated
(with public NTP server)
NO
Is there a local NTP server ?
YES
You need to customize
the NTP server address.
(refer "advanced configuration")
NO
You need to implement an periodic process
to update the clock
(once a day for example):
- with Modbus API (refer to Modbus API section)
OR
- with REST API (refer to REST API section)

©2020 Sensing-labs
13
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Authentication password configuration
We advise you to replace the default password from “Maintenance →GUI Settings”
➢In case of password lost, please create an online ticket here
➢You can also change the friendly System Name into the same page
Ethernet interface configuration
You can change the default Ethernet configuration to fit to your local network from
“Maintenance →System”, with button
➢If you lost the current IP address, you can use the Over USB connection, refer to
troubleshooting section: I have forgotten the current IP network gateway configuration
➢If you need to configure Ethernet to a static IP on a local network, refer to
troubleshooting section:How to configure my SLgateway to static IP address
(Ethernet)?
➢You can “ping” a server to check your configuration (result is in “Network log”)
GSM/GPRS configuration (picoGW only)
1. Check the SIM card and GSM/GPRS antenna are well installed (cf. “STEP1”)
2. Access to “Maintenance →System” page
3. In section “GSM configuration”, fill the fields with GSM/GPRS information (given by
your SIM card provider):
✓PIN code (optional)
✓APN (required)
✓Username and password (for PAP or CHAP authentication)
4. Apply new configuration with (see “network log” screen for detail)
(if you enter a PIN code, you will need to reboot with ).
If successful, “ppp0” appears in IP network interface.
5. Once the settings are OK reboot with to save
6. definitely into the gateway.
After a boot or reboot, all configuration and stored data can take 2 minutes to be
fully loaded.
You can check the GSM/GPRS quality level (updated only after ).
You can stop the GSM/GPRS connection when you want with button .

©2020 Sensing-labs
14
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Easy gateway update from GUI (from V2.3.0)
The update file must be:
- lower than 10 MB (V2.3.x) (a patch is available to expand this limit to 150MB)
- lower than 150 MB (V2.4.1)
If you need to load a larger file, please use SFTP process.
1. Get your update file (extracted from zip)
2. Access to “Maintenance →Update” page
3. Load the update file (generally named update.run.enc) –can take up to 1 min.
4. Reboot & Wait some minutes (up to 6 minutes for major update)
5. Connect to GUI and check version number (footer)
SFTP access (for Update & advanced configuration)
(for expert in network management only)
Requirement:
➢Local access to the SLgateway (with Ethernet cable)
default Gw IP 192.168.2.1 --> Check your Computer is on the same subnetwork
Also possible with GPRS connection in some cases (not for update)
➢Filezilla-client software installed on your computer
➢The “sshpass” (different for each gateway), please ask us here: send us the
Gateway ID (xxxBBBKxxxx format)
Launch Filezilla software:
1. “File→Site Manager”
2. Create a new site with:
✓Host: 192.168.2.1(default)
✓Port: 2022
✓Protocol: SFTP
✓Logon Type: normal
✓User: public
✓Password: your_ GW_sshpass
3. Save and connect
You can now have an access to several directories and file for updating or advanced
configuring (see next section).

©2020 Sensing-labs
15
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Advanced configuration
(for expert in network management only)
In case of SLgateway massive deployment, you can configure all in one (for all
SLgateways) in the same process, only for these configurations:
•NTP server
•DNS server
•Host (only specifics server addresses)
•Firewall rules
DynDNS
You can use the DynDNS service to connect remotely to your SLgateway if the IP
change (require an PUBLIC IP).
Since V2.4.2, this function is disabled by default.
Contact us if you want activate this function.
NTP server
You can customize the NTP server by filling your own NTP server address.
Requirement:
➢Active GPRS or local ethernet connection
➢SFTP access (see SFTP access (for Update & advanced configuration))
Process:
1. Connect to the picogw via SFTP protocol (with Filezilla software)
2. Copy the files timesyncd.conf from /update/templates/ to your computer
3. Edit the timesyncd.conf file and replace the default NTP server address
4. Save and copy the new file to /update via SFTP
5. Reboot SLgateway (GUI: “Maintenance→System→Reboot”) to load the file
6. Reboot one more time to apply new settings

©2020 Sensing-labs
16
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Hostname/hosts customization
You can change the hostname of your SLgateway, useful in a DHCP configuration.
You can also add your specifics server address in hosts file.
Requirement:
➢Active GPRS or local ethernet connection
➢SFTP access (see SFTP access (for Update & advanced configuration))
Process:
1. Connect to the picogw via SFTP protocol (with Filezilla software)
2. Copy the files hostname and hosts from /update/templates/ to your computer
3. Edit the hostname file and replace the default hostname (slbasev2inside)
4. Edit the hosts file and replace the default hostname in the first line
OPTIONNAL: add your specifics server addresses after the last line
5. Save and copy the new files to /update via SFTP
6. Reboot SLgateway (GUI: “Maintenance→System→Reboot”) to load the files
7. Reboot one more time to apply new settings
DNS server customization
You can change/add DNS server(s) of your SLgateway, useful in a “Static IP”
configuration and local network.
Requirement:
➢Active local ethernet connection
➢No GPRS connection (the GPRS connection will rebuild a new resolv.conf file)
➢SFTP access (see SFTP access (for Update & advanced configuration))
Process:
1. Connect to the picogw via SFTP protocol (with Filezilla software)
2. Copy the files resolv.conf from /update/templates/ to your computer
3. Edit the resolv.conf file and add/replace the DNS server(s) you want to use
(keeping the format the format nameserver x.x.x.x)
4. Save and copy the new files to /update via SFTP
5. Reboot SLgateway (GUI: “Maintenance→System→Reboot”) to load the files
6. Reboot one more time to apply new settings

©2020 Sensing-labs
17
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Custom OpenVPN client
You can configure SLgateway to connect to your own OpenVPN server.
Requirement:
➢OpenVPN server reachable from public IP address
➢OpenVPN client configuration file (rename xxxx.ovpn to custom.conf)
IPV6 is not supported by SLgateway (ask us for more detail)
You need to add
➢Internet access, from GPRS or ethernet connection
➢customvpn.redis file (ask for it on support.sensing-labs.com)
➢SFTP access (see SFTP access (for Update & advanced configuration))
Process:
1. Load customvpn.redis in SLgateway (GUI: “Maintenance→Services→Restore a
service backup). Confirm with “Yes” when pop up ask it.
2. Wait one minute (services will restart)
3. Check “Custom VPN” menu appears (GUI: “Tools→Remote management)
If not, refresh the page (press F5 on keyboard)
4. Connect to the picogw via SFTP protocol (with Filezilla software)
5. Copy the files custom.conf to /openvpn
6. Press and check your GW is connected to your VPN:
If successful, “tun0” appears in IP network interface
(GUI: “Maintenance→System)
7. If you want to force VPN connection when GW restart, active with (by default,
persistence is disable)
8. Reboot and check VPN connection is automatically started.

©2020 Sensing-labs
18
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
Firewall rules
Warning:
In case of bad firewall rules, you can lose communication with SLgateway
You can customize firewall rules to increase the security level.
Requirement:
➢Active local ethernet connection
➢SFTP access (see SFTP access (for Update & advanced configuration))
➢UFW knowledge (online documentation here)
Remember: Port 80 = GUI and REST API port 2022 = SFTP/SSH port 502 = Modbus
Process:
1. Connect to the picogw via SFTP protocol (with Filezilla software)
2. Copy the files template_fw.rules from /update/templates/ to your computer
3. Edit the file and add the rules you want
(allow port 502 and 5020 if Modbus)
delete allow in on eth0 to any port 80 proto tcp
delete allow in on eth0 to any port 2022 proto tcp
delete allow in on eth0 to any port 502 proto tcp
delete allow in on eth0 to any port 5020 proto tcp
delete allow in on ppp0 to any port 80 proto tcp
delete allow in on ppp0 to any port 2022 proto tcp
allow from <your_ip_or_network> to any port 2022 proto tcp
allow from <your_ip_or_network> to any port 502 proto tcp
allow from <your_ip_or_network> to any port 5020 proto tcp
allow from <your_ip_or_network> to any port 80 proto tcp
4. Save as firewall.rules and copy the file to /update via SFTP
5. Reboot SLgateway (GUI: “Maintenance→System→Reboot”) to load the files
6. Reboot one more time to apply new settings
You can check the current FW rules and check previous UFW actions:
/update/update.log
To restore the initial FW rules, you need to delete allowed IP you had before (edit
and reboot).
For example remove 192.168.1.247 (old IPs can be retrieved in sftp update.log
file):
allow in on eth0 to any port 80 proto tcp
allow in on eth0 to any port 502 proto tcp
allow in on eth0 to any port 5020 proto tcp
allow in on eth0 to any port 2022 proto tcp
delete allow from 192.168.1.247 to any port 2022 proto tcp
delete allow from 192.168.1.247 to any port 80 proto tcp

©2020 Sensing-labs
19
Sensing Labs SLgateway V2.5.x –User Guide E02 rev I
STEP 2: Device provisioning into gateway
SLgatewayV2 is configured in PUBLIC LoRaWan network with appEUI 70B3D580A0000000
➢It supports both OTAA & ABP activation type.
➢You have to check that your devices are commissioned in PUBLIC mode
(with SLsetting tool for Senlab)
➢For any other configuration, please create an online ticket here:
Add a new device
1. Access to “Network”page & click on button
2. Enter device provisioning information
•Name: friendly name of device displayed into GUI
•Activation: OTAA or ABP
•DevEUI: Unique identifier of LoRa device (IEEE EUI64 address)
•For ABP: devAddress, NwkSKey & AppSKey
•For OTAA: Application key
3. Confirm with button
The new device will appear into “Application”and “Network”page.
You can now immediately install and activate it! (see device User Guide)
If you don't have the device keys, contact your distributor/reseller with devEUI.
Add multiple devices at once
For importing multiple devices at once, you have to use the SLsetting import feature. It
allows you to add all new devices contained into a CSV file (generated with
SLsetting).
1. Access to “Tools →SLSetting import” page
2. Choose the csv file to import using button
3. Check device list (Fw type, Activation, …) and add them with button
The new device will appear into “Application” and “Network” page.
You can now immediately install and activate it! (see devices User Guide)
Since V2.4.2, you can see the number of registered devices in the footer:
(you could need to refresh the page with F5 key if you add/remove device)
Number of registered devices
(29 devices in this example)
This manual suits for next models
2
Table of contents