02-25-2008 12:57 PM
03-07-2008 02:11 AM
Hi Rocachondo,
I am also (trying) to work with the Mica2Dot motes. There's a link : http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=1FB66B354ED149C7E0440003BA230E... that provides interface to the Mica2 motes and some specific boards. Maybe it can give you some guidance.
I am though, trying not to listen to any packets coming through my TOSBase, but just trying to access the ADC's straight. Practically, I am not interested in the wireless link (or the EEPROM program) but just in the CPU control (and its registers naturally). Implementing a low-level comm with this USB port will demand some time, which I at the moment don't have.
Any ideas?
Thank you!!!
Edgar Charry
03-07-2008 02:22 AM
03-07-2008 02:50 AM
Exactly....
It would be Ok keep listening to the serial port with TOS_Msg packets coming (PC commands) and with Labview handle the events. But I'll still need to program this onto the mote's memory using TinyOS. Instead of that, I'd like just to have access to the registers, CPU, ALU, multiplying and ADC without having to "listen" to the packets. It wanna do something like: call ADC2.getData(); and get the event: async event result_t ADC2.dataReady(uint16_t data).
Got it?
Thanks anyway for your reply..!
03-07-2008 02:55 AM
03-08-2008 01:32 AM
03-09-2008 01:49 PM
03-13-2008 02:15 AM
Hi!
As you work with the Xbow motes, i think we should take up contact. 🙂
Anyway: maybe you can help me out with the following, as maybe you had also this sort of problem:
I am experimenting problems with the packet structure. The TOS_Msg struc is intact, but i've changed the xsensor header a bit. However i cannot recognized some bytes that my programm is listening (and shouldn't be received). They are marked with a "???" below. As strenght and ack bytes are not sent, don't really know what they are (or where the CRC is).
My packet struc should be 5 bytes of TinyOS Header :
a. Dest Add - 2, AM Group - 1, AM Type - 1, Length - 1
another 6 bytes of xsensor header (which i changed to count the packets supposed to be transmitted and the transmitted in fact):
b. packet_id - 2, tx_id - 2, node_id = 1, rsvd -1
and the payload that should contain 8 bytes:
c. thermistor - 2, adc2 - 2, adc3 - 2, adc4 - 2.
and:
d. 2 bytes of crc.
Leading to a total of: 21 bytes.
However listening to the UART Port using Labview i read 27 bytes everytime.
Below:
FFFF 007D 5D0E A200 A200 0700 DB01 A701 5B02 1702 CD00 C5B3 7E7E 42, that are described below:
FFFF: Dest Add |
00: AMGroup |
7D: AMType|
5D = ????
0E: length (which is 14bytes and is correct)|
A200: packet id|
A200: tx id|
07: node id|
00: reserved|
DB01:Thermistor|
A701:ADC2|
5B02:ADC3|
1702:ADC4|
CD00:???
C5B3:???
7E7E:???
42:???
Do you know where do these bytes come from (which file should I look at - AM.h has already the TOS_Msg description, but these bytes are not implemented)????
Thanks many times for any kind of guidance!
Edgar Charry
03-13-2008 03:59 AM
03-18-2008 02:38 AM
Hi Rocachondo,
Thanks for your fast reply.
I've been running in a lot of things, so i coudn't answer you back.
To the problem: basically then, if the packet receives a 0x7D, the code checks if its subsequent byte is 0x5E or 0x5D to discover if its a 7E or 7D being transmitted.
Somehow and sometimes only, reading through the VISA, my packets are not being received correctly. The read packet bounces and i get the wrong data.My buffer is set to the default (4096), so i think it's not a problem of buffer. I suspect XSniffer filters this half-packets off, just to display the right data.
Have you experienced such a thing? Did you implement any flow control?
Cheers and thanks,
Edgar Charry