User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
LoRa IOT Starter Kits
User’s Guide
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 1
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
Table of contents
Section
1.
Page
Goal of this Kit ......................................................................................................................................................... 3
2.
Contents of the development kit .............................................................................................................................. 3
3.
Getting Started......................................................................................................................................................... 4
4.
3.1.
Connection to an Ethernet Network ................................................................................................................. 4
3.2.
Connection using an Ethernet Cable ................................................................................................................6
RaspberryPI software .............................................................................................................................................. 9
4.1.
RaspberryPI command line access ................................................................................................................. 9
4.2.
Access using PuTTY ......................................................................................................................................10
4.3.
Access using UNIX terminal console ............................................................................................................. 11
5.
Application Software Locations.............................................................................................................................. 12
6.
Starting / Stopping the demon scripts.................................................................................................................... 13
7.
8.
9.
Server MySQL database ....................................................................................................................................... 14
7.1.
Cleanup.......................................................................................................................................................... 14
7.2.
MySQL server users ...................................................................................................................................... 15
Updates and Upgrades.......................................................................................................................................... 16
End-devices firmware ............................................................................................................................................ 16
9.1.
LoRaMote ...................................................................................................................................................... 16
9.2.
mbed .............................................................................................................................................................. 16
9.3.
How-to upgrade the RaspberryPi SD card..................................................................................................... 16
10.
Ordering Information.............................................................................................................................................. 17
11.
Troubleshooting ..................................................................................................................................................... 17
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 2
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
1. Goal of this Kit
This kit is designed to offer a self-contained Plug’n Play local loop for all IOT object designers, allowing them to verify that
their design is able to connect to a public IOT network following the LoRaWAN specification.
No connection to an Ethernet network is required, simplifying the setup. A simple cross over Ethernet cable can be used to
access the kit.
2. Contents of the Development Kit
RaspberryPi B+ with its LoRa IOT shield unit and pre-installed micro SD card
SX1301-based concentrator reference design
Active GPS antenna
USB cables
Power adapter
Example end-point: LoRaMote or MBED shield unit. It is provided as a reference to confirm the functionality of
this setup.
Ethernet port
Power supply
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
GPS antenna port
LoRa antenna port
Page 3
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
3. Getting Started
Two ways to get connected to the starter kit are possible.
Connection to an Ethernet network composed of a router and a DHCP server.
Connection using an Ethernet cable connected between the development PC and the starter kit.
3.1. Connection to an Ethernet Network
1) Plug the simplified network setup as per the picture below. It must be connected to the same network as the one
your development PC is connected to.
Router
LoRa‐IOT‐sk
Development PC
2) When all ready, power it up and wait about 2mn for the device to boot-up.
3) Look-up the LCD screen to see the IP address that the RaspberryPi was given by the DHCP server.
4) On your PC, launch a web browser session and type this IP address into the web browser address bar.
5) The following page will appear:
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 4
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
6) Click on “Demonstration” link
7) Click on the “RecentActivity” link:
8) Power up the provided end-point device.
9) Its packets should start flowing in the database and will be displayed on the screen (hit F5 to refresh).
A local network has been successfully deployed on your bench. Any proprietary end-point design can now try and connect
to the network.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 5
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
3.2. Connection using an Ethernet Cable
1) Connect the RaspberryPi to your PC using an Ethernet cable.
2) On the PC, go to Network settings.
3) Click on “Local Area Connection”
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 6
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
4) Click on “Properties”
5) Select "Internet Protocol Version 4 (TCP/IPv4)
6) Click “Properties” button
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 7
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
7) Select "Use the following IP address:"
8) Enter the IP address like 192.168.1.XXX where XXX is different from 100 as it is the Raspberry static IP address.
9) Click the "OK" button.
10) Click the "OK" button on "Local Area Connection Properties" window.
11) Close "Local Area Connection Status".
12) Please follow the same steps as on previous chapter starting from step 4.
REMARK: Don't forget to replace the IP address for 192.168.1.100 instead of the one assigned by DHCP
A local network has been successfully deployed on your bench. Any proprietary end-point design can now try and connect
to the network.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 8
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
4. RaspberryPI Software
The LoRaWAN server and gateway software run on the RaspberryPI.
Once the RaspberryPI has boot up the LCD screen will show information about the LoRaWAN server and gateway
applications status, the percentage of used disk space on the SD card as well as the DHCP and static IP addresses.
The indications meaning of the LCD first line are:
G: Indicates if the gateway application is running
or not
S: Indicates if the LoRaWAN server application is running
D: Used disk space in percent
or not
The second line displays the DHCP assigned IP address as well as the static IP address. Each one is displayed every 5
seconds when both are available.
4.1. RaspberryPI Command Line Access
To access the RaspberryPI one must use an SSH client such PuTTY on Windows platforms or a terminal console on UNIX
based systems.
The RaspberryPI user name is lora and the password lora.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 9
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
4.2. Access Using PuTTY
1) Launch PuTTY
2) Enter the IP address displayed on the RaspberryPI LCD display
3) Click the “Open” button
4) If a security alert window is displayed Please click on “Yes” button.
5) The login prompt is then displayed
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 10
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
6) Please enter lora as username
7) Please enter lora as password
8) You are now logged on
4.3. Access Using UNIX Terminal Console
1) Launch a terminal console
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 11
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
2) Please enter the following command in the terminal window
$ ssh lora@RaspberryPi-IP-address
3) After pressing the Enter key, enter the password Lora
4) You are now logged on
5. Application Software Locations
All the software applications used by the RaspberryPI to run the IOT starter kit are located under /opt/lora-net.
This directory contains 4 directories:
gateway, this directory contains the
1) lora_gateway, SX1301 control library source code
https://github.com/Lora-net/lora_gateway.git
This source code has been adapted to use the RaspberryPI hardware SPI as well as the control of the SX1301
board reset pin.
2) packet_forwarder, gateway application source code
https://github.com/Lora-net/packet_forwarder.git
The configuration JSON files have been modified in order to use the GPS module as well as the network server
connection parameters.
3) lr-nwk-gw, gateway script to start/stop/restart the daemon.
misc, contains the Python and shell scripts need for the LCD management.
server, contains the precompiled LoRaWAN network server as well as the script to start/stop/restart the
daemon
www, contains the web server pages
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 12
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
6. Starting / Stopping the Demon Scripts
To control the server and gateway daemons the following commands must be issued:
‐
Starting
The server: sudo /etc/init.d/lr-nwk-srv start
The gateway: sudo /etc/init.d/lr-nwk-gw start
‐
Stopping
The server: sudo /etc/init.d/lr-nwk-srv stop
The gateway: sudo /etc/init.d/lr-nwk-gw stop
‐
Restarting
The server: sudo /etc/init.d/lr-nwk-srv restart
The gateway: sudo /etc/init.d/lr-nwk-gw restart
‐
Getting the demon status
The server: sudo /etc/init.d/lr-nwk-srv status
The gateway: sudo /etc/init.d/lr-nwk-gw satus
The 2 daemons output their logs to files located in the /tmp directory.
The LCD “G:” and “S:” indicate the 2 daemons status
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 13
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
7. Server MySQL Database
The RaspberryPI disk usage will increase over the time by recording all the end-devices frames onto the MySQL database.
It is advisable that once the disk usage displayed on the RaspberryPI LCD screen is getting close to 90% of disk usage
that the database is cleaned up.
7.1. Cleanup
It is possible to clean-up the database for a fresh-start.
1) Please stop the server application as described in chapter “Starting / Stopping the demon scripts”
2) Open a web browser
3) Type the IOT Starter Kit IP address followed by the following text “/phpmyadmin” to the web browser address bar.
4) The user name is root and password is also root
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 14
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
5) Click “Go” button
6. Click “lora”database on the left of the window
7) Click on “Empty” (trash can icon) link for each table
7.2. MySQL Server Users
Three more users have been defined (in addition to the root user) to access the database:
loraadmin, has full access to the database (password: loraadmin)
lorarw, has the right to read and update the tables (password: lorarw). The server uses this user to access
the database.
loraro, has the right to only read the tables (password: loraro). Used by the web server to access the
tables.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 15
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
8. Updates and Upgrades
Semtech will issue some releases of the network software under the form of a new RaspberryPi image file to be
programmed onto a SD card. Please ask your Semtech representative for an update.
The current delivery of the IOT kits contains the following versions of the different components:
LoRaWAN specification R3.0 (production)
Server release v1.4.2 (Semtech's example network server implementation)
LoRaMote end-point firmware v3.0
mbed platform end-point firmware (not yet available)
9. End-devices Firmware
9.1. LoRaMote
LoRaWAN firmware projects are available as source code in GitHub at the following address:
https://github.com/Lora-net/LoRaMac-node.git
The firmware must be configured to use activation by personalization and the NwkSKey and AppSKey must be modified
to:
NwkSKey:
{0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF,0
x00}
AppSKey:
{0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF,0
x00}
These keys correspond to the application server implemented in this demo. They are hardcoded and compiled in the
LoRaWAN server and can't be changed in this release.
9.2. mbed
LoRaWAN firmware projects aren't yet available at the time of this document release. Please check:
http://www.mbed.org
as sources will be provided by Semtech soon.
9.3. How-to Upgrade the RaspberryPi SD Card
To upgrade the SD card you can follow the instructions described in the following link:
http://www.raspberrypi.org/documentation/installation/installing-images/
The image to be used is the one that you get from Semtech.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 16
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
10. Ordering Information
Option 1: LoRaMote with integrated antenna
A variety of sensors to select from
GPS is built-in
Download sources for Keil and Ride on:
https://github.com/Lora-net/LoRaMac-node
Ordering Code: IOT868STKLM1
Option 2: MBED shield unit plugged onto MBED Freedom platform
MBED-enabled, with online development environment
Multiple ARM vendors to select from
Download sources on:
http://mbed.org/components/SX1276MB1xAS/
Ordering Code: IOT868STKMB1
11. Troubleshooting
Q: The IP address I type doesn't lead me to the corresponding landing page.
A: It is probably because the Raspberry Pi device did not get a DHCP lease from the network router (this depends of
companies' network policies, please talk to your IT manager). If it is not possible to whitelist this device, the fall back
solution is to use the second connection option described in “Connection using an Ethernet cable connected between the
development PC and the starter kit.” chapter.
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 17
www.semtech.com
User’s Guide
LoRa IOT Starter Kits
WIRELESS, SENSING & TIMING PRODUCTS
© Semtech 2015
All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The
information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable
and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication
thereof does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech assumes
no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper
installation, repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to
parameters beyond the specified maximum ratings or operation outside the specified range.
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN
LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF
SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER’S
OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall
indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims,
costs damages and attorney fees which could arise.
Contact information
Semtech Corporation
Wireless, Sensing & Timing Products Division
200 Flynn Road, Camarillo, CA 93012
Phone: (805) 498-2111 Fax: (805) 498-3804
E-mail: sales@semtech.com
support_rf@semtech.com
Internet: http://www.semtech.com
Rev. 1 / September 1, 2015
©2015 Semtech Corporation
Page 18
www.semtech.com