Synapse SNAPconnect E12 User Manual

USER GUIDE
SNAPconnect E12
SNAP Enabled Gateway
©2008-2017 Synapse Wireless, All Rights Reserved. All Synapse products are
patent pending. Synapse , the Synapse logo, SNAP, and Portal are all registered trademarks
of Synapse Wireless, Inc.
Doc# 116-081614-030-B001
6723 Odyssey Drive // Huntsville, AL 35806 // (877) 982-7888 // Synapse-Wireless.com
Disclaimers
Information contained in this manua l is provided in connection with Synapse Wireless products and services and is intended solely to assist its customers.
Synapse reserves the right to make changes at any time and without notice.Synapse assumes no liability whatsoever for the contents of this manual or the
redistribution a s permitted by the foregoing limitedlicense. The terms and conditions governing the sale or use of Synapse products is expressly contained in the
terms and conditions for the sale of those respectiveproducts.
Synapse retains the right to make changes to any product specification at any time without notice or liability to prior users, contributors, or recipients of
redistributed versions of this manual. Errata should be checked on any product referenced.
Synapse and the Synapse logo a re registered trademarks of Synapse Wireless. All other trademarks are the property of their owners.
For further information on any Synapse product or service, contact us at:
Synapse Wireless,Inc.
6723 Odyssey Drive
Huntsville,Alabama 35806
256-852-7888
877-982-7888
256-924-7398 (fax)
www.synapse-wireless.com
License governing any code samples presented in this Manual
Redistribution of code and use in source and binary forms, with or without modification, are permitted provided that it retains the copyright notice, operates only
on SNAP®networks, and the paragraphs below in the documentation and/or other materials are provided with the distribution:
Copyright 2008-2016, Synapse Wireless Inc., All rights Reserved.
Neitherthe na me of Synapse nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written
permission.
This software is provided “AS IS,” without a warranty of a ny kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
ANY IMPLIEDWARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SYNAPSE AND
ITS LICENSORS SHALLNOT BE LIABLE FOR ANY DAMAGES SUFFERED B Y LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THISSOFTWARE
OR ITS DERIVATIVES. IN NO EVENT WILL SYNAPSE OR ITS LICENSORSBE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED ANDREGARDLESSOF THE THEORY OF LIABILITY, ARISING OUT OF
THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SYNAPSE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCHDAMAGES.
Table of Contents
Overview 1
The Device 2
Getting Started 3
Powering the E12 3
Establishing a Serial Connection 3
Mounting the E12 8
E12 Software Specifics 9
Passwords and root Access 9
E12-Specific Software Packages 9
E12 Physical Interfaces 11
E12 LEDs 11
The SNAPModule-Controlled LED 11
The E12 Button 12
Working With the Gateway's SNAPModule 13
Waking the SNAPModule 13
Resetting the SNAPModule 14
Restoring Functionality to an Unresponsive SNAPModule 14
Upgrading the SNAP Module Firmware 15
Accessing the MicroSD Slot 17
Common Linux Operations 18
Editing Linux Files 18
Making Your Software Run at Startup 18
Running a Script to Completion 18
Starting a Service 19
Setting Your E12’s Clock 20
Resetting a Lost User Password 20
Mounting an External Drive 21
Extending the E12 with USB Accessories 22
USB Power 22
Connecting to an Additional SNAP Device 22
Using usb_modeswitch 23
Factory Restore / Re-Flashing Your E12 24
Restoring from a MicroSD Card 24
Specifications and Installation 25
Specifications 25
E12 Dimensions 26
Troubleshooting Common Problems 27
The Ethernet port does not work or eth0 does not appear in ifconfig 27
SNAPconnect is not working 27
I cannot SSH into my E12 27
Regulatory Information and Certifications 28
Overview
IoT solutions demand reliable and flexible wireless connectivity at scale. SNAPconnect gateways are the interface
between your SNAP mesh networks and the rest of the world. Whether performing data aggregation to quickly
make real-time decisions, merging multiple IoT data streams, or connecting to on-site servers or the cloud,
SNAPconnect gateways provide the connectivity your network needs
915MHz and 2.4GHz Flexibility
IoTapplications exist in many environments. That's why the SNAPconnect E12 Gateway is available in 915MHz and
2.4GHz versions. Both versions are powered by SNAP: the Things Platform, so you can switch between frequencies
without having to redesign your application. It's even possible to have SNAPnetworks of both frequencies in the
same environment, sending information to the same cloud repository.
Powered by Ubuntu - Easy to Customize
The SNAPconnect E12 Gateway is an embedded Ubuntu Linux computer with the flexibility to add custom or 3rd
party software as needed for local databases, IoT platform clients, or other elements. It bridges SNAP edge
networks over Ethernet or optional USB connectivity devices such as cell modems, Bluetooth, or Wi-Fi adapters.
Start Quickly with Included Tools
The E12 is ready-made to host SNAP Thing Services – a suite of software tools that unite IoT devices and
applications via REST and MQTT for tasks such as data collection, device updates, and network management.
Custom programs can be created with the help of SNAPconnect software libraries making communications with IoT
devices in edge networks easy, even in challenging environments.
Protect your Deployment
SNAPconnect gateways emphasize security using AES-128 to encrypt edge network traffic, and standard Linux
security tools to secure the backhaul network. SNAP Thing Services utilizes tools like TLS and HTTPS to secure
outbound interfaces.
1
The Device
The images below show an E12 gateway with all features marked:
All E12s include a SNAP-powered module, and will come with an antenna for the module's connection labeled with
the Synapse S on the E12's case.
2
SNAPconnect E12 User Guide — 116-081614-030-B001
Getting Started
Adding an E12 gateway to your SNAP network is easy, but as with adding any computer to any network, if you don’t
follow the right steps, you’ll end up in the wrong place. These directions provide the steps for connecting to your E12
from either a Windows PC or a Linux PC, which we will refer to as your host PC. These instructions assume that you
have some familiarity with your host operating system. See your OS help files if you need assistance installing
software or navigating applications.
To get started with the E12, you'll first need to apply power.
Powering the E12
The E12 is powered through the power terminal
blocks.
Use only UL 60950-1 2nd Edition AM1+AM2
certified LPS power supplies, rated for relative
environmental conditions suitable to your use
location with an output of 7-36VDC, 1500mA Max.
NOTE: Some power supply vendors mark the positive “+” lead with a white stripe.
NOTE: The E12 cannot be powered over the USB SERIAL port.
NOTE: If the E12 is installed into an end product, wiring should be done in accordance with the relevant product
safety standard of the end product.
Establishing a Serial Connection
Next you'll need to establish a USBserial connection.
To establish a serial connection to the E12 and update the software:
1. Ensure that you have terminal emulation software installed on your host PC. Popular software for this purpose
includes Tera Term, PuTTY, minicom, screen, or any of many others.
2. Use a standard USB to micro-USB cable to connect the micro-USB port on your E12 to an open USB port on
your host PC .
3. Apply power to the E12.
3
NOTE: During the upcoming step 4, if you find that your host PC cannot connect to the E12 over the USB
connection, you may need to install the FTDIUSBto UART VCP drivers, available from http://www.ftdichip.com
4
SNAPconnect E12 User Guide — 116-081614-030-B001
4. Find the serial port that your host PC has assigned to the E12 (over that USB connection)
To find the serial port on a Windows PC:
a. Check under “Ports” in the Device Manager.
b. Look for USBSerial Port (COMxx) where the xx will indicate the serial port assigned (e.g., COM3, or
COM88).
c. Connect using your preferred terminal application. Example screenshots of connecting via PuTTY and
TeraTerm are provided below:
To find the serial port on a Linux PC:
a. Before plugging in the E12’s USB cable, check for ttyUSB connections in the /dev directory.
5
b. Plug in the E12 and look for a new ttyUSBx, where x indicates the USB connection assigned (e.g., ttyUSB0).
If you had any other USB-serial devices plugged in, you may see more than just /dev/ttyUSB0, which is
why you should check for the presence of these devices first.
c. You can use any of a number of serial terminal programs to connect to your serial port. Linux versions of
PuTTy and TeraTerm exist and work the same way shown in the Windows examples above (other than
the name of the port to which you are connecting. additionally, utilities such as cu or screen are available
as well:
Using cu:
To connect: sudo cu –l /dev/ttyUSB0 –s 115200
To disconnect, at the command line type ~. (tilde, period) and then press Enter.
Using screen:
To connect: sudo screen /dev/ttyUSB0 115200
To disconnect, press Ctrl-A, and then \ (backslash).
5. Using your terminal emulator, connect to the E12 using the following serial port settings:
l 115200 baud
l 8 bits
l No parity
l 1 stop bit
l No flow control
6. Use your terminal emulation window to log in to the E12 gateway.
Username: snap
Password: synapse
NOTE: You must change your password the first time you log in. This prevents you from installing an E12
gateway with the default password set, which is pretty much the definition of a bad security idea. Ubuntu
enforces some restrictions on what constitutes a valid password, and these instructions are further defined
in the Ubuntu documentation available at https://help.ubuntu.com/.
7. Connect your E12 to the internet.
The easiest way to do this is to make a wired connection to a host (i.e., router) that supports DHCP. (Most do,
by default.) If you wish to configure your device for a static IP address, you may do so via the serial connection
before making your internet connection.
8. Update the Python Development Libraries
Before starting work with the E12, you'll want to make sure you have the latest versions of the software
installed on the unit. The E12 makes use of Python Development Libraries that are sometimes updated to add
6
SNAPconnect E12 User Guide — 116-081614-030-B001
new functionality and correct bugs. You can update the version installed on your unit by running the
command:
sudo apt-get install python-dev
NOTE: Remember that Ubuntu Linux does not, by default, enable root as a user. The sudo command
temporarily escalates your privileges to su (super user), so the E12 will prompt you for your password.
NOTE: If you get a "Requirement already satisfied" message from one of the updates, don't be alarmed. It
just means you already have the latest version.
9. Set the Clock
First, you should specify the timezone in which your device will reside. An easy way to do this is to use tzdata,
which allows you to select the general region, and then select the specific zone for your location. You can run it
with the command:
Sudo dpkg-reconfigure tzdata
Next, and only if the E12’s date is not set (i.e. it is not connected to a network so it does not set the date from an
NTP server, and the hardware clock has never been set), set the date manually.
The following example sets the date to April 20, 2016, at 12:30:59 p.m.
sudo date --set “2016-04-30 12:30:59”
Sat Apr 30 12:30:59 CDT 2016
You can set the hardware clock from the system clock using the hwclock command.
sudo hwclock -wu
10. Update SNAPconnect
The SNAPconnect software enables the connection from your E12 device to the rest of your SNAP-powered
network.
To update SNAPconnect, type the command:
sudo –H pip install --upgrade snapconnect –i https://update.
synapse-wireless.com/pypi/
11. Update PyCrypto
The PyCrypto project is required for using AES128 encryption on your radio network.
To update PyCrypto type the command:
sudo -H pip install --upgrade pycrypto
That's it! Your E12 is now ready to work with your SNAP-powered network. Your Python program, using the
SNAPconnect library or the SNAPtoolbelt utilities, interfaces with the gateway's SNAP module directly, and the rest
of your nodes through that. You can also have full internet access via the wired Ethernet connection.
Now it’s up to you to do awesome things with your SNAP-powered network.
You can find examples of other people’s efforts on the Synapse Wireless repository at GitHub:
https://github.com/synapse-wireless.
7
Loading...
+ 24 hidden pages