Table of Contents

1. WSim: the Worldsens hardware platform simulator
2. WConsole: the Worldsens serial console
3. WTracer: the Worldsens trace reading tool
4. WSNet: the Worldsens wireless network simulator
5. Worldsens: the development framework

Following is a list of tools needed to carry out this tutorial:

Before starting the tutorial, make sure you are using the Worldsens Live CD or that you have installed all the necessary tools listed above. The Worldsens suite will be described in the following. For information on the first couple of tools, please refer to their respective manuals. Please find below some useful links.

1. WSim: the Worldsens hardware platform simulator

WSim is part of the Worldsens development environment. WSim is a full platform simulator that can run the target platform object code without modification. The primary goals of WSim are debugging, profiling and performance evaluation for deeply embedded wireless sensor node/network (WSN) distributed applications.

The place of WSim in the development process

Figure II.1. The place of WSim in the development process

Writing distributed WSN applications using the Worldsens toolkit is far easier than using prototype boards due to the fast compile/debug/estimate development cycle. This performance estimation is made possible using a full platform simulation at a cycle accurate level. Peripherals that deal with real time constraints (timers, interrupts, serial ports, radio interface, etc.) are included in the WSim platform model. Time is given in a cycle accurate manner using application instruction timing.

WSim provides a simulation environment in which you can get:

  • Full instruction set support for the target microcontroller
  • Cycle-accurate simulation
  • Simulation of peripherals such as timers
  • Interrupts
  • Cycle-accurate simulation of other peripherals (e.g. UART)
  • External peripherals (radio modules, LCD display, ...)
  • A full system debug and performance analysis framework

WSim should compile and run on any Un*x-like platform. It has been tested on Linux/x86, Linux/x86_64, Linux/ppc32, Linux/Alpha, Solaris9/Sparc, Solaris10/Sparc, MacOSX/ppc32, MacOSX/x86 and Windows XP (using cygwin).

2. WConsole: the Worldsens serial console

The WorldSens serial console (WConsole) is a standalone application that can be used to drive the communication with the pseudo tty model. Its main use is to provide a full duplex interface that can output the octet stream from the simulator and use the host keyboard to communicate with the simulated application. The source code of the serial console can also be used to derive and test applications that will communicate through the serial port of the node in production use such as base station monitoring applications.

WConsole example

Figure II.2. WConsole example

The screenshot of the WSim serial console shown in Figure II.2, “WConsole example” presents a simple application that produces an echo for every character sent to its serial port. The top half of the user interface window presents the simulation output with grayed letters and bottom half is the local keyboard input for the host machine.

3. WTracer: the Worldsens trace reading tool

WSim traces are output in binary format. The WTracer tool transforms the traces in the Gnuplot format.

4. WSNet: the Worldsens wireless network simulator

WSNet is part of the Worldsens development environment. WSNet is a modular event-driven wireless network simulator. Its architecture consists in different blocks that implement functionnalities of the nodes and the radio medium. As an example, separate blocks are defined for the radio propagation, the interference computation or the radio modulation. Similarly, a node is itself composed by several blocks: one for the mobility, one for the application, one for the system queue, one for the mac layer, one for the radio and one for the antenna.

During one simulation, the behaviour of a block is specified using a model. A model is one particular implementation of the block functionnalities. If we consider the radio propagation block, one model implements the free space propagation model; another one implements a radio range model, etc. Considering the radio modulation block, one model implements the BPSK modulation, another one the FSK modulation, etc.

Models are either provided with the simulator or developped by users. A user can develop models for any of the blocks and use it for its own simulations. A model must implement a given API as well as characteristics that are defined by its associated block. WSNet should be able to compile on any Unix-like platform and has been tested on Linux/x86, Linux/x86 64, Linux/ppc32, Linux/Alpha, Solaris9/sparc, Solaris10/sparc, MacOSX/ppc32, Windows XP (using cygwin).

5. Worldsens: the development framework

WSim can be attached to the WSNet simulator through radio interfaces such as the Chipcon CC1100 model. This allows to build a complete simulation framework that is able to debug and analyse a complete wireless sensor network. Thus WSim and WSNet allow to design and refine a full distributed application from the top level specifications to the final application binary within the same framework and application description: the real application code.

Distributed simulation

Figure II.3. Distributed simulation

Communication between the simulators is done using IPv4 unicast and multicast in order to allow the distribution of the simulation load across a network of workstations. A typical middle range workstation can handle several dozens of concurrent WSN node simulators so that a small set of workstations can scale to hundreds of nodes. This allows the Worldsens environment to provide a performance analysis of real world applications using cycle accurate simulation tools.

These features will be demonstrated in Chapter VI, Token Passing Example.