Help for the Viptos 5.1-alpha Sensor Networks Development Platform

Running a TinyOS model from within Viptos does not work under Windows

Running a TinyOS model from within Viptos does not work under Windows.

The reason is that we use JNI to load the TinyOS code back in to the running Ptolemy process. Unfortunately, the TinyOS code uses pthreads, which is incompatible when Windows native threads.
We are working on a solution.

Generating Code for the pc target

Despite the bug above, Windows users and other users can generate code by changing the PtinyOSDirector target from ptII to pc or some other tinyos target like mica or mica install. Only running a simulation within ptII will bring up the pthreads issue.
  1. Assuming you are looking at a demo model, look inside MicaBoard or MicaActor.
  2. Double-click on the PtinyOSDirector and change the target parameter to pc.
  3. Run the model as usual by hitting Control-R or hitting the green run button.
  4. Look in the output directory (you can find out what it was by double-clicking on the PtinyOSDirector and examining the destinationDirectory parameter. For demo models, this is usually demo directory/output.
  5. To run the generated TOSSIM:
    cd demo directory/output
    ./build/pc/main.exe 1
    
    This will run TOSSIM with 1 node.
  6. To only see selected debug output, you may also set your DBG environment variable to the known dbg modes described described when you run:
    ./build/pc/main.exe --help
    
    For example, in tcsh:
    setenv DBG=usr1,am
    
    or in Cygwin bash under Windows
    export DB=-usr1,am
    

Further information

For information about using Viptos, see the Viptos documentation.