Unfortunately it sucks. Having just done a cycle of code archeology
in order to hack in a new message format for a different platform...

When the Packetizer and below code receives a message it attempts
to instantiate a dummy class from:
     net.tinyos.message.<platform>.TOSMsg
in order to get two offset fields (length and data[] start) so it
can "validate" the packet. These dummy classes also seem to form
the basis for MIG generated classes but otherwise are not used at
this level, only rearing their ugly heads in the user app later.

I blame CS grad students for this.


In other news (since I don't have T2 or Testserial code, I'm not
sure of this but): If the Testserial class is a standalone and
not in the tinyos.jar then this:
     export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
will not work too good. It should include the current directory:
     export CLASSPATH=".;$TOSROOT/support/sdk/java/tinyos.jar"
And further, TOSROOT should be a real path (e.g., on Widows
C:/cygwin/opt) not the faked up cygwin root version like "/opt"

I blame Bill Gates for this.


Now if I could just find the person(s) at Intel and Motorola
whe decided to use opposite integer byte orderings I could
complete the trifecta of revenge for millions of lost debugging
hours.

MS


Eric Decker wrote:
> 
> 
> On Wed, Sep 30, 2009 at 9:16 AM, Michael Schippling <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     The usual format for the MOTECOM setting is something like
>      export MOTECOM="ser...@com7:tmote"
>     where the last field specifies what kind of mote is used.
> 
> 
> I'm pretty sure that the last field isn't type of mote because the 
> serial doesn't care about that.  It is just looking at serial packets. 
>  It would suck if it cared.
> 
> Rather it is the baud rate.  You can give it the name of the mote and it 
> makes assumptions about what speed the connection is being run at. 
>  There is a table that the code goes and peeks in to get the speed. 
>  Kind of kludgy but that is what the code is doing.
> 
> Thought I'd clear that up.
> 
> eric
> 
>     That might be what's causing the null pointer.
>     MS
> 
> 
>     Ricardo . wrote:
>      > Hello everyone,
>      >
>      > I'm going to start programming in tinyos, and I am now interested in
>      > knowing how to debug this kind of devices.
>      > I am working with the "ICradio stick 2.4", and I'm trying to run the
>      > application TestSerial.
>      >
>      > I can compile and flash .hex the mote, but when I try to run the java
>      > application gives me an error NullPointerException.
>      >
>      > I am working with the cygwin and tinyos-2.0.2-2. I am running the
>      > application with the command $java TestSerial -comm COM3. I confirmed
>      > that the mote is connected to COM3.
>      >
>      > $ java TestSerial -comm ser...@com3
>      > Exception in thread "main" java.lang.NullPointerException
>      > at java.util.Hashtable.get(Unknown Source)
>      > at net.tinyos.packet.Platform.get(Platform.java:23)
>      > at net.tinyos.packet.BuildSource.decodeBaudrate(BuildSource.java:201)
>      > at net.tinyos.packet.BuildSource.makeArgsSerial(BuildSource.java:227)
>      > at
>     net.tinyos.packet.BuildSource.makePacketSource(BuildSource.java:138)
>      > at net.tinyos.packet.BuildSource.makePhoenix(BuildSource.java:87)
>      > at TestSerial.main(TestSerial.java:97)
>      >
>      >
>      > Does anyone know the cause of the problem and/or how to solve it?
>      >
>      > Thank you very much,
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Tinyos-help mailing list
>      > [email protected]
>     <mailto:[email protected]>
>      >
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>     _______________________________________________
>     Tinyos-help mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
> 
> 
> -- 
> Eric B. Decker
> Senior (over 50 :-) Researcher
> 
> 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to