Hi, Julia

Thanks for your reply.

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.

My steps:
Firstly, I created a data file with TOS_Msg type; then the application read it and sent data to the base mote through serial port; I programmed the base mote with TOSBase, and tried to check received data in event UARTReveive.receive.

Yes, you are right; the length should be 6. But I'm not sure if the address should be 0x007e, since I'm trying to send data FROM PC TO MOTE through UART. Anyway, even when I changed the two fields, Msg->data is still not correct.

I read SimpleCmdM.nc, which is used when injecting packets (Lesson 7 in Tinyos tutorial). It seems that the received data is also TOS_Msg type (see task void cmdInterpret). I'm really confused.

Thanks a lot.

Best,
Lei

On 6/5/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:

Hi Lei,

Are u trying to send the packet to Micaz using serial Forwarder and
Broadcast Inject. If not, What format are u using to send it???
Note: 10 represents the data length right?? so I think it should be 6 and
not 10. Also, since you are sending the packet to the UART so the
destination address should be the UART address.


My best regards,

Julia



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



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

Reply via email to