Greetings, I am working with a Shimmer2r device and have been trying to troubleshoot some trouble that I have been having with packets being sent, it also seems to effect serial communication as well if I use the ttyUSB serial device and output data that way. I suspect there is something fishy going on with how the points are setup, but can't seem to locate the exact problem.
If I assign data directy to the data packet using dummy data such as this:
btrpkt -> dataX = (uint16_t)0xDEF0;
btrpkt -> dataY = (uint16_t)0xF012;
btrpkt -> dataZ = (uint16_t)0x1234;
it seems to work fine, however if I use the ADC buffer like this to get the
real data:
btrpkt -> dataX = (uint16_t)sbuf0[0];
btrpkt -> dataY = (uint16_t)sbuf0[1];
btrpkt -> dataZ = (uint16_t)sbuf0[2];
it seems to inject a byte into the payload section of the packet every once in
a while, it does not happen all the time.
Here is a sample output of the packets coming back:
data= 07 A0 04 74 07 48 00 00 CD EF 00 00, LQI=76 (0b101110110), FCS=1E,
end=7E,
data= 07 D0 04 62 07 33 00 00 89 AB 00 00, LQI=DC (0b111011100), FCS=06,
end=7E,
data= 07 4F 04 7D 5E 07 14 00 00 CD EF 00, LQI=00 (0b100000000), FCS=24,
end=A5,
data= 07 DC 04 C3 07 68 00 00 89 AB 00 00, LQI=C0 (0b111000000), FCS=A7,
end=7E,
data= 07 DD 03 C4 07 A3 00 00 CD EF 00 00, LQI=E2 (0b111100010), FCS=8A,
end=7E,
data= 07 48 05 3B 07 86 00 00 89 AB 00 00, LQI=A8 (0b110101000), FCS=52,
end=7E,
data= 07 50 05 22 07 7D 5D 00 00 CD EF 00, LQI=00 (0b100000000), FCS=8E,
end=35,
data= 08 60 04 35 07 20 00 00 89 AB 00 00, LQI=A7 (0b110100111), FCS=31,
end=7E,
you will notice on the lines where the "end" byte (of a packet) should be "7E"
it is not, and there is an injected byte in the data payload and I don't know
where that byte is coming from. I have tried to dumb down and simplify the
program as best I can to locate the problem, but I highly suspect there might
be an issue with how tinyOS is dealing with 16 bit wide variables.
I am including all the program here, along with the python program that I use
to monitor the data coming back in.
The Shimmer2r uses a SPAN USB device to get the data and that is displayed
using the python script also included.
If anyone else has noticed problems with byte injecting into packets, please
let me know as I have tried most of what I can here to troubleshoot it, I
suspect it is in one of the layers associated with sending the packets.
Allan Drassal
Washington State University
AccelGyroWireless.tar.gz
Description: AccelGyroWireless.tar.gz
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
