[Tinyos-help] Packet format from PC to base mote through UART

Lei Tang leitangcn at gmail.com
Mon Jun 5 10:21:00 PDT 2006


Hi, all

I am trying to send a packet from a PC to a micaZ mote through serial cable.
The packet looks like:

7e 42 ff ff 0 81 10 f f f f f f a1 21 7e
       header           data    crc

(I put two random bytes in the crc field, but I think that's not a big
problem since it doesn't filt out CRC-error packet.)

At the mote, I read the received data in event TOS_MsgPrt
UARTReveive.receive(TOS_MsgPrt Msg) {}. The header is correct, but
Msg->data[0] is always the last CRC byte, here 0x21, and I didn't see the
data section (0xf) in Msg.

Did I make a right packet? How could I send data to base mote throught UART
correctly?

Thanks!

Best,
Lei Tang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060605/c377c081/attachment.htm


More information about the Tinyos-help mailing list