[Tinyos-help] Re: Packet format from PC to base mote through UART
Lei Tang
leitangcn at gmail.com
Wed Jun 7 21:28:30 PDT 2006
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 <dgay42 at gmail.com> wrote:
>
> On 6/5/06, Lei Tang <leitangcn at gmail.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060608/b76fa6ca/attachment.html
More information about the Tinyos-help
mailing list