Sorry, I dunno from T2 or ReadStream. I made what seems to be a
good SWAG at the meaning of the offending data. I'm not surprised
that the behavior is not speced, as we are all expected to know
everything beforehand or use the mostly impenetrable code as a guide.
Is it possible that the length is a feature of the sensor itself?
You might consider that the "length" field is two bytes, so the
next 00 byte is just filler.
I would run with the interpretation we have developed and not ask
too many questions...
MS
Mehmet Akif Antepli wrote:
>
> Hi Michael,
> Sorry for the previous deficient post, here is the full version :)
> I tried with different 'NREADINGS' in the following structure: (I am
> using TinyOS-2.1.0)typedef nx_struct oscilloscope {
> nx_uint16_t version; /* Version of the interval. */
> nx_uint16_t interval; /* Sampling period. */
> nx_uint16_t id; /* Mote id of sending mote. */
> nx_uint16_t count; /* The readings are samples count * NREADINGS
> onwards */
> nx_uint16_t readings[NREADINGS];
> } oscilloscope_t;
> It seems that you r right. 1st reading is the number of readings and
> the 2nd reading is 0. The rest is the meaningfull data.
> However, there is not any clue about this in the ReadStream Interface.
> Is it the intended way?I thought that you pass the buffer with the
> following command:
> command error_t postBuffer(val_t * buf, uint16_t count);
> And then handle the following event:
> event void bufferDone(error_t result, val_t * buf, uint16_t count) ;
> Thus, you get the buffer filled with sensor data...
> What do you think?
> Thanks in advance,
>
> --
> Mehmet Akif Antepli
> Graduate student
> Dept. of EEE
> Middle East Technical University
>
>
>
> On Sun, May 31, 2009 at 9:36 AM, Michael Schippling
> <[email protected] <mailto:[email protected]>> wrote:
>
> Could that just be the count of readings?
> MS
>
> Mehmet Akif Antepli wrote:
>
> Hi,
> I am using trying to take magnetic sensor data from MTS310
> sensor board (I use MicaZ motes). I have modified
> oscilloscope application. When I use MagXC and MagYC
> interfaces, it works, but I want to increase the sampling
> rate so i used MagXStreamC and MagYStreamC interfaces.
>
> I use the same message structure as in the Osciiloscope
> application. In the oscilloscope_t struct, there is the
> field 'readings' which keeps 10 sensor readings. The problem
> is that , first two entries in the 'readings' array, are
> 0xa0 and 0x0 and they never change. Data in the rest of the
> array is correct.
> I can get rid of those 'dummy' values. I just ignore them
> and send the meaningful data over the radio to the
> base-station mote.
> But it shouldn't be this way and i couldn't figure out what
> i am doing wrong. Maybe there is problem in the low level
> i2c code.
> Could anyone help me with this issue?
>
> Thanks in advance,
>
> --
> Mehmet Akif Antepli
> Graduate student
> Dept. of EEE
> Middle East Technical University
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> <mailto:[email protected]>
>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help