Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

OpenSim allows you to simulate an OpenWSN network without physical devices.

How it works

A simulated network dehaves exactly like a network with real hardware. You can interact with the OpenVisualizer, communicate with your nodes from the Internet. The difference is that each node is emulated on your computer, rather than being real hardware.

OpenSim does so by compiling the mote code as a Python extension module, and creating an instance of the resulting class for each emulated mote. When the simulation is running, these emulate motes communicate with the rest of the OpenVisualizer architecture (see Architecture) over the eventBus.

As illustrated in the diagram below, the emulated modes interact with the eventBus the exact say way a moteProbe instance (connected to a hardware mote) does. In fact, the OpenVisualizer is not aware it is talking with emulated motes.

Preparing for a simulation

Before you can run a simulation, you need to compile the OpenWSN firmware as a Python extension module. For that, enter the following

is a software for the simulation of the OpenWSN's stack. It's composed by a SConscript structure that allow to build the OpenWSN stack as a Python extention library, and an emulated transmission medium provided by EventBus module.

How To Use it

In your openwsn-fw/ folder, enter the following command to build the OpenWSN mote's firmware as a Python extension library:

scons board=python toolchain=gcc oos_openwsn

In order to easily run a simulated network based on the code, you can use the OpenSim integration provided by OpenVisualizer; so, in your ./openwsn-sw/ folder:

python openVisualizerGui.py --sim True -n <NumEmulatedMotes>

runs a session of OpenVisualizer in Simulator mode with a network of <NumEmulatedMotes> simulated motes.

  • No labels