Overview of FlockLab Services
This page gives an overview of the services which FlockLab offers to the user. A general overview over FlockLab can be found here and here. More detailed information can be found in our paper which has been published at ISPN 2013: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems.
Definitions
- FlockLab: see General Overview
- Target node: node to be tested. Also called sensor node.
- Observer node: Gumstix computer and FlockBoard (interface board) in conjunction. The observer node makes all the measurements, triggers stimulations and connects to the FlockLab server over the out-of-band backbone.
- Service: every measurement and stimulation possibility is managed as a separate service. This allows to turn on and off services independently and according to the testers needs.
General description of FlockLab and its services
All nodes of the deployment can be used for testing. A dedicated server offers means for configuring the tests, collects data from the nodes and presents the data to the tester. The current deployment is mainly indoor with some nodes being placed on the roof of nearby buildings. The topology of the current deployment can be seen in the picture on the right.
Each service of the testbed allows for a specific measurement normally done with dedicated laboratory equipment. Several interfaces can be used for communication between the observer and the target: serial UART, USB and dedicated GPIO lines. The GPIO tracing and actuation services use GPIO lines as they are fast and minimally intrusive (it takes only a few cycles to read or write a GPIO in the target MCU). The logging service transports its log messages over the UART or USB. The power profiling service hooks into the power supply of the target which is located on the observer and thus needs no software instrumentation on the target node.
Target Reprogramming
The target node can be (re-)programmed directly on the observer. This allows for uploading target images to the observer and flash them without physical access to the target nodes. Reprogramming can be done over the serial interface or USB, depending on the type of target node.
GPIO Tracing Service
The GPIO tracing service allows for monitoring the state of dedicated GPIO pins on the target node's microcontroller. This is done by connecting multiple GPIO pins of the target node to GPIO pins of the observer node. GPIO tracing can be used for a variety of purposes when testing a WSN. One can be interested in state changes of the MCU's power mode, or the radio or software states to test a running application. State changes of the radio are perhaps the most interesting to look at because the radio switches quite fast from one state to another. With the GPIO tracing service at hand, one can instrument an application to set a particular pin combination for each state. By timestamping and logging this information on the observer, one can, for example, identify networking issues such as hidden terminal effects on the target nodes.
Key features of GPIO tracing service:
- A total of 5 GPIO lines can be traced.
- Single and continuous tracing is possible. In single mode, only the first detection of a flank is reported. In continuous mode, tracing is performed as long as the test user wants to.
- Rising, falling or both edges can be detected.
- For every tracing job, a local callback function (out of a set of specific functions) can be defined. This allows for definitions of triggers which fire when a certain GPIO pin edge is detected. Currently supported callbacks are:
- Trigger the collection of a powerprofile
- Trigger a GPIO pin actuation
GPIO Actuation Service
The GPIO actuation service can be defined as the counterpart of the GPIO tracing service. The goal of this service is to control the behaviour of the target node by issuing commands over the GPIO pin interface of the microprocessor. Several such GPIO lines can be set or cleared by the observer. The target node is usually programmed to start some user defined action after receiving a signal from the observer. One can imagine to trigger a command to send data over the radio to multiple nodes at the same time. Using the GPIO actuation service on several nodes concurrently, e.g. collisions on the ether can be stimulated and thus the networking algorithms can be tested for effects of unwanted collisions.
Furthermore, the target nodes can be reset or turned on/off using this service. This allows e.g to turn on all nodes in FlockLab synchronously.
Key features of GPIO setting service:
- A total of 2 lines for signaling to the target node (see here for specifications).
- Lines to reset and/or turn on/off the node.
- Each scheduled pin actuation can define a setting, clearing or toggling of the GPIO's value.
Serial Service
The serial service allows for logging of messages (text or binary data) as well as for sending messages over the serial interface. The service connects, depending of the used OS on the target node, to a generic interface, the TinyOS, or the Contiki serial forwarder and stores all received data together with a timestamp in the database. With this service at hand, the nodes can send text messages (e.g. logmessages) or binary data (e.g. RAM dumps) over the serial interface to the observer. Moreover, every observer can be connected to over a TCP port on the FlockLab server. This allows the test user to send data to the node during a test run.
Notes on the Serial Service
The serial service works both ways: a node can send data to an observer, but you can also send data to the node during runtime of the test. For every observer used in a test, a TCP port is opened on the FlockLab server whymper.ee.ethz.ch. You can now connect to theses ports using appropriate tools (e.g. netcat or ncat). You can then send data to the node and you will also receive everything that the node sends over its serial interface. In the test results file for the serial service, all data that you send to the node will be denoted with a w, data sent by the node will be denoted with an r. Note that only one connection can be made to any observer and that access to the port is restricted to the IP address specified in the test configuration XML. The ports opened on the FlockLab server whymper.ee.ethz.ch are calculated as:
TCP Port = 50100 + ObserverID
You can thus connect to e.g. Observer 001 using ncat by issuing the following command:
ncat whymper.ee.ethz.ch 50101
Note that all communication between these ports and the respective observers is transparent, meaning that neither the observer nor you as a test user will notice the intermediate software - this allows you to use e.g. the TinyOS serial forwarder without restrictions.
Power Profiling Service
The power profiling service allows for timed power measurements of the current drawn by the target node. It is able to perform measurements with an accuracy in the low uA and a sampling rate of approx. 56000 SPS. The time schedule of the measurements can be set by the test user. This enables the tester to schedule measurements at certain points of interest(e.g. power-on of the node or radio tx/rx) with high sampling frequencies to get power profiles. Power measurements can also be triggered by other services such as the GPIO tracing service (meaning that the tester can program a target to trigger a power measurement by setting/clearing a GPIO pin).
Planned Services
Suggestions for enhancements or feature requests are very welcome. Send an email to flocklab (at) tik.ee.ethz.ch and we will be happy to help you.