Just a few questions and suggestions...
The greenON means that you need the message buffer
before transmission is done? And redON is a send()
failed, or exactly what? When you say "The missing
packets period" are all packets lost or just some?
If some can you see a pattern?
There must be something 'beating' between the two
transmitters. You could try running them at slightly
different sample rates to see if that changes the
behavior. Maybe flash an LED in sendDone() and watch
it with a scope to see jitter in normal times and any
drop outs when things are bad. Do the same thing with
send() calls and compare against the done()s.
I would also use a least two message buffers so you
have some breathing room between messages, and it's
a bad idea to count on getting all the messages anyway
because some get dropped even in the best of times.
MS
Oussama Chougna wrote:
Hello,
Using: Tmote Sky, TinyOS 1.x, Cygwin WinXP
I have two motes sampling 4 channels of the AD converter module at 200HZ.
On the ADChannels a function generator is putting a sine with an offset
applied.
When 10 samples are collected from each channel (10 * 2 bytes * 4
channels = 80 bytes), they are packaged in a TOS_Msg and buffered in a
TOS_Msg buffer.
Another process with tasks is sending the TOS_Msg’s from the buffer over
the radio.
*_THIS IS NOT A CIRCULAR BUFFER!!_*
*_ _*
To understand my story you should understand that when using a high AD
sampling frequency, the frequency with which you send packets will
increase. More packets are generated!
The TOS_Msg’s are received by a TOSBase mote and the data is stored on
the computer, for later visualization.
Leds debug on the mote:
greenON : TOS_Msg Buffer is overflowed.
redOn: A packet could not be sent.
*_Scenario 1:_*
2 motes sampling the ADChannels @ 20HZ works fine. When I visualize the
sine, it looks good (Like the sine of the function generator). This is
20HZ sampling so the frequency of packets sending is low.
No debug leds are lighting up.
*_Scenario 2:_*
2 motes sampling the ADChannels @ 50HZ.
This works fine *for about 2.5 hours*, after this period packets are
missing from *both motes*. The missing packets period is about *30
minutes*. After this *30 minutes* it works fine again for *2.5 hours*.
No debug leds are lighting up.
*_Scenario 3:_*
2 motes sampling the ADChannels @ 200HZ.
This works fine for *1 hour*, after this period packets are missing from
*both motes*. The missing packets period is *about 45 minutes*. After
this 45 minutes it works fine again for 1 hour.
No debug leds are lighting up.
*_ _*
*_Scenario 4: (WorkLoad is too much for TOSBase maybe?????????)_*
1 mote sampling ADChannels @ *500HZ*. This works *fine* for the whole
period. So in this scenario packet sending is done in a very high
frequency, *but TOSBase can handle them!!!*
No debug leds are lighting up.
*So TOSBase seems not to be the problem because it can handle one mote
sampling @ 500HZ. The packet receive frequency is very high here!!!!*
*When I increase the sampling frequency, the period where no packets are
missing decreases.*
* *
*So the problem here is that when using two motes there is a period with
packets not arriving at TOSBase (missing packets), maybe the motes are
fighting then for the radio channel or something?*
*Why is it working fine when using low frequency sampling or when using
just 1 mote??? 1 mote has no opponent to fight with. *
* *
*These are my conclusions but I I still don’t know the exact explanation
for this problem. Why is there a period FOR BOTH MOTES at the same time
missing packets? It is not random missing packets!*
* *
* *
*I hope someone could help me out with this.*
* *
* *
*Thank you*
* *
* *
*Chougna*
------------------------------------------------------------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help