[Tinyos-help] Re: Packet format from PC to base mote through UART
Sankar Gorthi
sankar.b.gorthi at gmail.com
Mon Jun 5 21:35:30 PDT 2006
Lei,
you're actually right.
You need to write to the 7E address.
Try sending this message:
7E42 7D5E FFFF 7D5D 05AA 0744 0811 3840 7E
Sankar.
On Mon, 05 Jun 2006 23:23:41 -0500, Lei Tang <leitangcn at gmail.com> wrote:
> 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, jabdo at site.uottawa.ca < jabdo at site.uottawa.ca> 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
>>
>>
>>
--
No opera plot can be sensible, for people do not sing when they are
feeling sensible. - W. H. Auden
More information about the Tinyos-help
mailing list