Firstly thanks for replying - I appreciate it. Secondly, no it was not the question. I have already read the reference you posted and it did explain a few things that has enabled me to get this far.
The transformations I described are affected by my code; remember I am attempting to write to the mote, so we are looking at: Pkt: 7e 42 06 01 08 14 ff ff 7d 5e 00 14 7d 5d 03[14] 00 00[16] 80 0a[18] 00 ba[20] eb 7e cmd == pkt[14,15] mask == pkt[16,17] arg == pkt[18,19] (crc == pkt[20,21]) All the extra bytes near the start of the packet are there for the TelosB CC2420 radio i.e. it has a different message header to the Micas. Note that the mote differentiates between a radio packet and a UART packet by the destination address. So what I am really asking is for someone to construct a packet ready for the wire targeting the telosb platform, with 20 as the AM type, 0x7e as the destination, 0x7d as the group id, three 16-bit numbers (3, 1<< 15, 10), plus the crc calculation -- Warm regards, Darren Bishop, MSc, BSc (Hons), MBCS On Sunday 30 July 2006 06:57, Michael Schippling wrote: > Looks to me like your CommandMsg stuff is here, in lsb order: > > Pkt: 7e 42 06 01 08 14 ff ff 7d 5e 00 14 7d 5d 03 00 00 80 0a 00 ba eb 7e > ^^^^^ ^^^^^ ^^^^^ > cmd mask arg > > The 7e's are message sync bytes, and the 7d5e and 7d5d are escaped values > which map to 7e and 7d (I think...). In any case have a look at the > OcataveTech page for interpretation of the message stream: > http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Pac >kets.pdf > > was that the question? > MS > > Darren Bishop wrote: > > Could someone please help me with writing to Moteiv telosb motes? I am > > working with Python, but I do not expect this will matter much due to the > > tight coupling with C. > > > > The following struct describes what I am trying to send: > > > > struct CommandMsg { > > uint16_t cmd; // = 3 > > uint16_t mask; // = 1<<15 > > uint16_t arg; // = 10 > > }; > > > > The data I send goes through the following transformations: > > > > Data: 03 00 00 80 0a 00 > > Message: 14 7d 03 00 00 80 0a 00 > > Packet: 7e 42 06 01 08 14 ff ff 7d 5e 00 14 7d 5d 03 00 00 80 0a 00 ba eb > > 7e > > > > I recall reading that motes are LSB byte order, and hence the ordering I > > use. > > > > Can someone please process these threee 16-bit integers and show me how > > it is done ? _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
