USERS GUIDE
EK2100 Evaluaon Kit
For SNAP and Portal Version 2.5
Document Revision v1.8
©2008-2015 Synapse, 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-061520-004-A000
6723 Odyssey Drive // Huntsville, AL 35806 // (877) 982-7888 // Synapse-Wireless.com
Disclaimers
This evaluaon board/kit is intended for use for ENGINEERING DEVELOPMENT, DEMONSTRATION, OR EVALUATION PURPOSES ONLY and is not considered
by BeagleBoard.org to be a finished end-product fit for general consumer use. Persons handling the product(s) must have electronics training and observe
good engineering pracce standards. As such, the goods being provided are not intended to be complete in terms of required design-, markeng-, and/or
manufacturing-related protecve consideraons, including product safety and environmental measures typically found in end products that incorporate
such semiconductor components or circuit boards. This evaluaon board/kit does not fall within the scope of the European Union direcves regarding
electromagnec compability, restricted substances (RoHS), recycling (WEEE), FCC, CE or UL, and therefore may not meet the technical requirements of
these direcves or other related direcves.
Informaon contained in this Manual is provided in connecon with Synapse products and services and is intended solely to assist its customers. Synapse
reserves the right to make changes at any me and without noce. Synapse assumes no liability whatsoever for the contents of this Manual or the
redistribuon as permied by the foregoing Limited License. The terms and condions governing the sale or use of Synapse products is expressly
contained in the Synapse’s Terms and Condion for the sale of those respecve products.
Synapse retains the right to make changes to any product specificaon at any me without noce 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 are registered trademarks of Synapse. All other trademarks are the property of their owners. For further informaon 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
Redistribuon of code and use in source and binary forms, with or without modificaon, are permied provided that it retains the copyright noce,
operates only on SNAP® networks, and the paragraphs below in the documentaon and/or other materials are provided with the distribuon:
Copyright 2008-2015, Synapse Wireless Inc., All rights Reserved.
Neither the name of Synapse nor the names of contributors may be used to endorse or promote products derived from this soware without specific prior
wrien permission.
This soware is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
SYNAPSE AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SYNAPSE OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF 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 SUCH DAMAGES.
Table of Contents
1. Before Getting Started ............................................................................................... 1
2. Getting Started ........................................................................................................... 3
Overview .......................................................................................................................................... 3
A Portal into Your Network .............................................................................................................. 4
Evaluaon Kit Hardware .................................................................................................................. 5
Demonstraon Time ........................................................................................................................ 8
Demonstraon 1: Counng Straight Out of the Box ................................................................. 8
Troubleshoong ........................................................................................................................ 9
3. Installing Portal ........................................................................................................ 11
Running Setup ................................................................................................................................ 11
4. Using Portal ............................................................................................................. 17
Navigang within Portal................................................................................................................. 17
Pull-down Menus .................................................................................................................... 17
Tool Bar ................................................................................................................................... 17
Tabbed Windows ..................................................................................................................... 17
Rearranging Windows .................................................................................................................... 17
Resizing .................................................................................................................................... 18
Closing Tabs ............................................................................................................................. 18
Discovery ................................................................................................................................. 18
Node Info ................................................................................................................................. 19
Uploading SNAPpy Images ............................................................................................................. 21
Tutorial Time .................................................................................................................................. 22
Demonstraon 2: Holiday Light Show ..................................................................................... 22
Demonstraon 3: Temperature Alarm .................................................................................... 27
5. Portal’s Extended Capabilities .................................................................................. 31
Built-in Funconality ...................................................................................................................... 31
Demonstraon 4: The Many-Meter ........................................................................................ 31
Advanced Funconality: ................................................................................................................ 33
Demonstraon 4b: The Many-Meter extended ...................................................................... 33
6. Alternative Energy Settings ...................................................................................... 36
Baery Operaon .......................................................................................................................... 36
Low Power Operaon .............................................................................................................. 36
7. Where To Go Next .................................................................................................... 37
1. Before Geng Started
You’ve come to the right place: this guide is an introductory tutorial to the Synapse SNAP product line, and you
should definitely read through it and try out all of the hands-on examples it contains.
When you have completed this guide, you will have:
goen familiar with the included SNAP hardware
installed the companion Portal soware and any needed device drivers
goen familiar with the basics of using Portal and SNAP to develop wireless applicaons
Because it is intended to be a tutorial, you need to read through it in order, as opposed to skipping around
within the document. You also need to actually do the steps as specified, because later secons assume the
steps from previous secons have been completed.
This manual also focuses on the components actually included in the kit, rather than trying to cover all the
different types of SNAP hardware that are available. Just be aware that there exist other types of SNAP-
compable hardware than what you see included in this kit.
Finally, be aware that this manual is a starng point if you will, just one piece of a much larger set of
documentaon.
Other Documentaon
This document, the EK2100 Evaluaon Kit Users Guide, is only one of several featured with this evaluaon kit.
(Several documents are also installed on your system when you install Portal, which you will do as part of this
tutorial.) Be sure to also take a look at:
The “SNAP Primer”
This document contains an introducon to SNAP and explanaons of how mesh networking works. It
also introduces the various Synapse soware and hardware available, and clarifies the naming
convenons used for the various SNAP items.
The “SNAP Users Guide”
This document is where you will find an explanaon of how the components in a SNAP network work
together, with introducons to topics like hook handling and with sample scripts.
The “SNAP Reference Manual”
This document is where you will find informaon on the built-in funcons provided by Portal and
SNAPpy. It also provides informaon specific to each plaorm to which SNAP has been ported.
The “SNAP Sniffer Users Guide”
Starng with Portal version 2.2.23, a “wireless sniffer” capability is included with Portal. If you follow the
instrucons in this standalone manual, you will be able to actually see the wireless exchanges that are
taking place between your SNAP nodes.
The “Portal Reference Manual”
This document contains lots of informaon on how to use Portal, the soware that runs on your PC and
allows you to configure and manage your wireless network.
EK2100 Evaluaon Kit 1
Addionally, you may wish to refer to the following hardware guides:
The “SNAP Hardware Technical Manual”
Every switch, buon, and jumper of every SNAP board is covered in this hardware reference document.
The “End Device Quick Start Guide”
The “SN171 Quick Start Guide”
These two documents are subsets of the “SNAP Hardware Technical Manual” and come in handy
because each focuses on a single board type.
All of these documents are in Portable Document Format (PDF) files and are available on the Synapse Wireless
forum website.
Other Sources of Informaon
There is a dedicated support forum at hp://forums.synapse-wireless.com.
In the forum, you can see quesons and answers posted by other users, as well as post your own quesons. The
forum has examples and Applicaon Notes, waing to be downloaded.
The forum also contains all the latest copies of the documentaon included with this kit, plus the latest versions
of Synapse Wireless soware. Be sure to download the newest version of Portal (which includes the most recent
firmware) for the latest feature set.
Also be sure to check out the Synapse website at www.synapse-wireless.com.
2 EK2100 Evaluaon Kit
2. Geng Started
Overview
The Synapse SNAP product family provides an extremely powerful and flexible plaorm for developing,
deploying and managing wireless applicaons.
SNAP is the name of our network operang system. The word is also used somewhat generically to refer to the
enre product line. Oen when we are talking about SNAP we are implicitly including SNAP, SNAPpy, Portal, and
SNAPconnect.
A SNAP network consists of individual SNAP nodes. At the heart of each node included in this kit is a Synapse
SNAP Engine, or some other equivalent SNAP Device.
Each SNAP Engine combines a microcontroller, a radio, and an antenna. The antenna can either be an integral
“F” antenna, or a mounng point for an external antenna. The SNAP Engines included in your EK2100 evaluaon
kit are RF100 SNAP Engines (also known as RF Engines), as pictured above. RF100 SNAP Engines communicate
using 802.15.4 2.4 GHz radio signals.
Other hardware available from Synapse are used for sub-gigahertz communicaons (900 MHz, 868 MHz, etc.),
but they are not included in this evaluaon kit. If you have other Synapse plaorm hardware available, such as
the RF200 or RF300 SNAP devices, you may be able to substute it for the RF100 SNAP Engines in this kit. But it
may be necessary to modify the sample code slightly to account for the plaorm differences.
Each SNAP Engine has an on-board microcontroller with its own internal RAM and ROM. No external
components are required for operaon.
Each SNAP Engine includes General Purpose I/O (GPIO) pins, which can be configured as digital inputs or
outputs. Many of these same GPIO pins can also be switched to alternate funconality.
The exact number pins and how they can be repurposed will vary from plaorm to plaorm, but each SNAP
Engine will be able to support:
analog inputs, providing 10-bit resoluon (or beer)
serial data lines (one or two UARTs, depending on plaorm)
serial handshake lines (one RTS and one CTS per UART)
Although 19 I/O pins are available, you only have to hook up the exact funconality required by your applicaon.
The minimal hookup to an RF Engine consists of two wires:
One wire for VCC (2.7-3.4 volts DC)
One wire for GND
EK2100 Evaluaon Kit 3
The SNAP Engines contain core code (wrien in C) that implements basic wireless networking funconality. This
core code also implements a virtual machine that executes a subset of the Python programming language.
Synapse has named this subset of Python SNAPpy.
Note: You can find details on the SNAPpy language, and how it compares to Python, in the “SNAP
Reference Manual.” For now, the important point is to understand that SNAP nodes support a scripng
language.
SNAPpy scripts can be uploaded into SNAP Engines “over the air” (OTA), or over the serial interfaces. These
scripts define the personality of each node; by changing the SNAPpy script in a node you change the node’s
behavior.
SNAP Engines can be designed into your own products, acng as a slave device to your main microcontroller or
microprocessor. In many cases the SNAP Engine can take over the funconality of the original main processor, in
addion to adding wireless capability and SNAPpy scripng.
In addion to discrete SNAP Engine modules, Synapse also sells SNAP demonstraon boards that extend the
basic core capabilies with addional I/O hardware.
Two different kinds of SNAP demonstraon boards are included in this evaluaon kit:
One SN132 SNAP Sck USB Module
One SN171 Proto Board
Details about each of these boards can be found in the “SNAP Hardware Technical Manual,” as well as their
associated “quick-start” guides.
A Portal into Your Network
Portal is a standalone soware applicaon that runs on any standard PC with Microso Windows 2000 or
higher1. Using a USB or RS232 interface, it connects to any SNAP Engine in the SNAP Wireless Network,
becoming a user interface for the enre network.
Note: Most of the icons shown in the previous diagram were taken directly from the Portal user interface.
1 Portal also runs on the latest long-term release of Ubuntu Linux, and on the latest Macintosh OS. There may be minor
cosmec differences in the UI appearance, but the funconality is the same across operang systems.
4 EK2100 Evaluaon Kit
is used (by default) within Portal to generically represent a SNAP node.
is used within the Portal user interface to represent Portal itself.
Once connected, Portal provides the capability to interacvely build an intelligent wireless network. You can:
Discover new SNAP Devices
Upload intelligence to those Devices over the air, using SNAPpy scripts
Customize Portal to suit your specific applicaon
Interacvely you do all this within Portal, observing the results immediately.
Intelligentthe network is purpose-built for your applicaon, with the ability to monitor and condionally
control things connected to it.
Synapse’s Portal administrave soware is included in this evaluaon kit.
For more informaon about using Portal, refer to the Portal Reference Manual available from our website.
Throughout this manual, the term “Portal PC” is used to refer to the PC (Windows, Linux or Macintosh) that
Portal is running on. Screenshots in this document show Portal running in a Windows environment, but Portal’s
funconality is consistent across the plaorms.
Note: Synapse also licenses a standalone SNAP Connect library, giving you access into your SNAP network.
Import the SNAP Connect library into your Python applicaon to allow your backend systems to
parcipate seamlessly in the SNAP network.
Evaluaon Kit Hardware
To demonstrate many of the capabilies of Synapse SNAP Engines, SNAP and Portal, we’ve bundled them
together in an evaluaon kit form the EK2100.
The EK2100 evaluaon kit comes with management soware, a power supply, an external baery holder, a pair
of AA baeries, a screwdriver and a bag of components. (refer to the EK2100 Kit Contents document.) The kit
also contains two different kinds of SNAP demonstraon boards, each with a SNAP Engine:
EK2100 Evaluaon Kit 5
One SN132 SNAPsck USB Module
One SN171 Proto Board
Remember: You do not have to use the various “demo” boards in order to use the RF Engines in your own
projects.
Also: If you crave even more fun, addional boards can be purchased from Synapse to expand you
evaluaon network.
We tend to hate to hear the words “some assembly required”. Hopefully, we can make an excepon with this
kit. As you work through the upcoming demonstraons you will get the chance to “play” along and connect
various sensors and indicators. Your kit should have come with a screwdriver and bag of various electronic
components.
Your bag should include the following:
3 LEDs (1 amber, 1 green, 1 red)
1 10K Ohm resistor (beige)
1 100K Ohm resistor (blue)
1 Photo-cell (circular sensor)
1 Thermistor
1 Piezo buzzer (small black disc)
Before geng down to business let’s talk a lile more about the two SNAP demonstraon boards included
with this kit:
SN171 Proto Board
Select or Reset Buon
The Synapse SN171 Proto (prototyping) Board provides easy access to all 19 General Purpose Input/Output
(GPIO) pins available on the RF100 SNAP Engine. Eight of these pins (GPIO 11-18) can also serve as analog inputs.
All of the onboard RF Engine signals are made available at easy-access screw terminal blocks located on either
side of the node. These same signals are also made available in a more compact form in the center of the board.
6 EK2100 Evaluaon Kit
A dual row header provides a connecon point for a ribbon-cable (or some other form of wiring harness) from
some other circuit board or tesng apparatus.
The SN171 can be powered by an external power supply (5-9 VDC) or two AA baeries. An external baery
holder is also included in the kit for baery operaon.
More informaon about this module’s hardware can be found in the SN171 Quick Start Guide and the SNAP
Hardware Technical Manual available from the Synapse website.
SN132 SNAPstick USB module
The Synapse SN132 SNAPsck USB module does not provide access to the enre range of GPIO pins available
through the SN171 Proto Board. Instead, it provides a simple and compact way to connect a PC running Portal to
a SNAP network.
A Tri-color LED is available as an output indicator. This component has the ability to emit a red, green, or amber
light. It can be controlled by manipulang GPIO pins 0 and 1 via SNAPpy scripts. The following table describes
the interacon of output pins and resulng colors. Noce that the LED lines are acve LOW.
Desired LED Color Value of GPIO Pin 0 Value of GPIO Pin 1
Red Low High
Green High Low
Amber Low Low
A second green LED is used to indicate that power is being supplied to the module. It cannot be controlled by
the user.
User Accessible LED Power Indicator LED
Power to this module is provided via a standard USB connecon. This allows for the SNAPsck to be powered
using a PC or other USB power source (such as an AC adaptor).
EK2100 Evaluaon Kit 7
Note: The Portal soware doesnt need to be installed for the SNAPsck to draw USB power.
More informaon about this module’s hardware can be found in the SNAPsck Quick Start Guide and the SNAP
Hardware Technical Manual (available from the Synapse website).
Demonstraon Time
The following secon takes the user through a series of step-by-step demonstraons. These demonstraons will
serve as a brief introducon to the capabilies of Synapse’s SNAP Engines and Portal soware.
Each segment builds upon the concepts of the previous demonstraon and they are most effecve if executed
in order. However, this is certainly not mandatory.
SNAPstick USB Connection
Go ahead and connect the SNAPsck USB module to an open USB slot on the PC or a USB power adapter. If you
do connect to a PC, the following dialog box (or something similar, depending on your operang system version)
will appear:
Since we have not installed the correct soware yet (we’ll do that later in this document), we are not ready to
do this - just click Cancel for now.
Demonstration 1: Counting Straight Out of the Box
Ok. Now it’s me to actually play with our new toys.
Both nodes come from the factory preloaded with a demo SNAPpy script. Although this demo script showcases
only a small poron of the capabilies of a SNAP node, it provides a quick way to get familiar with the nodes
without having to install any soware on your PC.
GOAL: To demonstrate how SNAP nodes can interact without the need for controller soware. They work
straight out of the box.
Step 1 By now you should have the SNAPsck USB module plugged into your PC or USB power supply. The
module will have a single green LED lit to indicate it is up and running.
Try and keep the SNAPsck in a place where you can see the LEDs. Since this is the only form of (human-
interpretable) output on this parcular node, we’ll use them in a couple of demonstraons.
8 EK2100 Evaluaon Kit
Note: Don’t install the soware just yet.
If you have this module plugged into your PC, it will draw power from the USB connecon. However it is
not yet interacng with any installed soware. SNAP Engines (and the demonstraon boards that ulize
them) do not require that the Portal soware be present to operate. Each SNAP Engine is a completely
autonomous (and customizable, through scripng) node in a network.
Step 2 - Power up the SN171 Proto Board using the AC adapter provided with your evaluaon kit. You should see
the yellow LED (LED2) begin to flash. This means we are ready to push some buons.
If your nodes are on and each has a lit LED, proceed to the next secon. Otherwise, here are some trouble-
shoong ps that may help:
Troubleshooting
Tip #1: Verify the power related jumpers:
Your SN171 “Proto Board” node should have come from the factory preconfigured to work with an external DC
power supply. Sll, as a double-check, verify that the PWRSEL jumper is in the VEXT posion (connecng pins 2-
3), not the VBAT posion (connecng pins 1-2).
Tip #2: Verify the LED related jumpers:
The SN171 “Proto Board” node should come from the factory preconfigured to enable its two on-board LEDs
(one yellow, one green). If the unit is not blinking its yellow LED, it is worth verifying that the LED1 and LED2
jumpers are both installed.
Now back to the acon…
The pre-loaded script (“McastCounter.py”) will keep track of a global count. This count is incremented every
me a ‘buon press’ is registered.
Step 3 - Push the buon on the Proto Board. You will noce the LEDs on the Proto Board and SNAPsck change
paern with each buon press. Press-and-hold the buon and you will see the LED configuraon return to its
original state (i.e. the count returns to zero).
More Troubleshoong
If you are not seeing the LEDs change on the Proto Board make sure that the buon is enabled. The S1SEL
jumper located up and to the right of the buon should be set to ‘GPIO5’ (connecng pins 1 and 2) and not to
‘reset’ (pins 2 and 3).
EK2100 Evaluaon Kit 9
This demonstraon is a simple way to show a couple of key points:
The nodes are immediately able to communicate with each other. There is no such thing as a “network
join me” with SNAP.
Any node can talk to any other node. There is no central “coordinator” node with SNAP.
No PC soware required. There is no need for soware installed on a PC to “coordinate” the nodes, they
can think for themselves.
Using SNAPpy scripts, SNAP nodes can autonomously respond to changes in their environment. This
buon press could easily have come from some form of digital or analog sensor reading.
The counng you just observed is accomplished using the mulcast capabilies of SNAP. If other modules were
added to the network, they too would track the buon count and could even parcipate in the counng.
The first example was prey simple. Let’s expand on things and include a look at how nodes can interact with
Synapse’s Portal soware.
10 EK2100 Evaluaon Kit
3. Installing Portal
The Synapse Network Evaluaon Kit contains a sheet of paper with instrucons for where to download the
Portal Installer and SNAP support documentaon. This provides all the soware you need to get started with
SNAP and Portal. Addional updates, and the most current release of this soware will always be available on
the Synapse support forum.
Updates on the Web
You’ll find the latest version of Portal on the Synapse Support Forum at hp://forums.synapse-wireless.com
(look under Soware Releases -> latest Releases).
Portal comes bundled with the latest SNAP firmware and documentaon.
Also be sure to check the Synapse website at hp://www.synapse-wireless.com
Running Setup
Download and run the Portal installer, Portal-setup-2.5.n.exe (where “n” indicates the latest release version).
You should unplug any Synapse devices from your PC before installing, so that device drivers can install properly.
Depending on the version of Windows running on your PC, you may get a warning dialog similar to the following
somewhere in the installaon process:
The warning is harmless, and you should click Run or Connue Anyway to proceed with the installaon.
Note: If a previous version of Portal (for example, version 2.2.23) is already installed on your computer,
you will get an inial dialog box like the following:
You must click the OK buon in order to install the newer version.
EK2100 Evaluaon Kit 11
If you are using an operang system other than Windows, follow the installaon direcons that are provided
with your OS’s installer. For the Linux installaon, be sure to consult the readme file that is included with the
.deb package file.
The following screenshots assume you are installing in Windows. Your precise Portal version number might be
different from 2.5.0, but the process should be very similar.
A dialog box similar to the following will appear (your version number will be higher).
Click the Next buon to get the following:
Read the license agreement at the specified URL, check the I agree box and then click Next.
12 EK2100 Evaluaon Kit
You can either enter the desired desnaon folder manually, browse to the desired folder, or just click Next to
accept the default.
Make sure the desired components are checked, and click Install.
EK2100 Evaluaon Kit 13
You have now successfully installed Portal. There will be a Portal icon on your Windows Desktop (if you specified
there should be), as well as in the Start Menu. We recommend that you do not run Portal unl you have
completed the bridge device driver installaon through the following steps, so you should uncheck the Run
Synapse Portal checkbox before clicking Finish.
Plug in the Bridge Device
The SNAPSck device should now be plugged into a USB port on the PC on which you installed Portal. Depending
on the drivers loaded on your system and which version of Windows you are using, it may be necessary for the
Synapse USB drivers to complete installaon. This will only occur the first me the bridge device is connected
and powered up. If necessary, the following dialog box will appear:
Since the correct soware is already available (you just installed it along with Portal), there is no need for
Windows to connect to Windows Update just select No, not this me and then click Next.
14 EK2100 Evaluaon Kit
Choose Install the soware automacally… and click Next.
Depending on the version of Windows you are running, you may get a warning dialog similar to the following:
This warning is harmless, and you should click Connue Anyway.
EK2100 Evaluaon Kit 15
Congratulaons! Your Synapse USB Device is installed and ready to be used by Portal.
Program Launch
Aer installaon, launch the Portal program. You should see a screen similar to the following:
If you do see something similar, you have now successfully installed Portal and detected a USB connected bridge
device. The “Connect” dialog box is automacally shown at Portal startup. If you click the Cancel buon, you can
bring this dialog back by clicking the buon on the main toolbar.
Also be aware that this toolbar buon doubles as a status indicator. When you are connected, it looks like ,
and funcons as a disconnect buon. When you are not connected, it looks like and funcons as a connect
buon.
Note: The Portal PC (the PC that the Portal soware is running on) has no 802.15.4 radio of its own. One
of the SNAP nodes must act as a “bridge” for it. Portal will connect directly to this bridge node, using
either a USB or RS232 connecon.
Portal will then be able to communicate to the rest of the SNAP nodes indirectly, by sending packets
across the directly connected bridge node. For our purposes, the SNAPsck will act as the bridge.
16 EK2100 Evaluaon Kit
4. Using Portal
Starng Portal for the first me brings up a blank network configuraon and a dialog asking what port to use to
connect to the SNAP bridge device:
We’ll connue using the SNAPsck module from the previous secon, so keep it connected to the USB port.
Press Connect once the bridge device (SNAPsck) has been detected (this is probably going to be USB0).
Navigang within Portal
Portal is straighorward to use. However, since it is extremely customizable by the user, your screen layout may
not always match the screen shots in this manual. For that reason it is important to understand the fundamental
concepts used in navigang the Portal GUI.
Pull-down Menus
At the top of the Portal GUI are pull-down menus for File, View, Opons, Network, and Help operaons. (These
menus are in their standard posion at the top of the screen in Macintosh and Ubuntu versions.)
Clicking one of these top-level menu choices will pull down a sub-menu of addional choices. For example,
clicking Network will present a sub-menu from which you perform acons like Broadcast Ping, Find Nodes…, or
New Configuraon. Similarly, clicking Help will bring up choices for SNAP Reference Manual, Portal Reference
Manual, etc.
The convenon is that menu choices ending in “…” usually bring up addional menus or dialog boxes, and menu
choices not ending in “…” cause immediate acon to be taken, with no further prompng.
Tool Bar
Below the pull-down menus is a horizontal Tool Bar from which you can iniate several acons. Hovering the
cursor over each buon will display a short “tool-p” help message, and clicking each buon will iniate the
acon displayed by the tool-p.
Tabbed Windows
The remainder of the Portal GUI is taken up by a changeable collecon of tabbed windows. Each of these
windows has a name, which is displayed in the tab for that window.
Many of the tabbed windows have toolbars of their own, located in the horizontal region just below their
labeled tab.
Portal starts out with an inial set of tabbed windows visible. Somemes clicking certain controls within one
tabbed window will open and/or switch to another tabbed window. You can also open addional tabbed
windows by choosing them from the View menu. Finally, many of the tabbed windows can be launched from the
main tool bar.
Rearranging Windows
The tabbed windows in Portal can be dragged and reposioned on the screen. To do this, press and hold the le
mouse buon while the cursor is posioned over the tab label you want to move. While holding the buon
down, drag the tab unl you see a light blue “shadow” indicang a possible new posion for the window. When
you’ve found a suitable new posion, just release the mouse buon and the move will be complete.
EK2100 Evaluaon Kit 17
Resizing
Windows may be resized by clicking and dragging the horizontal and vercal borders separang them.
Closing Tabs
You can close tabbed windows that you no longer want by clicking the small X located to the right of the name in
the tab.
Now that you know the basics of navigang within Portal, we can connue with the tour.
Discovery
We first need to look at the Node Views tabbed window. If this window is not already open, you can click Views,
then choose Node Views window. Alternavely, you can click the icon on the toolbar.
You will noce that the Node
Views window has its own toolbar.
Ignore all but the first four buons
for now.
The Node Views tabbed window lets you look at your nodes in mulple ways:
Report View
Icon View
List View
Tree View
All four views are just that, “views” of the same network informaon.
Note: If a node isn’t showing up in the list, you can click the Ping buon to refresh it.
Click the Report View buon.
You should see that two Devices have been discovered. They all will have names of the form McastCounterX.
The directly connected “bridge” device (the SNAPsck) should be shown in blue, while the remote device should
be displayed in black. Because the nodes report in using a random response delay, which node gets to be
McastCounter and which node gets to be McastCounter2 can vary.
Drag tab as shown
to move windows
18 EK2100 Evaluaon Kit
When you double-click a node in one of the Node Views, Portal displays basic informaon about that Node in a
separate Node Info pane.
Note that the node names are based on the names of the SNAPpy scripts loaded into those same nodes at the
me of discovery, but with addional trailing digits (2, 3, 4, etc..) added to enforce uniqueness.
Since these nodes were pre-loaded at the factory with the “McastCounter.py” script, their names are of the
form McastCounterX, where “X” is replaced by a number. If the nodes had been pre-loaded with some other
script, then you would have seen enrely different base names.
If the three nodes had not been pre-loaded with scripts at all, then their names would have been “Node” and
“Node2”.
Node Info
Lots of informaon is shown in the Node Info tabbed window. However, Portal may not be set to automacally
query the node for its informaon. (This is a configurable preference in Portal.) To be sure Portal knows
everything important about your node, click the Refresh Node Informaon icon in the toolbar that runs
across the top of the Node Info tab.
EK2100 Evaluaon Kit 19
Across the top, a toolbar provides easy access to node-specific funcons.
On the le-hand side, the Firmware Version, Plaorm, Network Address, MAC Address, Device Image, Image
CRC, Image Size, License, Channel, and Network Id are shown. Below that is a block where Path informaon
(the path to/from the node) can be displayed. Below that there is an Info field that can be controlled from Portal
scripts to add your own custom field(s) to the Node Info panel.
Device Image refers to the SNAPpy script (also referred to as a SNAPpy image) loaded into the node. Here you
can see that the script/image “McastCounter.py” has been loaded into the node. You can click the device image
name shown (McastCounter), and automacally bring that script up in Portal’s built-in source code editor.
On the right hand side, a collapsible tree of available funcons is shown. In this next screenshot, you can see the
BuiltIn tree (the tree of built-in funcons) in expanded form.
Noce that there is a scroll-bar on the right-hand side of the pane there are too many built-in funcons to fit
on the screen at one me.
Hovering the cursor over a funcon name will display a tool-p for that funcon. More importantly, you can
click any funcon to invoke that funcon directly on the selected node.
Funcons that do not require any parameters (for example, the reboot() funcon) will be executed immediately.
If the funcon requires any parameters, Portal will automacally prompt you for them.
For example, clicking the writePin() funcon will prompt you
to enter the actual value to output on that GPIO pin.
You can either:
1) Enter a value (ex. pin = 1, isHigh = True) and press OK, or
2) You can press Cancel to abort the funcon invocaon.
Don’t forget that in the Python language ‘True’ and ‘False’ are case sensive (with the first leer capitalized)
You can also expand the tree of funcons defined by each module (in other words, by each SNAPpy source file).
20 EK2100 Evaluaon Kit
Here you can see the various funcons defined in the “McastCounter.py” SNAPpy script.
Like the built-in funcons, these can also be directly invoked by clicking them (and entering any needed
parameters).
The Node Info tabbed window also has its own toolbar. Most of the toolbar funcons will be discussed later, but
one is of parcular importance to us now; “Upload SNAPpy Image”.
Uploading SNAPpy Images
The “mulcast counter” script was preloaded merely as a convenience to the user. You can overwrite these
default scripts with other scripts from the set of example scripts included with Portal, or even with your own
custom scripts.
We’ve already tried out the “mulcast counter” funconality in the first demonstraon, so now let’s override
that behavior with some different ones. To do that, we will assign new “behavior” by giving each node a new
SNAPpy Image.
Select the node with Device Type “Buzz” in the Node Views panel (This is the type given to the Proto Board).
Then, in the Node Info panel, select “Upload SNAPpy Image” . (If the buon is disabled, it means Portal does
not know enough about the node to enable it to lad a script into it. Click the Refresh Node Informaon
buon, and aer the node informaon refreshes the Upload SNAPpy Image buon should be enabled.)
This will bring up a dialog box asking which script/image to upload. These scripts are located in a
Portal\snappyImages directory within your MyDocuments folder.
Select the “HolidayLightShow.py” example, and click OK. Upload of the new SNAPpy Image (over the air!) should
complete in a few seconds. The node will automacally restart when the upload finishes.
Next select the node with the device type set to “Sck” from the Node List and upload the “HolidayBlink.py”
script into it.
EK2100 Evaluaon Kit 21
Note: For this example we are running different scripts on each node. SNAP nodes do not have to be
running the same SNAPpy script to interact with each other.
Tutorial Time
In this secon will begin to use some sensor components to demonstrate the interacon of SNAP nodes with
one another, as well as, with Synapse’s Portal soware.
Demonstration 2: Holiday Light Show
You should now have the SNAPsck node running the example script “HolidayBlink” and the Proto Board node
running another example script “HolidayLightShow”. If you do not, please refer to the previous secon
“Uploading SNAPpy Images”.
Up unl now we have ignored the snappy (pun intended) lile Synapse screwdriver and small bag of electronic
components that accompanied the kit. Now is the me to roll up our sleeves and set to work on a second
demonstraon.
The following components will be used:
1 Red, 1 Green, and 1 Amber LED
1 10K Ohm resistor
1 Photo cell
22 EK2100 Evaluaon Kit
First, make sure the screws in the terminal block are set to the open posion (this should be the ‘factory
default’). Like a standard screw, clockwise ghtens and counter-clockwise loosens the connector terminals.
We’ll use the pins on the le hand side of the Proto Board to connect the LEDS. We’ll also use the pins in the
lower right hand corner of the Proto Board (GPIO11-12 and GND) to aach the photo-cell and the 10K resistor
pull-up resistor for this demonstraon.
Note: Resistors have color bands on them that indicate how much resistance they provide. But rather
than providing a lesson in color bands, we have provided resistors with different body colors, too. The 10K
Ohm part is beige in color, while the 100K Ohm resistor is blue. We’ll use the beige resistor for this
demonstraon.
GOAL: To demonstrate how informaon gathered from sensors onboard a SNAP node can be communicated to
other nodes and used to iniate other tasks
Step 1 Disconnect the power running to the Proto Board.
Step 2 Determining LED polarity:
Find the green LED. LEDs do have a polarity, meaning they can only be connected in one way, so we’ll need to
determine which end is the negave terminal (a.k.a the cathode). One of the legs of the LED should be shorter
than the other. This is the “negave” leg. A flat spot on the rim at the base of the colored bulb also indicates
which side is the negave. The following picture should help:
Step 3Connecng the green LED:
LEDs
Resistor
Photo cell
EK2100 Evaluaon Kit 23
Place the shorter “negave” leg of the green LED into the terminal block at the pin labeled GPIO 8 (the fourth
pin up from the boom of the le-hand side of the Proto Board).
Place the other leg of the green LED into the terminal block at the pin labeled GPIO 7
Tighten the screws located on the top of the terminal block for both GPIO pins.
Step 4Connecng the red LED:
Place the “negave” leg of the red LED into the terminal block at the pin labeled GPIO 6 (near the middle of the
le-hand side of the Proto Board note that it is NOT next to GPIO 7, as there is a VCC connecon between
them).
Place the other leg of the red LED into the terminal block at the pin labeled GPIO 4. Note that since this is not
the adjacent slot on the connector you might have to bend the legs of the LED. (See picture.)
Tighten the screws located on the top of the terminal block for both GPIO pins.
Step 5Connecng the amber LED:
Place the “negave” leg of the amber LED into the terminal block at the pin labeled GPIO 3.
Place the other leg of the amber LED into the terminal block at the pin labeled GPIO 0. Note that, like before, we
are dealing with non-adjacent slots on the connector. You might have to slightly bend the legs of the LED.
Tighten the screws located on the top of the terminal block for both GPIO pins.
Aside: You can bend the LEDs up to beer see the light show.
Step 6We are now ready to interact with the Portal soware we installed in the previous secon of this
document. (If you have yet to install Portal, please go back now.)
It’s me to check on the quality of our work by tesng the LEDs. We can use the new SNAPpy script we just
uploaded to the node for this purpose.
Connect the power back to the Proto Board.
Switch to the Node View pane in Portal that was described in the previous secon.
24 EK2100 Evaluaon Kit
Select the device with the Device Type set to “Buzz”. (It will be running the “HolidayLightShow” script.)
Switch to the Node Info pane and find the “HolidayLightShow” specific secon from the list of available
funcons. You might need to collapse the “evalBase” secon of funcons, or to scroll down to find the right
funcons.
Click the startChristmasDisplay() funcon.
You should see the green and red LEDs begin to blink.
Click the changeSeason() funcon.
You should see the amber and red LEDs begin to blink for a Halloween display. (The green LED is now off).
Click the lightsOff() funcon.
All 3 LEDs should now be off (we are ignoring the Proto Board’s built-in yellow LED).
If you did not see each of the LEDs flash at some point during the test, check your connecons. Try a gentle tug
on each LED lead. They should not move, but be firmly connected to the device.
For the me being we’ll need to disconnect the power to the Proto Board.
Let’s take a look at what we just did. The Portal applicaon
running on your PC was able to wirelessly communicate with the
remote device through the bridge node. We were even able to
execute funcons specific to the script running on the remote
device. How cool is that?
Step 7Connecng the resistor:
Bend the legs of the beige resistor towards one another as seen in the
picture
EK2100 Evaluaon Kit 25
Place one resistor leg into the terminal block at the pin labeled GPIO 12 (the third pin up from the boom of the
right-hand side of the Proto Board).
Place the other leg into the connector at GPIO 11. There is no polarity on this resistor, so it does not maer
which leg you choose for which pin.
Tighten the screw for GPIO pin 12 only. This should lock the one leg of the
resistor in place. We’ll address the other leg in a moment.
Step 8Connecng the photo-cell:
Place one leg of the photo-cell into the pin labeled GPIO 11 (don’t worry it is
supposed to share the connector with the resistor) and the other leg in the last
slot in the connector (the GND pin). There is no polarity on the Photo cell, so it
does not maer which leg you choose for which pin.
Tighten the associated screws and try a gentle tug on the components. They should not move, but be firmly
connected to the device.
Carefully bend the photo cell so that the face of the component points up. Refer to the pictures; they really can
be worth a thousand words.
Aside: Feel free to trim the leads of any of the devices to provide a ‘dier’ setup.
Note: While not used in any demo scripts, there are soware-controlled internal pull-up resistors
available for each input pin. These can be controlled using the setPinPullup() funcon. See the SNAP
Reference Manual for more details.
Step 9 Reconnect the power running to the Proto Board.
Step 10 - The “HolidayLightShow” script is already monitoring for changes in light levels on the Proto Board
(sneaky, I know). However, the script includes an “auto-calibraon” capability and since we have not
“calibrated” the sensor yet, no values will be acted upon.
Place your finger over the photo-cell to represent “complete darkness”. This will give the script a max reading
for calibraon. Now, if you pull your hand away, the sensor will be reading the relave darkness.
Step 11 Let’s start a Christmas light show.
Hold your hand close to the sensor. The red and green LEDs will begin to flash once your hand casts a dark
enough shadow over the photo cell.
Look over at the SNAPsck. You will noce that the green and red LEDs are lit up as well. The Proto Board has
communicated the change in sensor status over the air to the neighboring device to extend the Christmas show.
26 EK2100 Evaluaon Kit
Aside: Somemes holding your finger close to the sensor will trigger it twice. If you see the orange and red LEDs
instead, you can move your hand away and then close again to transion back to the green and red lights.
You can change the trigger point (light-intensity value) at which the script begins or changes the light show using
the node’s setThreshold() funcon in Portal. (The default value is 85).
Step 12 Time to change the season.
Move your hand away and then back to hovering over the sensor again. A Halloween light show (orange and red
LEDs) will begin to flash. As before, the Proto Board has wirelessly communicated the message to change the
light paern to the SNAPsck as well.
Oh, one final thing: the buon on the boom of the Proto Board will turn off the lights, or you can execute the
lightsOff() funcon on the Proto Board using Portal.
Success! We now have a device that will sense when the sun goes down and begin a Christmas light show one
night and a Halloween light show the next.
KEY POINTS:
Each node can be controlled by Portal using a bridge node (although the nodes can funcon without the
presence of Portal).
Portal can be used to execute script funcons on remote nodes as though it were local to the node.
SNAP nodes do not have to be running the same SNAPpy script to interact with each other.
Taking a deeper look:
If you peek at the HolidayLightShow SNAPpy script you will see how easy it is for SNAP nodes to communicate.
It contains a line of code: “mcastRpc(1,2,"christmasBlink")”. This single line is all it takes for a SNAP node to
send a message to a group of devices.
This parcular example uses a mulcast Remote Procedure Call (RPC). A
uni-cast RPC can be sent to a specific unit using SNAP’s built-in rpc()
funcon. More informaon about SNAPpy scripng can be found in the
SNAP Reference Manual.
Demonstration 3: Temperature Alarm
The Proto Board sll looks a lile dull. Let’s aach some more “fun stuff”.
This me we’ll connect a standard thermistor and a 100KΩ pull-up resistor.
The following components will be used:
1 Thermistor
1 100K Ohm Resistor
1 Buzzer
GOAL: To further demonstrate the interacon of individual nodes with each other and with Portal.
EK2100 Evaluaon Kit 27
Remember, just as with a standard screw, clockwise ghtens and counter-clockwise loosens the connector
terminals.
We’ll use the pins in the upper right hand corner of the Proto Board (GPIO 18, VCC, and GND) to aach the
thermistor and the 100K pull-up resistor for this demonstraon.
Note: You can differenate the included resistors by color. The 10K Ohm part is beige in color, while the
100K Ohm resistor is blue. We’ll add the blue resistor for this demonstraon.
Step 1Disconnect the power running to the Proto Board.
Step 2Connecng the buzzer to the Proto Board:
Place the leg of the buzzer (see picture) marked with a ‘+’ into the connector at GPIO pin 9 and the other leg into
the connector marked GND.
Tighten the associated screws and try a gentle tug on each of the components. They should not move, but be
firmly connected to the device.
Step 3We’ll need to upload another set of scripts to the nodes using Portal:
Connect the power back to the Proto Board.
Load the script “TemperatureAlarmBridge.py” onto the SNAPsck (i.e. the unit with the Device Name set to
“Sck”) using the step you learned in the “Uploading SNAPpy scripts” secon.
Load the script “TemperatureAlarm.py” onto the Proto Board (i.e. the unit with the Device Name set to “Buzz”)
Step 4
Make sure that you sll have the Proto Board’s node (the one with “TemperatureAlarm” in it) selected in the
Node View pane.
Switch to the Node Info pane and find the “TemperatureAlarm” specific secon from list of available funcons.
28 EK2100 Evaluaon Kit
Click the soundAlarm() funcon to test the buzzer. You should hear a long beep from the buzzer. (If you do not
hear the beep, confirm that you have the buzzer’s polarity correct in your installaon.)
Disconnect the power running to the Proto Board again.
Step 5Connecng the resistor (blue) to the Proto Board:
Bend the legs of the resistor toward one another as seen in the picture
Place one resistor leg into the terminal block at the pin labeled GPIO 18 (located on the upper right-hand side of
the Proto Board).
Place the other leg into the connector at the pin labeled VCC (located in the center of the right-hand side). There
is no polarity on this resistor, so it does not maer which leg you choose for which pin. Note that there are two
terminals labeled VCC. You could use either of them here, but for clarity we recommend you use the one
between GPIO14 and GPIO 15.
Tighten the screw for the VCC pin only. This should lock the one leg of the resistor in place. We’ll address the
other leg in a moment. (Déjà vu?)
Step 6Connecng the thermistor to the Proto Board:
Place one leg of the thermistor (see picture for idenficaon) into the pin labeled 18 (don’t worry: it is supposed
to share the connector with the resistor) and the other leg in the first slot in the connector (the GND pin). There
is no polarity on the thermistor, so it does not maer which leg you choose for which pin. Again, a picture is
worth a thousand words, so please refer to the figure for how the setup should look. Noce how you have to
bend the legs of the thermistor to reach across several connector slots.
Tighten the associated screws.
Step 7Connect the power back to the Proto Board.
Step 8Hold the thermistor between your thumb and forefinger to raise the temperature. (If you have
especially cold hands, it may be necessary to warm your hands first, or to rub the thermistor to warm it up.)
Once it reaches a pre-set threshold it will trigger a 5 second mer. The start of the mer will be indicated by the
green LED on the Proto Board and a flashing amber LED on the SNAPsck.
EK2100 Evaluaon Kit 29
The buzzer will sound once the mer expires unless the alarm cut-off is executed. This can done one of two
ways:
1. Execung the alarmCutOff() funcon in the “TemperatureAlarm” specific secon of the Node Info pane
within Portal (this can be done on either node).
2. By pressing the built-in Proto Board buon.
A quick ‘chirp’ of the buzzer will indicate that the alarm has been bypassed (much like a car alarm).
KEY POINTS:
Synapse RF engines have the ability to read analog inputs.
o RF100 SNAP Engines have 8 analog inputs included in the 19 GPIO pins. Other plaorms of SNAP
Engines have different amounts based on their underlying processor hardware.
Remote nodes can use sensor or other inputs to trigger acons on other remote nodes. The alarm was
triggered on both nodes and could be disabled by either node.
30 EK2100 Evaluaon Kit
5. Portal’s Extended Capabilies
Built-in Funconality
One of the key elements of a sensor network is being able to log and/or display the gathered informaon.
Portal has several built-in ways to track and/or display data. Let’s use the sensors we just installed on the Proto
Board in another example.
Demonstration 4: The Many-Meter
If you are interested in the types of things SNAP Engines can do, you have probably heard of a mul-meter. Let’s
put together a many-meter. The good news is that we already have all the components we will need wired up
and ready to rock.
GOAL: To show how informaon can be communicated back to the Portal PC for display and logging.
Step 1Switch to the Node View pane in Portal and select the node associated with the Proto Board.
Upload the “Many-Meter.py” SNAPpy script onto the Proto Board (a skill we’ve mastered from previous
secons, but here is a hint: ).
Let’s give the Proto Board a name. Click the Change Configuraon icon from the toolbar and then select the
Device tab. Change the Device Name (currently “Buzz” or blank) to read “OurDemo”. Click “OK”.
Step 2Switch back to the Node View pane and select the node associated with the SNAPsck.
Switch to the Node Info pane and Erase the script currently running on the SNAPsck by clicking the icon
located in the toolbar.
Select the New Configuraon… opon from the Network pull-down menu in Portal. This will reset your view to
use our new name. The SNAPsck without a script will now have a node name like “Node” or “Node2”. (This
assumes you have not changed any Portal preferences from the defaults with which Portal was installed. If you
are working with an exisng Portal installaon where someone may have adjusted the Portal preferences, it may
be necessary to click the Broadcast Ping icon in the Portal toolbar to make the nodes reappear.)
Note: You do not need to have a SNAPpy script running on the SNAP node for it to parcipate in a SNAP
network.
In fact, Portal can sll configure and interact with remote nodes regardless of the existence or type of
script running on the bridge node or remote nodes.
Step 3Open the event-log pane. You’ll see that the remote node (the one on the Proto Board) is forwarding
the current light-intensity reading from the photo-cell to be logged by Portal. This is actually a “darkness”
reading since it will increase as it gets darker.
Note: If the reading is not appearing in the event-log pane, select the node and, within the Node Info
pane, make sure that the Intercept Node Output buon is clicked.
Calibrate the sensor once again by covering it to simulate “complete” darkness. Uncover the sensor.
EK2100 Evaluaon Kit 31
Step 4Push the buon located on the Proto Board and watch the data change from light-intensity to the
temperature reading. (This is a raw measurement where the value from the thermistor actually decreases as the
temperature increases)
Push it again and the radio link quality will be displayed.
Push it one more me (is your thumb sore yet?) and you will see the “darkness” reading and thermistor reading
displayed at the same me.
Step 5Open the Data Logger pane in Portal. The same informaon that was displayed in the event log should
also be given in a graphed format. This informaon can be saved by clicking the Save icon in the upper right
hand corner of the pane. The graphed data can be paused, restarted, or cleared from the same
toolbar .
Remember you can move the posion of the Data Logger pane (or any other pane) within Portal by using your
mouse to click and drag. This was discussed in the Using Portal secon.
Press the buon on the Proto Board to cycle through each of the available sensor readings and watch Portal
graph the associated informaon. Noce that mulple readings can be displayed concurrently. Every 4th buon
press will disable the display of informaon.
KEY POINTS:
SNAP nodes do not require a script to parcipate in a SNAP meshed network.
Portal has a built-in Event Log and Data Logger to display informaon gathered by any number of SNAP
nodes.
32 EK2100 Evaluaon Kit
Taking a deeper look:
The ability to present event-log messages and display informaon in the data-logger can be accomplished using
calls to funconality built into the Portal node.
If you peek at the file “ManyMeter.py” you will see this SNAPpy script forwards data to Portal and instructs it to
post it to the log by using a Remote Procedure Call (RPC). The script will contain a single line of code that reads:
“rpc(portalAddr, "logEvent", eventString)”. This example uses a uni-cast RPC (single address desnaon) to call a
funcon directly within the Portal node. This is explained in detail within the SNAP Reference Manual.
Advanced Funconality:
Ok. We’ve reached a point where we want to step it up a notch.
The next secon describes funconality that is available to the user, but is not necessarily a part of the Portal
soware applicaon.
WARNING: What lies ahead is something we feel is extremely powerful and, as such, something we
should at least touch on. However, it is not for the faint of heart. It involves a lile bit of computer
science and programming knowledge. So, proceed with cauon….
The SNAPpy scripts that run on each node are based on a sub-set of the Python programming language. (More
on Python can be found at www.python.org). A Python interpreter is already running in order to support Portal.
This includes a python open-source library called wxPython that provides Graphical User Interface (GUI) support
(Info at: wxpython.org).
The fact that Portal is already running this library allows us to dip into the same funconality. We can create our
own custom graphical output through Python scripts running on the Portal Node.
What you are about to see is NOT a part of Portal, but is a library extension available through Portal. In fact, you
can install and run Python with the wxPython libraries on any PC. Portal does not need to be installed to use
them.
Demonstration 4b: The Many-Meter extended
That being said, let’s connue with the Many-Meter example we should already have up and running.
Note: In the previous demonstraons we have only uploaded scripts to SNAP devices (i.e. the devices
containing SNAP Engines). However, the Portal soware is also a node in the SNAP network, using the
connected bridge node to send and receive network traffic.
Step 1Switch back to the Node View pane in Portal and click on the Portal node. Then click on "Change Portal
Base File" in the Node Informaon window for the Portal node. Select the script called "PortalManyMeter.py,"
located in the "My Documents\Portal" folder. 2 Then click Open. This acon uploads the new file to the Portal
node.
Step 2 – From the same Node View, verify that the Proto Board (node with the Device Name set to “OurDemo”)
is sll running the “ManyMeter” script. Click the node.
2 Portal scripts are not, by default, in the same directory as SNAPpy scripts. Portal is capable of loading any Python script
you wish to run, so you can navigate to any locaon on your system to load a script into Portal, while SNAPpy scripts are
selected from a specific directory.
EK2100 Evaluaon Kit 33
Switch to the Node Info pane and click the script name next to the Device Image heading. This will bring up the
SNAPpy script for eding within the Portal environment. (An alternave for opening the script is to use the Open
File… command from the File menu.)
Step 3Edit the SNAPpy script:
The original script is read-only. So, Click the Save As icon and save a copy of the file with the new name
“ManyMeterPlus.py”.
Find the line of code with the comment “EDIT NEXT LINE”. The very next line is in fact a call to the rpc() funcon
and has been commented out (Python comments start with the ‘#’ character). We have cause to use it now, so
let’s un-comment it.
Original Code:
# EDIT NEXT LINE: This is special code to call into the wxPython functionality of Portal
#rpc(portalAddr,"DisplayData",photoVal,"Dark Meter",loadNvParam(NV_DEVICE_NAME_ID))
Delete the single ‘#’ character from the beginning of the line.
Modified Code:
# EDIT NEXT LINE: This is special code to call into the wxPython functionality of Portal
rpc(portalAddr,"DisplayData",photoVal,"Dark Meter",loadNvParam(NV_DEVICE_NAME_ID))
Repeat this process for the other 2 lines (for a total of 3 lines) with the same comment. Then save your work by
clicking the Save icon in the toolbar.
Step 4Upload your brand new script, “ManyMeterPlus.py”, to the Proto Board node (device name set to
“Buzz”).
You should now see a separate window on your computer screen that displays the current sensor readings in a
graphical form.
To get true ‘darkness’ readings you will need to calibrate the light sensor once again by holding your finger over
the sensor head for a second or two.
Look at the code snippet we just edited: you will see that the remote node is performing a RPC call into the
funcon “DisplayData” on the Portal node. It is the “DisplayData” funcon that accesses wxPython funconality
on the PC.
34 EK2100 Evaluaon Kit
KEY POINTS:
The Portal node can run scripts, just as other SNAP nodes can.
SNAPpy scripts can use the Portal node to access extended funconality. This can include such things as:
o Email
o Output to database or log files
o Graphical output to the screen
Taking a deeper look:
The Event Log message sengs can be configured from the Opons menu (Opons -> Configure Logging…).
You’ll noce from this menu that Portal can be configured to send informaon via email. This funconality is
also available to scripts running on the Portal node. In other words, you can configure scripts to send email to
different addresses based on observed events and condions. More details are available within the Portal
Reference Manual.
EK2100 Evaluaon Kit 35
6. Alternave Energy Sengs
Baery Operaon
So far, we have been running the nodes from USB power (the SNAPsck) and from wall power (the SN171 Proto
Board).
It is also possible to run the SN171 Proto Board from baery power using the baery holder included in the
EK2100 kit.
Before you can power this board from the external baery pack, you must unplug the external power supply
and change a jumper located near the center of the circuit board.
The jumper posts for this jumper are labeled “VBAT”, “VCC”, and “VEXT”.
The board comes from the factory with the jumper connected to the VEXT and VCC pins, which configures the
node to run from the external power supply.
If you move the jumper so that it connects the VBAT and VCC pins, then the board will be configured to receive
power from the white two-pin connector located directly behind the barrel-jack that the external power supply
plugged into.
Aer changing the jumper to the VBAT+VCC posion, install two AA baeries in the external baery holder, and
connect the white connector from the external baery pack to the mang white connector on the Proto Board.
Note: There is an on/off switch on the external baery pack. Be sure to slide it to the “On” posion when
you want to power up the SN171 Proto Board.
Low Power Operation
A Snap Engine on the SN171 Proto Board is capable of achieving years of baery life from the included AA pack,
but to do so requires running a SNAPpy script that sleeps, as well as removing all RS232 jumpers (JMP2, JMP5,
JMP6, JMP7 and JMP8).
Unless you are running such a low-power script, be sure to turn baery power off when the node is not in use.
See example SNAPpy script “protoSleepCaster.py” for one example of low-power operaon. This script is like
McastCounter.py, but sleeps between buon presses.
36 EK2100 Evaluaon Kit
7. Where To Go Next
In this manual we have introduced the components of the EK2100 Evaluaon Kit, installed Portal, and run some
simple demos.
Now you will want to take advantage of some of the other SNAP documentaon:
The “SNAP Users Guide”
The “SNAP Reference Manual”
The “Portal Reference Manual”
The “SNAP Hardware Technical Manual”
The “SN171 Proto Board Quick Start Guide”
The “SNAPsck USB Module Quick Start Guide”
These documents are in Portable Document Format (PDF) files and are available from the Synapse Wireless
website. The SNAP Reference Manual and Portal Reference Manual (plus other documentaon) are also
available from the Help menu in Portal.
Are you sll craving more?
Details regarding other kits and hardware can be found online at hp://www.synapse-wireless.com under the
Products heading.
Synapse also offers a larger evaluaon kit called the EK2500. It includes three SNAP devices and another type of
hardware demonstraon board for different applicaon demos. The expanded capabilies of this kit allow you
to further explore how SNAP nodes interact with one another as well as Portal.
The EK2500 kit includes demonstraon board not included in this evaluaon kit:
The SN111 End Device Demonstraon Board
You can also purchase these boards individually (outside of kit form) as addional nodes. They will interact with
any of the included EK2100 demonstraon boards.
The EK2100 kit only includes a single type of Synapse SNAP Engine, the F-antenna RF100. Other forms of SNAP
Engines that were menoned in the introducon of this document can also be purchased on an individual basis.
Remember: Any of the SNAP Engines can be used interchangeably with any of the demonstraon boards.
Visit us online
For more informaon about Synapse, SNAP networking, and SNAP product offerings, please visit:
hp://www.synapse-wireless.com
You can find an ever-expanding collecon of useful informaon on the Synapse Support Forum at
hp://forums.synapse-wireless.com, including:
Quick start guides for all Synapse hardware
Synapse applicaon notes
More example scripts
Soware Updates
Queson and answer discussions
EK2100 Evaluaon Kit 37
The form allows you to see quesons and answers posted by other users, as well as giving you the ability to post
your own quesons.
38 EK2100 Evaluaon Kit