You may be using the wrong (older) version of Java,
or worse, compiling with one version and running with another.
I suspect that TOS requires 1.5++. "type java" and/or "which javac"
may provide clues.

I hate GUI's...
MS

sergio mena doce wrote:
Hi to all.


We are two students of the Technical University of Catalonia (UPC).


We're getting started in the tinyOS environment. The situation is the following: we are working with tinyOS 2x (Beta version) under Ubuntu 7.04 Operative System. We are doing the tutorials of tinyOS 2x (tinyOS web page) and we've arrived to the lesson 5 and we have a problem at the end of the lesson.

As first step we've compiled  Oscilloscope application:


[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope$ make telosb

mkdir -p build/telosb

    compiling OscilloscopeAppC to a telosb binary

ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= OscilloscopeAppC.nc -lm

    compiled OscilloscopeAppC to build/telosb/main.exe

           14660 bytes in ROM

             380 bytes in RAM

msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex

    writing TOS image

And we've installed the Oscilloscope application in three motes:

[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope$ make telosb reinstall,n

tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump --target ihex build/telosb/main.ihex build/telosb/main.ihex.out-1 TOS_NODE_ID=1 ActiveMessageAddressC$addr=1

    found mote on /dev/ttyUSB0 (using bsl,auto)

    installing telosb binary using bsl

tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out-1

MSP430 Bootstrap Loader Version: 1.39-telos-8

Mass Erase...

Transmit default password ...

Invoking BSL...

Transmit default password ...

Current bootstrap loader version: 1.61 (Device ID: f16c)

Changing baudrate to 38400 ...

Program ...

14692 bytes programmed.

Reset device ...

rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
In a fourth mote we've installed the BaseStation application and we've started the SerialForwarder like tells the tutorial: java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb Next we've compiled the java application and we obtain seven warnings:

[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope/java$ make

javac *.java

----------

1. WARNING in ColorCellEditor.java (at line 17)

        public class ColorCellEditor extends AbstractCellEditor

                     ^^^^^^^^^^^^^^^

The serializable class ColorCellEditor does not declare a static final serialVersionUID field of type long

----------

----------

2. WARNING in Data.java (at line 11)

        import java.util.*;

               ^^^^^^^^^

The import java.util is never used

----------

----------

3. WARNING in Graph.java (at line 13)

        import java.awt.event.*;

               ^^^^^^^^^^^^^^

The import java.awt.event is never used

----------

4. WARNING in Graph.java (at line 16)

        import java.util.*;

               ^^^^^^^^^

The import java.util is never used

----------

5. WARNING in Graph.java (at line 19)

        class Graph extends JPanel

              ^^^^^

The serializable class Graph does not declare a static final serialVersionUID field of type long

----------

----------

6. WARNING in Window.java (at line 38)

        class MoteTableModel extends AbstractTableModel {

              ^^^^^^^^^^^^^^

The serializable class MoteTableModel does not declare a static final serialVersionUID field of type long

----------

7. WARNING in Window.java (at line 108)

        static class MoteColor extends JLabel implements TableCellRenderer {

                     ^^^^^^^^^

The serializable class MoteColor does not declare a static final serialVersionUID field of type long

----------

7 problems (7 warnings)jar cf oscilloscope.jar *.class
Finally we've tried to run the Oscilloscope GUI application and we have several errors whose reason we don't understand and we're not able to solve:
[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope/java$ ./run

Exception in thread "main" java.awt.AWTError: No suitable parent found for Component.

   at javax.swing.JColorChooser.createDialog(libgcj.so.70)

   at ColorCellEditor.<init>(ColorCellEditor.java:25)

   at Window.setup(Window.java:160)

   at Oscilloscope.run(Oscilloscope.java:54)

   at Oscilloscope.main(Oscilloscope.java:126)
 What is the problem?

What can we do to solve this?
We would very grateful for your help.

------------------------------------------------------------------------
Prueba algunos de los nuevos servicios en línea que te ofrece Windows Live Ideas: tan nuevos que ni siquiera se han publicado oficialmente todavía. Pruébalo <http://ideas.live.com>


------------------------------------------------------------------------

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to