I can't imagine why that value would be changed in the distributed code. I wonder if there's a CVS glitch someplace. MS
Nikhil Singhal wrote: > Thanks Michael! I did some digging and I think the reason I got "unknown > packet type 0x42" was because > net.tinyos.packet.Serial.PROTO_PACKET_NOACK is defined as 69 not 66 > (0x42). Changing that fixes this error. Caveat: I might not have the > latest CVS code, so this might not apply to other people. However, since > fixing this involved copying Packetizer.java verbatim and changing just > one variable declaration, I personally found it simpler to go one level > lower, and just use a SerialByteSource. > > On Thu, Apr 24, 2008 at 9:48 PM, Michael Schippling <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > The "packet type 0x42" thing is a little disturbing. I believe this > refers to the, if you will, pre-packet header (I think it's the very > first byte sent, or maybe the second after the framing byte) which > indicates if the message should be ACKed or not (0x42 is NO_ACK). > See the much referenced octavetech web page and various message spec > TEPS for details. > > If that is the case then something way deep on one or the other side > of your system has gotten the wrong ideas. I would actually expect > ListenRaw to not care about this value, and I'm very certain that it > doesn't care about any user level message/packet types. Perhaps a > little debug tracing can show you where is is going wrong. > > But to answer your actual question, in two ways... > > First you should be able to get a 'raw' message, after a bit > of protocol massaging, from the Packetizer.java class using > BuildSource.makePacketSource(); just the way Listen does. > > Second, you can always just open a raw serial port and read > every byte that comes at you. I don't remember the details, > but digging into the Packetizer or ListenRaw source should > lead you to the right open/read objects. > > MS > > Nikhil Singhal wrote: > > Hi > > Is there any way to get the raw packet stream in Java so that I > can parse it by hand? When I try to use the Listen or ListenRaw > tools, I get the following error message repeatedly: > serial@/dev/ttyUSB1:57600: ignoring unknown packet type 0x42 > > (Some context: I'm using the XBow MTS420CC GPS board, and the > only way I can get it to work is if I use their custom-made > xmesh code. This is apparently sending a packet of a type that > the existing tools cannot parse. However, I have figured out the > offsets for the data I need, so I don't need any unframing etc > done for me. All I need is access to the raw bit stream, which I > guess is in the form of a char array.) > > Thanks! > -- > Nikhil > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > <mailto:[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 > > > > > -- > Nikhil -- 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
