Hello Michael, Lei, All, I have solved the problem. I had been doing everything write except for the address I was specifying. I had read in a Tinyos-help thread started by Lei Tang (post by Julia) that you had to specify the UART address as destination. This does not work for me (maybe due to telosb platform) and it is the one reason I have been loosing sleep for 2 weeks; you can specify either the broadcast address or the motes address. I have tested this both in C going via serial forwarder and in my direct python application.
Lei: I could not tell if you ever solved your problem: like the advice I was getting from my supervisor, you may have moved on to a different task, to come back to this later. In my experience the crc does matter. I am using GenericComm and my component is not signalled if I deliberatly mangle the crc pc-side before sending. Look at Crc.java or serialsource.c for implementations of the crc algorithm. You maybe using a component/interface too low-level to benefit from the crc i.e. the check fails but you're working at a level where processing occurs regardless. Use GenericComm. -- 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
