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] > 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
