TinyOS Primer

Installing TinyOS on Windows using Cygwin

May 2010 (Updated 11/5/2010), by Geoffrey Lo and Ashwin Ram

Important Note #1: This guide can be used with files downloaded from the Internet (do not install any files from the TinyOS CD as they contain older versions that will conflict)

Important Note #2: Install all applications in their default directory. Otherwise, proceed at your own risk! (e.g. Cygwin in C:\cygwin).

Comments and suggestions: I’ve turned on comments just for this page – if anything’s worked for you or hasn’t worked, please leave a comment! Thanks.


Step 1: Installing Files

 

Follow the official TinyOS guide to Install Java, Cygwin, Native Compilers, Toolchain and Source Tree (click here). In lieu of the links on their website, do this:

  • Java: To install the Java 1.6 JDK, go to http://java.sun.com/javase/downloads/widget/jdk6.jsp
    • Add the Java BIN directory (e.g. C:\Program Files\Java\jdk1.6.0_20\bin) to your PATH Windows Environment Variable (don’t delete what’s in the variable – just add to it separating folders with semicolons). How? Windows XP / Windows Vista and 7.
  • Cygwin: Download the web installer at http://www.cygwin.com/setup.exe
    • Run the installer, and accept the default packages butwith the following extras and all related packages (make sure these are installed!):
      • gcc (compiler)
      • nano (text editor)
      • file (Utils: required by tos-install-jni)
      • rpm (package management)
      • python base package (required for TOSSIM – see below)
  • Native compilers:
    • Run Cygwin. On Vista / Win7, make sure you run as administrator (especially if you see ‘permission denied’ erorr messages).
    • For each of the packages in the order listed, type rpm -Uvh –force –ignoreos –nodeps <file> where <file> is each of the packages listed (without the braces).
    • The copy of jflashmm.tgz is corrupt so you can ignore it.
  • TinyOS Toolchain: Install as per instructions.
  • TinyOS 2.x Source Tree:
    • Install the TinyOS RPM package listed.
    • Plug in your tinyos mote (wait for Windows to install the USB to Serial Drivers), then start up Cygwin shell and type motelist. Take a note of which COM port Windows has assigned your mote. Note that each mote you plug in will have a different COM port assigned.
    • To configure your environment, we can create a bash profile to store all environment variables. Here’s one we made to save you time (replace the COM3 in red with whatever COM port you saw from motelist and telosb with your platform if you’re not using TelosB – valid platforms can be found here). Create a new file called .bash_profile in your Cygwin home directory (e.g. C:\cygwin\home\<user>\) (if you have problems with the dot in front, use nano inside Cygwin) and include the following lines:
export TOSROOT="/opt/tinyos-2.x"
export TOSDIR="$TOSROOT/tos"
export CLASSPATH=".;C:/cygwin/opt/tinyos-2.x/support/sdk/java"
export CLASSPATH="$CLASSPATH;C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;."
export MAKERULES="$TOSROOT/support/make/Makerules"
export PATH="/opt/msp430/bin:/opt/jflashmm:$PATH"
export MOTECOM=serial@COM3:telosb

Step 2: Fixing Files Post-Install

There are a few problems with the default install which will become apparent as soon as you walk through tutorials and try to compile code, run Java etc,. Follow these steps to fix them.

the -32.dll problem

  • In C:\cygwin\lib\tinyos, make copies of getenv.dll and toscomm.dll and name them getenv-32.dll and toscomm-32.dll respectively.
  • Copy these four DLL files into C:\Program Files\Java\jdk1.6.0_20\bin

the printf.h problem

  • In C:\cygwin\opt\tinyos-2.x\tos\lib\printf, make a copy of printf.h and name it generic_printf.h.

compiling tinyos java

  • In cygwin (make sure to run as administrator), navigate to C:\cygwin\opt\tinyos-2.x\support\sdk\java and type maketo compile the Java environment.
    • If you get an error about javac not found, double check your Windows PATH variable in System Properties. On 64-bit systems, if you install the 32-bit JDK, you will be in “Program Files (x86)” not “Program Files”.
  • In any directory, type tos-install-jni (make sure everything is successful. some operations require admin privileges in Windows).
    • If there is an error on Line 23 about “file: command not found”, be sure to select and install ‘file’ in the Cygwin installer.

TOSSIM compiling problem (added 6/11/2010)

 

  • If you’re trying to compile your program and you get an error along the lines of “make: python2.5-config: Command not found”, re-run the Cygwin installer and install the Python package (you can search for it in the installer). You only need to install the base python package.
  • Note that TOSSIM is not supported for TelosB motes. In the opt/tinyos-2.x/tos/platforms/, you’ll notice that MicaZ has a ‘sim’ subdirectory, but telosb does not.

Step 3: Installing Mote Drivers

Optional step for 64-bit Windows users – added 6/14/2010

Note: In Cygwin, if your motes are successfully showing up when you type ‘motelist’ and are assigned COM ports, and there are no exclamation marks in the Windows Device Manager, you can safely skip this section.

If you have a 64-bit Windows Operating system, chances are you won’t be able to see your mote when typing ‘motelist’. The CD that comes with the TelosB motes only come with 32-bit drivers. Since Crossbow doesn’t appear to supply drivers on their website, you’ll need to manually install the USB to serial drivers used by your mote from the manufacturer of the USB Serial converter:

  • For TelosB motes, you can download the USB To Serial drivers from http://www.ftdichip.com/Drivers/D2XX.htm – click on the newest driver version (2.06.2 at the time of writing) to download the driver package.
  • Extract the ZIP file.
  • Open up Windows’ Device Manager, and you’ll see an exclamation mark on the CrossBow TelosB mote. Right click it, and click ‘Update Driver’. Point the wizard to your newly extracted driver folder. This should install a ‘USB Serial Converter’ to your ‘Universal Serial Bus controllers’ section.
  • At this point, a new ‘USB Serial Port’ will show up in your ‘Ports’ section with an exclamation mark. You’ll also need to do the same (point the Update Driver wizard to the same driver folder package you just downloaded) to install the correct drivers automatically. At this point, there should be no USB Serial-related yellow exclamation marks in your Device Manager.

Now, in Cygwin, your motes should show up when you type ‘motelist’ and should be assigned a COM port each. Note that you only need to go through the Device Manager procedure once per computer and subsequent motes will automatically be installed.

Step 4: Troubleshooting

In case any of these steps do not work, be sure to try this:

  • Close and reopen Cygwin (make sure to run as administrator) after any changes to the system library/environment/Cygwin/Java.
  • If any components (e.g. rpm, gcc) are missing, reopen Cygwin’s setup.exe and make sure the packages are installed. Reinstall them if necessary.
  • Update on 11/5/2010: I was advised by a reader that newer versions of Cygwin 1.7 (e.g. 1.7.7) on Windows 7 produces conflicting declarations of the cfmakeraw() function. This has to do with the function being included in Cygwin libc as of version 1.72. To make UISP compile, and for R. Bornet’s comments and patch file, check out his mailing list post here.
  • Be sure to read the official TinyOS Tutorials (especially #1 to #5) to get familiar with TinyOS. Also a good read is: TinyOS Programming Manual

Good luck!


Reader Comments

  • “I wish i could describe you the feeling when i inserted the lines […] in my tinyos.sh file, then clicking “Save” and starting again cygwin. Finally i managed to run the *&!%^+@~!@ TestSerial. I dont know who i can pay it you back. I have spent 3 days googling and applying solutions with no effect.” – N. Larisis, Greece
  • “I just started with TOS and had some trouble with installation and thus posted on tinyos-help mailing-list. Another guy on the list directed me to your Tiny OS primer page and found it very useful. I added a link to it on the official TinyOS documentation wiki.” – R. Bornet, Switzerland

23 Responses to “TinyOS Primer”

  1. Jasper Buesch says:

    Hey!
    I had major problems with the java stuff myself! (running cygwin under Win7(64) with javax64)
    When executing the last rpm package (tinyos-tools) I got “Java not found…” although the PATH and CLASSPATH were set right.
    I found out, that the tos-locate-jre script (which is used by that package)
    is using a tool called “regtool” to get the java home dir from “HKLM/SOFTWARE/JavaSoft/Java Development Kit/1.6”

    The problem is that on my computer a regtool list command for “HKLM/SOFTWARE” is redirected to
    “HKLM/SOFTWARE/Wow6432Node” and there was no entry for the java stuff at all.
    The simple solution was to copy the java entries from “HKLM/SOFTWARE/JavaSoft/” to
    “HKLM/SOFTWARE/Wow6432Node/JavaSoft” and everthing is fine now… 🙂

  2. biyan says:

    I can see python2.5-config file along with other python exe files inside this directory:
    C:\cygwin\bin

    Still, I am getting this error “make: python2.5-config: Command not found” while compiling Blink application.

    Is there any place I should tell make to look for this directory fo python2.5-config?

  3. vino says:

    I’m getting the error like this

    make: python2.5-config: command not found

    I read the above but coudnt get where to install Python.exe… help me to fix this error

  4. geoff says:

    @ Comments #2 and #3, have you guys ensured that you have installed python through the Cygwin installer? I’d re-run the Cygwin setup file, search for all packages with ‘python’ in the name, and make sure they are checked – click the checkmark a few times to see the difference between checked and unchecked. Hope this helps!

  5. Baris says:

    Hi,

    I followed the exact same steps and also changed the PYTHON VERSION from 2.5 to 2.6 in sim.extra files.
    This way everything works ok and the Blink application’s TOSSIM object can be created. However when I try to
    use TOSSIM on RadioCountToSend while compiling the related java file it says that symbol “SerialPacket” cannot be found
    the location is “class net.tinyos.message.Message”. I specifically installed JAVA 1.5 for this. Python is also installed I was able to run
    Blink’s simulation using python.

    Regards
    Baris

  6. Jay says:

    for 64 bit tos-locate-jre correction, add the -w switch to the regtool, see below, tos-locate-jre file:
    regtool -w -q get ‘\\HKLM\\SOFTWARE\\JavaSoft\\Java Development Kit\\CurrentVersion
    Remember to update both calls to regtool.

  7. John says:

    I get the error “make: *** No rule to make target ‘micaz’. Stop.” I have followed these steps carefully, and after googling around, it appears that others have the same issue. This is after all the steps to install have been completed, and I am trying to make the Blink example. Any ideas?

    Thanks!

    John

  8. mmmq says:

    Hello, I am getting this warning when I try to execute this command:

    rpm -Uvh –force –ignoreos –nodeps msp430tools-libc-20080808-1.cygwin.i386.rpm

    warning: user TinyOS User does not exist – using root

    Please help

  9. alex says:

    Hello and thanks for you good work!
    I have the same issue

    warning: user TinyOS User does not exist – using root
    what i m doing wrong? I have windows 7 64 bit

  10. daniele says:

    hi all,
    i followed the steps well but i meet some problems:
    1)also i have the same issue about
    warning: user TinyOS User does not exist – using root
    warning: user TinyOS User does not exist – using group
    2)when i make the command rpm -Uvh –ignoreos –force –nodeps tinyos-tools-1.4.0-3.cygwin.i386.rpm
    the package is installed and show installing jni code in “pathname” done
    but a window appears about giveio-install.exe-Impossible find the entry mount point
    the error message(i translate it from my language in italian):Impossible to find the entry point __getreent of the procedure in the
    library of dinamic linking cygwin1.dll
    and when i type motelist the same error appears.
    I installed giveio in windows xp sp3 but the error still remain.
    What cause the error?
    Many thanks for the help,
    Daniele.

  11. daniele says:

    sorry in the first problem i found only
    warning: user TinyOS User does not exist – using root
    😉

  12. Hammitt Raffaelli says:

    Hi,

    I still have problem with python2.5-config: command not found.
    the version of python installed is 2.5.1-2

    I have read that I should install the python headers using the apt-get install commands, but it seems apt-get doesnt work in cyqwin. I am using cyqwin 1.5 (from the tinyos.net). I have no problem installing the apps on motes and running them and java serial is also working fine, the only problem is the TOSSIM :

    make: python2.5-config: command not found
    and many lines of errors

    There is no error regarding python.h and I have checked python2.5-config exist in /bin directory. python.h in /usr/include/python2.5 The Python version is set to 2.5 in sim.extra

    Do you have any suggestion?

  13. daniele says:

    second point resolved 😉

    i think the first will not give any problems

  14. hi!!!
    I am facing trouble with installation of the source tree …..
    its showing failed dependencies..please help me out.

  15. I gave
    rpm -ivh tinyos-2.1.1-3.cygwin.noarch.rpm
    error:
    Failed dependencies:
    tinyos -tools 1.4 >= is need by tinyos-2.1.1-3
    nesc -1.3 is needed by tinyos 2.1.3

  16. Tanner says:

    I installed everything fine, but I got errors when trying to run the Java tools or run a Java program. It says I can’t load 32-bit dll on a 64 bit AMD. I am running windows 7 x64. Is there and easy way around this?

  17. Unai says:

    I have exactly the same problem of Hammitt Raffaelli(#12)
    someone could help me?

  18. Prasanth says:

    Am using Tinyos 2.x. Make in the folder C:cygwinopt inyos-2.xsupportsdkjava is not working for me.
    Its throwing error like this..

    javac DDocument.java
    DDocument.java:49: package net.tinyos.message does not exist
    import net.tinyos.message.*;
    ^
    DDocument.java:68: cannot find symbol
    symbol : class DNavigate
    location: class net.tinyos.mviz.DDocument
    public DNavigate navigator;
    ^
    DDocument.java:325: cannot find symbol
    symbol : class DMoteModelListener
    location: class net.tinyos.mviz.DDocument
    implements DMoteModelListener {
    ^
    DDocument.java:168: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    protected DMoteModel selected = null;
    ^
    DDocument.java:179: cannot find symbol
    symbol : class DShape
    location: class net.tinyos.mviz.DDocument
    public DShape getSelected() {
    ^
    DDocument.java:183: cannot find symbol
    symbol : class DShape
    location: class net.tinyos.mviz.DDocument
    public void setSelected(DShape selected) {
    ^
    DDocument.java:189: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    private DMoteModel createNewMote(int moteID){
    ^
    DDocument.java:206: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    private DLinkModel createNewLink(DMoteModel start, DMoteModel end) {
    ^
    DDocument.java:206: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    private DLinkModel createNewLink(DMoteModel start, DMoteModel end) {
    ^
    DDocument.java:206: cannot find symbol
    symbol : class DLinkModel
    location: class net.tinyos.mviz.DDocument
    private DLinkModel createNewLink(DMoteModel start, DMoteModel end) {
    ^
    DDocument.java:361: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    public void shapeChanged(DMoteModel changed, int type){
    ^
    DDocument.java:366: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    public void add(DMoteModel model){
    ^
    DDocument.java:372: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    public void remove(DMoteModel model){
    ^
    DDocument.java:381: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    private int findModel(DMoteModel changed){
    ^
    DDocument.java:142: cannot find symbol
    symbol : class DNavigate
    location: class net.tinyos.mviz.DDocument
    navigator = new DNavigate(sensed_motes, sensed_links, this);
    ^
    DDocument.java:190: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = new DMoteModel(moteID, rand, this);
    ^
    DDocument.java:190: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = new DMoteModel(moteID, rand, this);
    ^
    DDocument.java:207: cannot find symbol
    symbol : class DLinkModel
    location: class net.tinyos.mviz.DDocument
    DLinkModel dl = new DLinkModel(start, end, rand, this);
    ^
    DDocument.java:207: cannot find symbol
    symbol : class DLinkModel
    location: class net.tinyos.mviz.DDocument
    DLinkModel dl = new DLinkModel(start, end, rand, this);
    ^
    DDocument.java:226: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = (DMoteModel)moteIndex.get(new Integer(moteID));
    ^
    DDocument.java:226: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = (DMoteModel)moteIndex.get(new Integer(moteID));
    ^
    DDocument.java:240: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = (DMoteModel)moteIndex.get(new Integer(startMote));
    ^
    DDocument.java:240: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m = (DMoteModel)moteIndex.get(new Integer(startMote));
    ^
    DDocument.java:244: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m2 = (DMoteModel)moteIndex.get(new Integer(endMote));
    ^
    DDocument.java:244: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    DMoteModel m2 = (DMoteModel)moteIndex.get(new Integer(endMote));
    ^
    DDocument.java:248: cannot find symbol
    symbol : class DLinkModel
    location: class net.tinyos.mviz.DDocument
    DLinkModel dl = (DLinkModel)linkIndex.get(startMote + + endMote)
    ;
    ^
    DDocument.java:248: cannot find symbol
    symbol : class DLinkModel
    location: class net.tinyos.mviz.DDocument
    DLinkModel dl = (DLinkModel)linkIndex.get(startMote + + endMote)
    ;
    ^
    DDocument.java:295: cannot find symbol
    symbol : class DataModel
    location: class net.tinyos.mviz.DDocument
    DataModel model = new DataModel(packetVector);
    ^
    DDocument.java:295: cannot find symbol
    symbol : class DataModel
    location: class net.tinyos.mviz.DDocument
    DataModel model = new DataModel(packetVector);
    ^
    DDocument.java:303: cannot find symbol
    symbol : class MessageInput
    location: class net.tinyos.mviz.DDocument
    MessageInput input = new MessageInput(packetVector, source, doc);
    ^
    DDocument.java:303: cannot find symbol
    symbol : class MessageInput
    location: class net.tinyos.mviz.DDocument
    MessageInput input = new MessageInput(packetVector, source, doc);
    ^
    DDocument.java:310: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument
    ((DMoteModel)it.next()).requestRepaint();
    ^
    DDocument.java:316: cannot find symbol
    symbol : class DLink
    location: class net.tinyos.mviz.DDocument
    ((DLink)it.next()).repaint();
    ^
    DDocument.java:350: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    DMoteModel model = (DMoteModel) DDocument.this.motes.get(row);
    ^
    DDocument.java:350: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    DMoteModel model = (DMoteModel) DDocument.this.motes.get(row);
    ^
    DDocument.java:383: cannot find symbol
    symbol : class DMoteModel
    location: class net.tinyos.mviz.DDocument.DrawTableModel
    if ((DMoteModel)DDocument.this.motes.get(i) == changed)
    ^
    DDocument.java:408: cannot find symbol
    symbol: class DMoteModel
    DMoteModel model = (DMoteModel)it.next();
    ^
    DDocument.java:408: cannot find symbol
    symbol: class DMoteModel
    DMoteModel model = (DMoteModel)it.next();
    ^
    DDocument.java:411: operator + cannot be applied to DMoteModel.getLocX,int
    model.getLocX() + 20) &&
    ^
    DDocument.java:409: withinRange(int,int,int) in cannot be applied to (int,int,)
    if (withinRange(e.getX(),
    ^
    DDocument.java:414: operator + cannot be applied to DMoteModel.getLocY,int
    model.getLocY() + 20)) {
    ^
    DDocument.java:412: withinRange(int,int,int) in cannot be applied to (int,int,)
    withinRange(e.getY(),
    ^
    DDocument.java:444: operator + cannot be applied to DMoteModel.getLocX,int
    selected.move(selected.getLocX() + dx, selected.getL
    ocY() + dy);
    ^
    DDocument.java:444: operator + cannot be applied to DMoteModel.getLocY,int
    selected.move(selected.getLocX() + dx, selected.getL
    ocY() + dy);

    ^
    Note: DDocument.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    44 errors
    make[3]: *** [DDocument.class] Error 1
    make[3]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/mviz’
    make[3]: Entering directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/sim’
    … /opt/tinyos-2.x/support/sdk/java/net/tinyos/sim
    make[3]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/sim’
    make[3]: Entering directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools’
    … /opt/tinyos-2.x/support/sdk/java/net/tinyos/tools
    mig java -java-classname=net.tinyos.tools.PrintfMsg /opt/tinyos-2.x/tos/lib/pri
    ntf/printf.h printf_msg -o PrintfMsg.java
    javac PrintfMsg.java
    PrintfMsg.java:9: package net.tinyos.message does not exist
    public class PrintfMsg extends net.tinyos.message.Message {
    ^
    PrintfMsg.java:69: package net.tinyos.message does not exist
    public PrintfMsg(net.tinyos.message.Message msg, int base_offset) {
    ^
    PrintfMsg.java:78: package net.tinyos.message does not exist
    public PrintfMsg(net.tinyos.message.Message msg, int base_offset, int data_l
    ength) {
    ^
    PrintfMsg.java:20: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:26: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:35: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:44: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:53: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:62: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:71: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:80: cannot find symbol
    symbol : method amTypeSet(int)
    location: class net.tinyos.tools.PrintfMsg
    amTypeSet(AM_TYPE);
    ^
    PrintfMsg.java:166: cannot find symbol
    symbol : method getUIntBEElement(int,int)
    location: class net.tinyos.tools.PrintfMsg
    return (short)getUIntBEElement(offsetBits_buffer(index1), 8);
    ^
    PrintfMsg.java:173: cannot find symbol
    symbol : method setUIntBEElement(int,int,short)
    location: class net.tinyos.tools.PrintfMsg
    setUIntBEElement(offsetBits_buffer(index1), 8, value);
    ^
    PrintfMsg.java:245: package net.tinyos.message does not exist
    char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTE
    D_STRING_LENGTH,28)];
    ^
    14 errors
    make[3]: *** [PrintfMsg.class] Error 1
    make[3]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools’
    make[3]: Entering directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/util’
    … /opt/tinyos-2.x/support/sdk/java/net/tinyos/util
    make[3]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos/util’
    make[2]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net/tinyos’
    make[1]: Leaving directory `/opt/tinyos-2.x/support/sdk/java/net’

    Can u plz suggest a solution.

  19. Terje Mjelde says:

    Prasanth: I experienced the same problem. The solution was to include the SDK-dir as part of the CLASSPATH, like this:

    export CLASSPATH=´cygpath -w $TOSROOT/support/sdk/java´;.

    before you do a make tinoys.jar. Note that I removed the “tinyos.jar” from the CLASSPATH. Remember to restore the CLASSPATH afterwards.

  20. dwaraka says:

    hi

    i tried for serial listen program on telosb mote.

    when i type “java net.tinyos.tools.Listen -comm serial@COM15: telosb”

    i’m getting

    “$ java net.tinyos.tools.Listen
    Error: Could not find or load main class net.tinyos.tools.Listen”

    pls help me. thanks in advance

  21. Hans Peter says:

    I had the same problem as Prasanth (18) and dwaraka (20). Terje Mjelde’s (19) solution, didn’t work for me. What helped, was just to download the “tinyos.jar” file from http://www.tinyos.net/tinyos-2.x/support/sdk/java/ and replace it with the “tinyos.jar” file in /opt/tinyos-2.x/support/sdk/java/ on my computer.

    Hope that might help someone. (I’m sure I will run into more problem’s soon anyway 🙂

  22. Fede Sismondi says:

    Hans Pete & Prasanth ,
    Im having the same problem you were experiencing, but both of the solutions you mentioned didnt work for me.
    I have installed and ran tinyos succesfully before, but when I changed my distribution to kubuntu 11.10 and reinstalled everything I found with this problem.

    this is how my tinyos.sh looks like now:

    #! /usr/bin/env bash
    # Here we setup the environment
    # variables needed by the tinyos
    # make system

    echo “Setting up for TinyOS 2.1.1”
    export TOSROOT=
    export TOSDIR=
    export MAKERULES=

    #export TOSMAKE_PATH=$TOSROOT/support/make

    # variables de entorno
    export TOSROOT=/opt/tinyos-2.1.1
    export TOSDIR=$TOSROOT/tos
    export MAKERULES=$TOSROOT/support/make/Makerules
    export PATH=/usr/msp430/bin:${PATH}:/opt/msp430/bin:/opt/jflashmm
    export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java:.
    #tinyos.jar:.

    export TOSROOT
    export TOSDIR
    export CLASSPATH
    export PYTHONPATH
    export MAKERULES

    I cant campile java’s .java neither when compiling like javac sth.java nor when using make telosb (with radiocounttoleds for example )

    Need some help and advice!!
    thanks.

  23. ABID Aymen says:

    I use Cygwin with Windows Xp
    I am compiling with ‘make simple’
    for this example
    (file:///C:/Documents%20and%20Settings/ABID/Mes%20documents/th%C3%A8se/WSN%20installation/docs.tinyos.net/tinywiki/index.php/The_simplest_TinyOS_program.html)

    I have this message:
    ***missing separator. Stop***

    What’s the problem

    Thank’s