Thanks for you suggestion.

Packetizer.java indicates the form of each packet should be :  7e  <packet type> <data bytes 1..n> <16-bit crc>  7e. So my packet does not violate it.

I think the base mote assumes a packet from UART has the form of TOS_Msg. My problem is my mote received header of each packet correctly, but not data section.

For example, if the raw data is "7E 42 7D 5E 00 00 81 05 AA 07 44 08 11 B9 25 7E", at the base mote I can see Msg->addr = 007e, Msg->type = 00, Msg->group = 81, Msg->length = 05; they all look good. But Msg->data is "25 00 00 00 00". I'm so confused.

Do you have more suggestion? Thanks.

Lei


On 6/7/06, David Gay <[EMAIL PROTECTED]> wrote:
On 6/5/06, Lei Tang <[EMAIL PROTECTED]> wrote:
> I was using a general serial-port application to send data to the mote,
> because I want to have my own application to control motes.

A suggestion: if you want to roll your own code, start by reading
through the existing code which does what you want to do. The Java
version (well, the part that encodes a packet for transmission over a
serial port) is in
tinyos-1.x/tools/java/net/tinyos/packet/Packetizer.java. It does have
comments, and it does have a brief description of the protocol and
encoding.

David Gay

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to