It's not the tutorial and only for T1 mica2 but maybe this'll help...
http://www.octavetech.com/pubs/TB5-01 Deciphering TinyOS Serial Packets.pdf
Pay some attention to the "escape" technique required by the frame byte.

I don't think that your header (from Seq# thru Message length) matches
any of the TOS_msg or message_t structs that I know. Unfortunately they
are different for various platforms and versions so you need to find
the right struct to imitate.  IIRC multi-byte fields are little-ended.
And of course the framing and protocol stuff is not included in any C
struct definition so it's pretty much go-reverse-engineer-something-
that-works. Looking at Packetizer.java, and perhaps using ListenRaw
to see the whole byte stream from a working system may help.

MS


Aleksandar Kovacevic wrote:
> I need help.
> I am making c# application which need to send the packet to mote. I dont 
> wanna use tinyos toolchain in this case.
> On the mote, a simple application has been written, leds will toggle 
> each time event UartReceive.Receive is occurred.
> So, I send this packet through serial port:
> 0x7E -  Frame delimiter
> 0x44 - Protocol byte (68): SerialP
> 0x26 - Sequence number byte: SerialP
> 0x00 - Packet format dispatch byte: SerialDispatcherC
> 0xFF - Destination address
> 0xFF - Destination Address
> 0xFF - Source Address
> 0xFF - Source address
> 0x0B - Message Length (11, length of the payload)
> 0x70 - GroupID (set on the node as well to this value)
> 0x06 - Active Message Handler ID
> 0x01 0x00 0x02 0x12 0x34 0x56 0x00 0x12 0x45 0x56 0x00 - Payload
> 0xDE 0x25 - CRC (well calculated)
> 0x7E - Frame Delimiter
> 
> Pls, dont refer me to TinyOS tutorial, since it doesn't show actual byte 
> stream, and it is anyway quite faulty, since simple adding of source 
> address (as some ppl suggested) is not the only problem.
> This problem bugs me for a long time now, and pls, if someone know, I 
> would really appreciate if you tell me.
> Also, if the above byte stream not correct, pls give me the packet 
> format example that works for sure.
> 
> Thanks a lot in advance!
> 
> Regards,
> Aleksandar
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to