Re: [Tinyos-help] cc2420 LPL broadcasting

2008-08-28 Thread Flavio Pompermaier
I noticed that, but this recalibration seems to happen also after
receiving/listening..isn'it? Can I consider it as a tx<->rx transition?
Just some minute ago I noticed that the 3 phase last about 840 us..what is
that? Is the tx->rx transition (840us) longer than the rx->tx one (140 us)?
And phase 4? What does it represent? Is it the backoff? My estimations for
min-max values are correct..?


--- Gio 28/8/08, Sarfraz Nawaz <[EMAIL PROTECTED]> ha scritto:

> Da: Sarfraz Nawaz <[EMAIL PROTECTED]>
> Oggetto: Re: [Tinyos-help] cc2420 LPL broadcasting
> A: [EMAIL PROTECTED]
> Cc: "Tinyos" 
> Data: Giovedì 28 agosto 2008, 16:44
> There is a state diagram on page 45 of cc2420 datasheet
> which might be
> helpful. After the transmission is complete, it goes into a
> state
> where the oscillator is calibrated again.
> 
> On Thu, Aug 28, 2008 at 8:13 PM, Flavio Pompermaier
> <[EMAIL PROTECTED]> wrote:
> > cc2420 broadcast transmission has a periodic waveform
> like this (leaving out non-periodic phases such as radio
> initialization or DELAY_AFTER_RECEIVE listening):
> >
> > 2  34   5
> >| |   ||  |
> >  1  | |  /||\ |  1  
> > | | / || \|
> >|\|/  ||
> >| |   ||   | |
> >
> > If I understood correctly and supposing that the
> message to broadcast is 24 bytes long (i.e., 24+11 (MAC
> header)+2 (CRC)-->37 bytes-->74 symbols. Being 2
> symbols sent in 1 jiffy then the tx of the message should
> theoretically take 1.13 ms):
> >
> > 1) is the transmission of the message (oscilloscope
> duration: 1.4 ms. Almost equal to the expected value)
> > 2) After transmission cc2420 drops its current
> consumption for 140 us.
> > Probably it corresponds to the tx/rx transition. Am I
> right?
> > 3 and 4)Total duration is about 2.120 ms. What do they
> represent? Are they backoff + cca???
> > 5) 140 us. Probably it corresponds to the rx/tx
> transition.
> >
> > Am I correct? If so, can I consider tx<->rx 
> transition to last 140 us?
> > And what represent phases 3 and 4? And what is the
> backoff range (in ms)?
> > Is it correct to consider min backoff = 10 jiffies and
> max 50 jiffies (min 0.305 ms and max  1.5 ms)? And waht is
> the duration of CCA?
> >
> > Best regards,
> > FP
> >
> > __
> > Do You Yahoo!?
> > Poco spazio e tanto spam? Yahoo! Mail ti protegge
> dallo spam e ti da tanto spazio gratuito per i tuoi file e i
> messaggi
> > http://mail.yahoo.it
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> >
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >

__
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] cc2420 LPL broadcasting

2008-08-28 Thread Flavio Pompermaier
cc2420 broadcast transmission has a periodic waveform like this (leaving out 
non-periodic phases such as radio initialization or DELAY_AFTER_RECEIVE 
listening):

 2  34   5 
| |   ||  |
 1  | |  /||\ |  1  
| | / || \|
|\|/  ||  
| |   ||   | |

If I understood correctly and supposing that the message to broadcast is 24 
bytes long (i.e., 24+11 (MAC header)+2 (CRC)-->37 bytes-->74 symbols. Being 2 
symbols sent in 1 jiffy then the tx of the message should theoretically take 
1.13 ms):

1) is the transmission of the message (oscilloscope duration: 1.4 ms. Almost 
equal to the expected value)
2) After transmission cc2420 drops its current consumption for 140 us. 
Probably it corresponds to the tx/rx transition. Am I right?
3 and 4)Total duration is about 2.120 ms. What do they represent? Are they 
backoff + cca???
5) 140 us. Probably it corresponds to the rx/tx transition.

Am I correct? If so, can I consider tx<->rx  transition to last 140 us?
And what represent phases 3 and 4? And what is the backoff range (in ms)?
Is it correct to consider min backoff = 10 jiffies and max 50 jiffies (min 
0.305 ms and max  1.5 ms)? And waht is the duration of CCA?

Best regards,
FP

__
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Mail "pruned"...(LPL broadcasting)

2008-08-21 Thread Flavio Pompermaier
I had some trouble sending a message...it gets truncated on the mailing list 
server..I don't know why..
(http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-August/035695.html)
My mail was the following.. (for the third time...:( )
Hi to all,
I've a question about the broadcasting of a message when using LPL. From what I 
see from the oscilloscope is that the packet is continuously repeated for all 
the receiver's LPL interval (plus some time). That's fine.
However, I do not understand why after a transmission there's always a 
listening phase.
How can I modify the duration of this listening period after a transmission and 
why 
this behaviour? Is it because the cc2420 goes automatically in RX mode after a 
TX (as
it seems from the CC2420 Finite state machine on datasheet..)?

Best regards,
FP


__
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] LPL broadcasting

2008-08-21 Thread Flavio Pompermaier
Hi to all,
I've a question about the broadcasting of a message when using LPL.
>From what I see from the oscilloscope is that the packet is continuously 
>repeated
for all the receiver's LPL interval (plus some time). That's fine.
However, I do not understand why after a transmission there's always a 
listening phase.
How can I modify the duration of this listening period after a transmission and 
why 
this behaviour? Is it because the cc2420 goes automatically in RX mode after a 
TX (as
it seems from the CC2420 Finite state machine on datasheet..)?

Best regards,
FP

__
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] LPL broadcasting

2008-08-19 Thread Flavio Pompermaier
Hi to all,
I've a question about the broadcasting of a message when using LPL.
>From what I see from the oscilloscope is that the packet is continuously 
>repeated
for all the receiver's LPL interval (plus some time). That's fine.
However, I do not understand why after a transmission there's always a 
listening phase.
How can I modify the duration of this listening period after a transmission and 
why 
this behaviour? Is it because the cc2420 goes automatically in RX mode after a 
TX (as
it seems from the CC2420 Finite state machine on datasheet..)?

Best regards,
FP


__
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] cc2420 timing and TOSSIM (little) bugs?

2008-08-19 Thread Flavio Pompermaier
I apologize myself for errors I wrote in the previous email..I've used wrong 
jiffy duration in my
calculations...
Here it is the previous question but with correct values:

When I have to send a packet of length X, this is how the cc2420 should behave 
(in the current svn version of TinyOS 2.x):
1) Turn on the Voltage regulator and oscillator (0.61 + 0.86 (=1.47)ms 
repectively 
> 20 jiffies of CC2420_TIME_VREN + 0.86 of oscillator (from cc2420 
datasheet)
> 20* 0.0305 + 0.86 ms. 
Here the average current drain is quite low..it is about 0.020 mA, right?

2) Go into backoff (Collision Avoidance) (from 0.1525 to 0.61 ms 
> random number between 10 and 4*10 symbols 
> 5*(0.0305ms) and 20*(0.0305ms) respectively. 
Remark that in 1 jiffy I can transmit 2 symbols). 
What is the energy consumption of the backoff period? 
I think that in this phase the radio is listening to the channel..isn't it? 
In this case the (average) current drain would be about 20-21 mA (listen).

3) If Channel is free (CCA) then start transmit immediately.
What is the power consumption of CCA establishment? 
Is it really a passive measure??

4) At this point the radio start transmitting. 
If the payload has X bytes then, since from TinyOS 2.x CC2420 support variable 
payload lengths, we will have:
12 symbols (preamble, sfd, phy header i.e., 6bytes) +
 4 symbols (CRC i.e. 2 bytes)   +
   X*2 symbols (payload i.e., X bytes)  =
---> (12 + 4 + 2X)/2*0.0305ms = 1.098 ms for a payload of 28 bytes


5) Wait for an ACK reply:
> min: 12 symbols + 11bytes = 34 symbols
-> 34/2 * 0.0305 = 0.5185 ms
> max: 256 jiffies ->256 * 0.0305 ms = 7.808 ms
Also here, the radio is in listening state, right?

6) If no ack is received, repeat from point 3 but this time, 
if channel is free (CCA), wait CC2420_TIME_ACK_TURNAROUND jiffies 
just to be sure to not being waiting for an ACK. 
Thus wait others 7*0.0305ms--->0.2135 ms. 
Also here, what is the current drain of CCA measurement? Does it comes really
for free (as a register reading)??

7) Continue repeating steps from 3 to 6 (for all the duration of the receiver's 
sleep interval + 20 ms. Thus we will have an average periodic packetized wake-up
of period 1.69275 ms (for a data packet of 28 bytes)
{Calculated in this manner:
-> 0.2135(ack_turnaround_wait) + 
-> 1.098 (packet sending)+ 
-> ((0.61-0.1525)/2 + 0.1525) (Average backoff)
}. 
Voltage regulator and oscillator startup time are not taken into account because
they are present only at the first sending.
Althought the documentation says 
"The transmitters perform a message delivery by transmitting the full 
 packet over and over again for twice the duration of the receiver’s 
duty-cycle 
period", 

in the code (/opt/tinyos-2.x/tos/chips/cc2420/lpl/DefaultLplP.nc) what happens 
is:
 call SendDoneTimer.startOneShot(
 call LowPowerListening.getRxSleepInterval(currentSendMsg) + 20);
thus, this packetized wake-up has a maximum duration (if no ack is received or 
for broadcasted messages) of "receiver's sleep interval + 20 ms", as I said.
Right? Is documentation wrong..?

8) If during this process an ACK is received (only for unicast TX), 
then stop and go back to sleep only AFTER LISTENING to the channel f
or others DELAY_AFTER_RECEIVE/1024 seconds (in order to favour burst 
receptions/transmissions).

Is all this process right??
Bugs of Tossim are reported in the other mail
(http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-August/035658.html).
At least they are reported correctly...

Best regards,
FP



  Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] cc2420 timing and TOSSIM (little) bugs?

2008-08-18 Thread Flavio Pompermaier
Hi to all,
I would like to ask if anybody is able to confirm my understanding about the 
cc2420 steps on transmission and its power consumption. 
Moreover, after this first question I think to have found a bug in the TOSSIM 
simulator.




When I have to send a packet of length x, this is how the cc2420 should behave 
(in the current svn version of TinyOS 2.x):
1) Turn on the Voltage regulator (1.22 ms > 20 jiffies > 20* 0.305 ms). 
Here the average current drain is quite low..it average is 0.020 mA, right?

2) Go into backoff (Collision Avoidance) (from 0.1525 to 9.76 ms --> random 
number between 10 and 4*10 symbols ---> 5*(0.305ms) and 20*(0.305ms) 
respectively. Remark that in 1 jiffy I can transmit 2 symbols). What is the 
energy consumption of the backoff period? I think that in this phase the radio 
is listening to the channel..isn't it? In this case the (average) current drain 
would be about 20-21 mA (listen).

3) If Channel is free (CCA) then start transmit immediately.

4) At this point the radio start transmitting. If the payload has X bytes then, 
since from TinyOS 2.x CC2420 support variable payload lengths, we will have:
12 symbols (preamble, sfd, phy header i.e., 6bytes) +
 4 symbols (CRC i.e. 2 bytes)   +
   X*2 symbols (payload i.e., X bytes)  =
---> (12 + 4 + 2X)/2*0.305ms = 10.98 ms for a payload of 28 bytes


5) Wait for an ACK reply:
> min: 12 symbols + 11bytes -> 34symbols = 0.5185 ms
> max: 256 jiffies ->256 * 0.305 ms = 78.8 ms
Also here, the radio is in listening state, right?

6) If no ack is received, repeat from point 3 but this time, if channel is free 
(CCA), wait CC2420_TIME_ACK_TURNAROUND jiffies just to be sure to not being 
waiting for an ACK. Thus wait others 7*0.305ms--->0.2135 ms. The radio here is 
always listening..right?

7) Continue repeating steps from 3 to 6 for all the duration of the receiver's 
sleep interval + 20 ms. Althought the documentation says "The transmitters 
perform a message delivery by transmitting the full packet over and over again 
for twice the duration of the receiver’s duty cycle period", in the code 
(/opt/tinyos-2.x/tos/chips/cc2420/lpl/DefaultLplP.nc) what happens is

 call SendDoneTimer.startOneShot(
call LowPowerListening.getRxSleepInterval(currentSendMsg) + 20);

as I said.

8) If during this process an ACK is received (only for unicast TX), then stop 
and go back to sleep only AFTER LISTENING to the channel for others 
DELAY_AFTER_RECEIVE/1024 seconds (in favour of burst receptions/transmissions).

Is all this process right??




Regard the bugs I found in the TOSSIM simulator here they are:

1) in $(TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimPacketModelC.nc (line 248) we 
found that the bit lenght of the payload is calculated as:
 duration = 8 * (sendingLength + sim_packet_header_length());

However, the header length is already considered into sendingLength! Indeed,
the lenght of the payload gets modified in 
$(TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.n 
at line 75:
 err = call Model.send((int)addr, amsg, len + sizeof(tossim_header_t));

I don't know which of the two must be corrected, but as it is now the simulator 
performs uncorrectly.

2) This is a more simpler error..
At line 189 of (TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimPacketModelC.nc 
there's written:
   dbg("TossimPacketModelC", "Starting CMSA with %lli.\n", backoff);
I think it should be "CSMA" and not "CMSA"...

Best regards,
FP


  Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] cc2420 real speed

2008-08-11 Thread Flavio Pompermaier
Hi to all,
I have a doubt about transmission/reception speed of the cc2420 transceiver.
Theoretically, its data rate is 250 kbps, that corresponds to a bit-time of 
1/25=4us i.e., to transmit a byte, just 32 us (0.032 ms) are needed. Is 
this speed real? What should I consider as the real rate of the cc2420 
(obviously ignoring preambles, retransmissions and collisions)?

Best regards,
FP



  Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Converting temperature ADC readings to celsius degree

2008-07-24 Thread Flavio Pompermaier
Hi to all,
I'm trying to guess how to get temperature in Celsius degrees from Telosb Mote 
(using SensirionSht11C).
Looking around I found three different methods to calculate this value and I 
don't know which one is the best:

1) temp=  -40 + 0.01   * data;  // from TinyOS (said by 
http://www.eecs.iu-bremen.de/wiki/index.php/TinyOS)
2) temp=  -38.4 + 0.0098 * data; // from datasheets (said by 
http://www.eecs.iu-bremen.de/wiki/index.php/TinyOS)
3) temp = -39.4 + 0.01   * data;   // from TinyOS mailing list 
(http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-July/018154.html)

What should I consider? 

And another question: the ADC converter of the Telosb has a resolution of 12 
bits, but temperature readings can be taken at 8, 12 and 14 bits. Are they 
really made at 12 bits and then converted or are they made at 14 bits but 
considering only the first 12 bits?

Best regards,
Flavio



  Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Voltage measurament accuracy

2008-05-01 Thread Flavio Pompermaier
Since I'm working on Tmote Sky (12 bit sampling resolution) I had a look on the relative datasheet at page 23.It says that Vcc= (sampledData/4096)*Vref*(2R/R) and sampling is done in the middle of 2 equal resistors between the Vcc and ground.So, from what I could understand Vref (a stable voltage level taken from somewhere)  is equals to 1,5V in this case.So, the sampled value has an accuracy of 1,5/4096=366microvolts...However, when measuring the Vcc this error is doubled since the sampled voltage is relative to just an half of Vcc. Thus, the error rises to 732microvolts, right? This, if Vref ,Vcc are stable and there's no error with sampling.As the battery get consumed, the Vcc decreases, but Vref should stay  stable, isn'tit?Software components tries to keep Vref constant..Is that you were saying? Then there's some sampling instability 
 due to some strange effect such as recovery of charges or stuff like that I imagine..that should be the greater source of error I think, since for sampling resolution I would have an error of just 1mV..Have I misunderstood something...?--- Gio 1/5/08, Michael Schippling <[EMAIL PROTECTED]> ha scritto:Da: Michael Schippling <[EMAIL PROTECTED]>Oggetto: Re: [Tinyos-help] Voltage measurament accuracyA: "Flavio Pompermaier" <[EMAIL PROTECTED]>Cc: "tinyos-help@millennium.berkeley.edu" Data: Giovedì 1 maggio 2008, 01:06I think the user guides for the various Motes have some informationabout the battery voltage measurement. However the Battery componentsseem to vary across platforms and TOS versions. I haven't payed muchattention
 to them so I can't help with that more. Try searchingthis list for battery measurement info.One rather arcane thing you should know is that, on the mica'sat least, the "battery" measurement made by ADC7 is actually froma fixed voltage reference chip and the reference value (the maxvalue you can convert) is the actual battery voltage. So the valueyou get RISES as the battery ref drops. I believe the Battery softwarecomponents adjust for this, which makes them very hard to understand.If you're confused about the conversion resolution I gave belowlet me know where you got lost and I'll try to make it clearer.I just guessed at the accuracy based on the fact that the bottomcouple of bits from the onboard converters are usually not very stable.MSFlavio Pompermaier wrote:> thank for the reply. However is there any documentation about thiscalculation? I have not well understood the
 part regarding the noise and theconversion to millivolts..> > Michael Schippling ha scritto: >> The ADCs used are either 10 or 12 bits, depending on the controller.>> That's either 3/1024 volts for the micas or 3/4096 volts for thetmotes.>> I think some of the Battery components convert the value tomilli-volts,>> but there's some noise involved so the actual accuracy is likely~10 mV.>> MS>> Flavio Pompermaier wrote:>>> Hi to all,>>> is there anyone that knows the accuracy of batteries voltagemeasurement?>>> Is it in the order of millivolts or microvolts? Or what?>>>>>> Best regards,>>> Flavio>>>>>>>>>>>> Tante idee per la salvaguardia del pianeta
 su>>> Yahoo! for good >>>.>>>>>>>>>>>>>>>>>> ___>>> Tinyos-help mailing list>>> Tinyos-help@millennium.berkeley.edu>>>https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help>> -- >> Platform: WinXP/Cygwin>> TinyOS version: 1.x, Boomerang>> Programmer: MIB510>> Device(s): Mica2, MicaZ, Tmote>> Sensor board: homebrew> > > >   Tante idee per la salvaguardia del nostro Pianeta su Yahoo! For Good>
 http://it.promotions.yahoo.com/forgood/environment.html-- Platform: WinXP/CygwinTinyOS version: 1.x, BoomerangProgrammer: MIB510Device(s): Mica2, MicaZ, TmoteSensor board: homebrew



  
Inviato da Yahoo! Mail.

La casella di posta intelligente.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Voltage measurament accuracy

2008-04-30 Thread Flavio Pompermaier
thank for the reply. However is there any documentation about this calculation? 
I have not well understood the part regarding the noise and the conversion to 
millivolts..

Michael Schippling ha scritto: 
> The ADCs used are either 10 or 12 bits, depending on the controller.
> That's either 3/1024 volts for the micas or 3/4096 volts for the tmotes.
> I think some of the Battery components convert the value to milli-volts,
> but there's some noise involved so the actual accuracy is likely ~10 mV.
> MS
> Flavio Pompermaier wrote:
>> Hi to all,
>> is there anyone that knows the accuracy of batteries voltage measurement?
>> Is it in the order of millivolts or microvolts? Or what?
>> 
>> Best regards,
>> Flavio
>> 
>> 
>> 
>> Tante idee per la salvaguardia del pianeta su
>> Yahoo! for good 
>> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52436/*http://it.promotions.yahoo.com/forgood/environment.html>.
>>  
>> 
>> 
>> 
>> 
>> 
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> -- 
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew



  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Voltage measurament accuracy

2008-04-30 Thread Flavio Pompermaier
thank for the reply. However is there any documentation about this calculation? 
I have not well understood the part regarding the noise and the conversion to 
millivolts..

Michael Schippling ha scritto: 
> The ADCs used are either 10 or 12 bits, depending on the controller.
> That's either 3/1024 volts for the micas or 3/4096 volts for the tmotes.
> I think some of the Battery components convert the value to milli-volts,
> but there's some noise involved so the actual accuracy is likely ~10 mV.
> MS
> Flavio Pompermaier wrote:
>> Hi to all,
>> is there anyone that knows the accuracy of batteries voltage measurement?
>> Is it in the order of millivolts or microvolts? Or what?
>> 
>> Best regards,
>> Flavio
>> 
>> 
>> 
>> Tante idee per la salvaguardia del pianeta su
>> Yahoo! for good 
>> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52436/*http://it.promotions.yahoo.com/forgood/environment.html>.
>>  
>> 
>> 
>> 
>> 
>> 
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> -- 
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew



  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Voltage measurament accuracy

2008-04-30 Thread Flavio Pompermaier
thank for the reply. However is there any documentation about this calculation? 
I have not well understood the part regarding the noise and the conversion to 
millivolts..

Michael Schippling ha scritto: 
> The ADCs used are either 10 or 12 bits, depending on the controller.
> That's either 3/1024 volts for the micas or 3/4096 volts for the tmotes.
> I think some of the Battery components convert the value to milli-volts,
> but there's some noise involved so the actual accuracy is likely ~10 mV.
> MS
> Flavio Pompermaier wrote:
>> Hi to all,
>> is there anyone that knows the accuracy of batteries voltage measurement?
>> Is it in the order of millivolts or microvolts? Or what?
>> 
>> Best regards,
>> Flavio
>> 
>> 
>> 
>> Tante idee per la salvaguardia del pianeta su
>> Yahoo! for good 
>> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52436/*http://it.promotions.yahoo.com/forgood/environment.html>.
>>  
>> 
>> 
>> 
>> 
>> 
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> -- 
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew



  Tante idee per la salvaguardia del nostro Pianeta su Yahoo! For Good 
http://it.promotions.yahoo.com/forgood/environment.html

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Voltage measurament accuracy

2008-04-30 Thread Flavio Pompermaier
Hi to all,is there anyone that knows the accuracy of batteries voltage measurement?Is it in the order of millivolts or microvolts? Or what?Best regards, Flavio
  
Tante idee per la salvaguardia del pianeta su Yahoo! for good.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] CollectionDebugger: is anyone interested?

2008-04-16 Thread Flavio Pompermaier
Hi,
I'm working on Collection and I'm using heavily CollectionDebug 
interface...however,using MsgReader and the stdOut to read those messages is 
quite unpractical...
So I recently  developed a useful java GUI (starting from Oscilloscope code) 
that takes as input both CollectionMessages and data that a node receives ant 
print them in this way:
-  CollectionMsg are listed in a JTable into the J GUI (printing the String 
error code and not only its integer value..much more comprehensive..)
- Data received are printed to the stdOut as if MsgReader was running

The code is quite simple and related to my own application, but with a very 
limited effort of isolation of variables can be suitable for logEventType of 
CollectionDebug (for now I use only logEventDbg so I print out only data.a, 
data.b and data.c)

In the attachment I put an image of my work just to see an example.
If this work can be interesting for newer releases of TinyOS just ask me and I 
will send you the code (but also if someone is just interested in..).

Bye,
Flavio








  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html<>___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Broadcast ACKs

2008-04-12 Thread Flavio Pompermaier
Hi to all,
I don't understand clearly if using Packet Link layer I obtain broadcast 
messages acknowlegments! 
Looking at the mailing list I see different answers..some says that broacast 
messages can be acknowledged if the application does not use LPL interface 
(http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg14455.html),
 some says that broadcast are never acknowledged 
(http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg17910.html) 
and some that they are.
In my program (running on tmote sky) I see that using Packet Link Layer 
(without  LPL) broacast messages returns always fail if I require reliable 
delivery..so my experience says that broadcast acknowledgments doesn't 
work...am I right? I'm using tinyOs 2.0.1 that comes preinstalled on Xubuntos..

Thanks in advance,
Flavio




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Radio and Flash concurrency on SPI

2008-04-11 Thread Flavio Pompermaier
Hi to all,
I've a question about the shared SPI bus between Radio and Flash modules on 
Tmote Sky:
isthere any problem if a node is  writing to flash while another mote issending 
a packet to it?  Could the radio loss the packet if I do notuse the Packet Link 
layer of TinyOs and setting retries threshold longenough? Does the Low Power 
Listening influence  this concurrency?

Thanks in advance,
Flavio




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Basestation: why atomic sections

2008-04-11 Thread Flavio Pompermaier
Hi to all,
I've a question regards the Basestation code.
In BasestationP.nc componentvariables are modified only from tasks or from sync 
events, so why there's the need of atomic sections?? Atomic sections are needed 
only whene there's something async..or I'm wrong?

Best regards,
Flavio



  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] SPI: Flash and Radio concurrency on Tmote sky

2008-04-09 Thread Flavio Pompermaier
Hi to all,I've a question about the shared SPI bus between Radio and Flash modules on Tmote Sky:is there any problem if a node is  writing to flash while another mote is sending a packet to it?  Could the radio loss the packet if I do not use the Packet Link layer of TinyOs and setting retries threshold long enough? Does Low Power Listening Interface influence  this concurrency? Thanks in advance,Flavio



  
Inviato da Yahoo! Mail.

La casella di posta intelligente.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Minimizing RAM consmption

2008-04-09 Thread Flavio Pompermaier
Title: RE: [Tinyos-help] Minimizing RAM consmption
Ok..thanks for the replies however..--- Mer 9/4/08, Michiel Konstapel <[EMAIL PROTECTED]> ha scritto:Da: Michiel Konstapel <[EMAIL PROTECTED]>Oggetto: RE: [Tinyos-help] Minimizing RAM  consmptionA: [EMAIL PROTECTED]Cc: tinyos-help@millennium.berkeley.eduData: Mercoledì 9 Aprile 2008, 09:17


 
 





The maximum is 256 bytes of payload because the TinyOS radio code
uses uint8_t length values; your radio may have a smaller maximum. Given a
certain bit error rate, I suppose a packet twice as long is twice as likely to
be corrupted. I’m sure there’s publications on this topic, but I
don’t know of any I’m afraid. Google is your friend :) 

Michiel 

   







From: Flavio Pompermaier
[mailto:[EMAIL PROTECTED] 
Sent: woensdag 9 april 2008 0:02
To: Michiel Konstapel
Subject: RE: [Tinyos-help] Minimizing RAM consmption 





   




 
  
  I've already noticed this..In my code I was using some
  Pool (with respective Queues) for manage receiving and sending (from/to
  radio, from/to flash and sending to serial), but as I increment MSG_SIZE the
  RAM consumption "explodes"...For a MSG_SIZE=40 the RAM consuption
  was about 5K, with MSG_SIZE=100 (if it makes sense..) typing "make
  telosb" the compiler tell me that bss section overflows..(more than
  10K)! So I understood that MSG_SIZE is a very important parameter..
  Since we touched the MSG_SIZE argument, is there an "adviced"
  maximum value for it in Telosb? I know that there's a maximum size (I don't
  remember precisely now), but as the number of neighbor nodes increases, it's
  a good idea to send BIG packets as FEW TIMES as possible (to avoid collision).
  But how much does increases the integrity of received packet as MSG_SIZE
  increases..? Is there any reference about it?
  
  --- Mar 8/4/08, Michiel Konstapel <[EMAIL PROTECTED]>
  ha scritto: 
  Da: Michiel Konstapel
  <[EMAIL PROTECTED]>
  Oggetto: RE: [Tinyos-help] Minimizing RAM consmption
  A: "Flavio Pompermaier" <[EMAIL PROTECTED]>,
  "Tinyos" 
  Data: Martedì 8 Aprile 2008, 11:56 
  
  Tweak your
  TOSH_DATA_LENGTH to be just big enough for your payloads so you don't waste
  memory on packet buffers.
  Michiel 
  
  
 


   



 





  
Inviato da Yahoo! Mail.

La casella di posta intelligente.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Minimizing RAM consmption

2008-04-08 Thread Flavio Pompermaier
Hi,
I would like to know if there's any document reporting all possible 
enhancements focused in minimizing RAM consumption on Tmotes.
And why components variables are stored in RAM whereas function local variable 
are stored in ROM?? Shouldn't be the viceversa?

Some suggestions I found for RAM consumption minimizing are:
- use enum for constants instead of variables
- avoiding signalling from command/events
   -  do not use enum variables
others?

Thanks,
Flavio




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problems with ACKs in TinyOS 2.0.2

2008-04-08 Thread Flavio Pompermaier
I was also thinking that the CC2420_NO_ACKNOWLEDGMENTS flags was wrong, but I 
have another question about another flag:
CC2420_HW_ACKNOWLEDGEMENTS

What happens in this case? What is the difference with software acks?




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] How to enable core dumps

2008-04-04 Thread Flavio Pompermaier
Hi,
my application generates a segmentation fault but no core dump is generated. 
How can I enable them?
I've specified -g as CFLAGS and I've also specified the command "ulimit -c 
unlimited" but it wasn't enough.

Thanks




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] MsgReader doesn't work correctly

2008-04-03 Thread Flavio Pompermaier
I forgot to post the solution to my own question. 
The problem was that the AM type was different from the Serial one. This last 
in fact was a pure number chosen at random (22).
The solution has been to istantiate the two as the following:

//before was new SerialAMSenderC(22), whereas AM_DATA was 28 in the header 
file..
components new SerialAMSenderC(AM_DATA); 
components new AMSender(AM_DATA);

The two type must be the same of the one declared in the header file...:D
In this way everything goes fine!!
I hope this will help someone else.
Flavio




  Inviato da Yahoo! Mail. 
La casella di posta intelligente.
http://it.docs.yahoo.com/mail/overview/index.html___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: Re: [Tinyos-help] Low power listening

2008-03-26 Thread Flavio Pompermaier
I'm using tinyos 2.0.1, but the problem is to know why should I listen for 
100msecs every 2 seconds or stuff like that. How can I be sure that if a node 
send a message the other one is listening and will receive the message..? Is 
there any reference to that?

>Which sources are you using?
>Boomerang allows you to change the duty cycle via the lowpower >parameter of 
>make.
>The NETSYNC_PERIOD_LOG2 macro allows you to change the time between >listening 
>periods

>by default NETSYNC_PERIOD_LOG2 is 16 i.e. 2**16 ticks of the 32khz >clock is 2 
>seconds. Default lowpower is 5% .
>5% of 2 seconds is 100msecs. So by default you listen for 100msecs >every 2 
>seconds.
>Suppose I want 100sec every 4 seconds, set NETSYNC_PERIOD_LOG2 to 17 ( >4 
>seconds) and lowpower to 3 (3% of 4 seconds = 120msec)

>Add the following line to your makefile

>ifeq ($(filter >netsync_period_log2,$(MAKECMDGOALS)),netsync_period_log2)

>then do

>make  lowpower,3 netsync_period_log2,17


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Low power listening

2008-03-25 Thread Flavio Pompermaier
Hi,
I'm working on LowPowerListening interface to manage Radio Power. I've read the 
tutorial about it but it does not explain how to tune that interface. I would 
like to ask if someone could advice me a link to get more detailed information 
about that interface and, in particular, how to define the duty cycle and 
realted trade-offs. 

Best regards,
Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Component variable va lue corrupted without inlining a local function

2008-03-24 Thread Flavio Pompermaier
I must excuse for this post! I spent about half of the day figuring out this 
absurd behaviour and indeed it was my fault..
In the initialization phase I was assigning to "epochs" the value 0 and the 
problem was that in one of the local functions   there was an assignment of 
another variable to the value of "epochs". The problem was that in the start 
phase if the application was trying to send a message when epochs was 0, in 
another check the value 0 of the other variable was meaning "uninitialized", so 
the solution has just been to make epochs start from 1...
Sorry for the confusion, next time I will try to spend more time debugging my 
application!
However, I'm very thankful for your interest.
Flavio

> Take a look at the generated app.c file to see if it's maybe being
> optimized out for you. You could try tagging the variable as
> "volatile" as well.
> 
> MS
> 
> Flavio Pompermaier wrote:
> > Hi to all,
> > I have a VERY strange problem with a component variable. 
> > In a component scope of my application (immediately under the 
> > implementation keyword) I have defined a uint16_t variable "epochs" that is 
> > increased ad each firing of a periodic timer.
> > It is used by the component to clean things up when timeouts expire.
> > After some strange behavior on testing the code on tmote sky (simulation 
> > with TOSSIM have always run correctly) I discovered (sending data over the 
> > serial) that the value of such variable is corrected almost everywhere in 
> > the code, apart in a LOCAL function (called by another LOCAL function) - 
> > used to make code simpler to read - where its value is always 0 unless I 
> > put the inline keyword before the function. How is it possible and why?? Is 
> > it because It is bad to use local functions?? Should all local functions  
> > be declared inline??
> > 
> > For the sake of clarity, 
> > here it is an equivalent (pseudo-code) component describing my problem:
> > 
> > module TestModule{
> >   uses{
> > interface Timer as EpochTimeout;
> >   }
> > }implementation{
> >uint16_t epochs;
> > 
> >   event void EpochTimeout.fired(){
> > epochs++; //here the value is correct
> >   }
> >   
> >   command error_t Send.send(message_t* msg){
> > processMsg(msg);
> >   }
> >   void processMsg(message_t* msg){
> >  updateTimeouts(msg);
> >   }
> >   void updateTimeouts (message_t* msg){
> >  print(epochs);//here the value of epochs is always 0;
> >//However, it is correct if I declare function as inline!!
> >}
> > }
> > 
> > Best regards,
> > Flavio
> > 
> > 
> > 
> > 
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> -- 
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
> 
> 


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Component variable value corrupted without inlining a local function

2008-03-24 Thread Flavio Pompermaier
Hi to all,
I have a VERY strange problem with a component variable. 
In a component scope of my application (immediately under the implementation 
keyword) I have defined a uint16_t variable "epochs" that is increased ad each 
firing of a periodic timer.
It is used by the component to clean things up when timeouts expire.
After some strange behavior on testing the code on tmote sky (simulation with 
TOSSIM have always run correctly) I discovered (sending data over the serial) 
that the value of such variable is corrected almost everywhere in the code, 
apart in a LOCAL function (called by another LOCAL function) - used to make 
code simpler to read - where its value is always 0 unless I put the inline 
keyword before the function. How is it possible and why?? Is it because It is 
bad to use local functions?? Should all local functions  be declared inline??

For the sake of clarity, 
here it is an equivalent (pseudo-code) component describing my problem:

module TestModule{
  uses{
interface Timer as EpochTimeout;
  }
}implementation{
   uint16_t epochs;

  event void EpochTimeout.fired(){
epochs++; //here the value is correct
  }
  
  command error_t Send.send(message_t* msg){
processMsg(msg);
  }
  void processMsg(message_t* msg){
 updateTimeouts(msg);
  }
  void updateTimeouts (message_t* msg){
 print(epochs);//here the value of epochs is always 0;
   //However, it is correct if I declare function as inline!!
   }
}

Best regards,
Flavio




___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] MsgReader doesn't work correctly

2008-03-21 Thread Flavio Pompermaier
Hy to all,
I'm working with tinyos 2.0.1 and telosb (Tmote sky) motes.
Till now, applications where MsgReader has been used have always worked fine. 
However, now I'm working on an application that before starting sends data 
stored into flash to the serial port, and if the node is a basestation (after 
the completion of this first phase) sends out also other kind of messages.
The problem is that messages coming from the first phase are correctly parsed 
with message reader (and displayed), but once the application change the kind 
of messages sent to the serial (obviously I also have 8 seconds to change the 
type of message at which the MsgReader is listening) nothing is displayed 
(except the resynchronizing message...), The problem is net.tinyod.tools.Listen 
display row data correctly, so the bytes are received correctly at the serial 
port!

I've read similar problems in previously posts on this mailing list but no one 
has received answer:

http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-November/020992.html
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-September/019821.html

Please help!
Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Relationship between AMSend.sendDone and PacketLink.wasDelivered

2008-03-20 Thread Flavio Pompermaier
Hi to all,
I would like to ask if somebody could tell me the relationship between the 
error_t result of the AMSend.sendDone and the PacketLink.wasDelivered 
methods..There could be a situation where AMSend.sendDone has SUCCESS but 
PacketLink.wasDelivered is not? Is it when the message has been correctly sent 
PacketLink.getMaxRetries() times but there was no acknowledgments?

Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] task vs commands/events

2008-03-14 Thread Flavio Pompermaier
Hi to all,
I would like to know why in tinyos we should always be very careful in 
maintaining tasks short,while nothing is said about commands/event lenght! From 
what I know they cannot be interrupted so,why could I forget about their 
lenght? Isn't it dangerous??  


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Collection: multiple Receive

2008-02-18 Thread Flavio Pompermaier
Hi to all,
I have a question about the collection interface. 
Collection assumes that only sources are interested in sending data, whereas 
root are interested in receiving data. However, it could be that in direct 
diffusion I would like to inform also application when messages for tree 
construction (send by the roots) are received. How can I get around this in 
EasyCollection for example?
Should I do something like

   new CollectionSenderC(BUILD) as BuildSender;
   new CollectionSenderC(DATA) as DataSender;
   EasyCollectionC.SendData->DataSender;
   EasyCollectionC.SendBuild->BuildSender;
   EasyCollection.ReceiveData->Collector.Receive[BUILD];
   EasyCollection.ReceiveBuild->Collector.Receive[DATA];
or just 
   new CollectionSenderC(DATA);
   EasyCollectionC.Send->CollectionSenderC;
   EasyCollection.Receive->Collector.Receive[DATA];
but how can EasyCollection.ReceiveBuild be advertised??
In the firts solution it looks bad because sender is the routing layer, 
and moreover collection_id it is used to distinguish between application 
data...do I have to intend sink messages as a different collection_id??

Please help!
Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Collection questions

2008-02-16 Thread Flavio Pompermaier
Hi to all, 
I-ve some question about Collection in tinyOs, I hope someone can help me.

1) The StdControl interface should "generate the collection tree" (from what 
specified from the EasyCollection example). However, looking at the code of 
CollectionC I see that the StdControl interface only sets some variables 
(start=TRUE), and does not build any tree. 
If I have to implement direct diffusion I expect something like flooding of 
interests from the sink once StdControl.start() is being called, in order to 
build the tree. Where should the flooding be placed? In which function? And 
also in Ctp, where is the tree contructed?

2) If I want to implement direct diffusion, my sinks have to diffuse their 
interests, and usually, this is done from a setRoot-like function. The problem 
is that I have to pass also their interests in the  (setRoot(SinkMsg msg)). How 
I get around this? 

Thanks,
Flavio



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Strange error about type definition

2008-02-14 Thread Flavio Pompermaier
I fixed the problem changing struct to nx_struct in the declarations as you 
told me..Initially I didn't understand what you adviced me!
Thanks..

-- Initial Header ---

>From  : "David Gay" [EMAIL PROTECTED]
To  : "Flavio Pompermaier" [EMAIL PROTECTED]
Cc  : "Help TinyOS" tinyos-help@millennium.berkeley.edu
Date  : Wed, 13 Feb 2008 18:36:40 -0800
Subject : Re: [Tinyos-help] Strange error about type definition







> On Feb 13, 2008 3:23 PM, Flavio Pompermaier <[EMAIL PROTECTED]> wrote:
> > Hi to all,
> > I have a very problem in defining a message types to send over the radio!
> > I want to make they endianess-indipendent so I use the nx_ suffix with 
> > structures and basic types.
> > However, when I compile my application I get errors like the following:
> >
> > 'DataMsg' defined as wrong kind of tag.
> 
> Did you bychance previously declare (not define) "struct DataMsg"
> somewhere (e.g. used 'struct DataMsg *p' somewhere)? If so, you've
> told the compiler that DataMsg is a regular struct, so it complains
> when you later tell it that it's a nx_struct...
> 
> David Gay
> 
> > and this is the type definition:
> >
> > typedef nx_struct DataMsg{
> >nx_uint16_t dato;
> >ControlInfo control;
> > } DataMsg;
> >
> > typeDef nx_struct ControlInfo{
> >   nx_uint16_t some_info;
> > } ControlInfo
> >
> > Is it because I use a type inside another one??
> > Could anyone help me??
> >
> > Thanks in advance,
> > Flavio
> >
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> 


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Strange error about type definition

2008-02-14 Thread Flavio Pompermaier
So how could I store in my code a radio struct? Should I construct another one 
regular struct and retrieve data from the payload?
Why it is so?

> On Feb 13, 2008 3:23 PM, Flavio Pompermaier <[EMAIL PROTECTED]> wrote:
> > Hi to all,
> > I have a very problem in defining a message types to send over the radio!
> > I want to make they endianess-indipendent so I use the nx_ suffix with 
> > structures and basic types.
> > However, when I compile my application I get errors like the following:
> >
> > 'DataMsg' defined as wrong kind of tag.
> 
> Did you bychance previously declare (not define) "struct DataMsg"
> somewhere (e.g. used 'struct DataMsg *p' somewhere)? If so, you've
> told the compiler that DataMsg is a regular struct, so it complains
> when you later tell it that it's a nx_struct...
> 
> David Gay
> 
> > and this is the type definition:
> >
> > typedef nx_struct DataMsg{
> >nx_uint16_t dato;
> >ControlInfo control;
> > } DataMsg;
> >
> > typeDef nx_struct ControlInfo{
> >   nx_uint16_t some_info;
> > } ControlInfo
> >
> > Is it because I use a type inside another one??
> > Could anyone help me??
> >
> > Thanks in advance,
> > Flavio
> >
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> 


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Strange error about type definition

2008-02-13 Thread Flavio Pompermaier
Hi to all, 
I have a very problem in defining a message types to send over the radio!
I want to make they endianess-indipendent so I use the nx_ suffix with 
structures and basic types. 
However, when I compile my application I get errors like the following:

'DataMsg' defined as wrong kind of tag.

and this is the type definition:

typedef nx_struc DataMsg{
   nx_uint16_t dato;
   ControlInfo control;
} DataMsg;

typeDef nx_struct ControlInfo{
  nx_uint16_t some_info;
} ControlInfo

Is it because I use a type inside another one??
Could anyone help me??

Thanks in advance,
Flavio



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Component initialization

2008-02-13 Thread Flavio Pompermaier
Hi to all,I have a quick question:
suppose I have a component that when initialized starts a timer.
The main program is however another one, which needs that component
in order to work. How do I need to initialize the first component?
Should I need to declare it as implementing Init, StdControl,
SplitControl or something else? It is not a two-phase component, so
using StdControl or SplitControl sounds to me like a waste, whereas
using Init could be more reasonable..however do I need to call Init.init
from Boot.booted of the second component or from
MainC.softwareInit?? Do you have some example about it to suggest me?

Thanks,
Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] AMPacket interface

2008-02-13 Thread Flavio Pompermaier
Hi to all, I've a doubt regard the AMPacket interface: it is useful in order to 
set AM fields of the Packet, right? However there are 3 components that provide 
this interface: ActiveMessageC, AMSenderC e AMReceiverC. Which should I use? 
Are they equivalent? Or should I choose one or the other respect to what I'm 
doing (sending/receiving)?

Thanks in advance,
Flavio


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] LedsP.nc implementation doubts..

2007-12-05 Thread Flavio Pompermaier
Ok, thanks for the quick answer! Now I realized how it works!

Bye!

> 
> On Dec 5, 2007, at 7:49 AM, Flavio Pompermaier wrote:
> 
> > Hi to all, am I wrong or LedsP.nc implementation inverted the set  
> > and clr method?? For exmple, when I want to light up led x with the  
> > function  Leds.ledxOn the LedsP call the Ledx.clr() function  
> > (instead of what I expected to be: Ledx.set()...)it seems to be  
> > quite strange, at least from the intuitive point of view!!
> >
> 
> Take a look at the schematics. LEDs are not powered by I/O pins. The  
> I/O pins control a transistor.
> 
> Phil
> 


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] LedsP.nc implementation doubts..

2007-12-05 Thread Flavio Pompermaier
Hi to all, am I wrong or LedsP.nc implementation inverted the set and clr 
method?? For exmple, when I want to light up led x with the function  
Leds.ledxOn the LedsP call the Ledx.clr() function (instead of what I expected 
to be: Ledx.set()...)it seems to be quite strange, at least from the intuitive 
point of view!!

Best regards,
Flavio Pompermaier


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] tiny-os2 tutorial - lesson 2 errors

2007-11-28 Thread Flavio Pompermaier
Hi to all,
I'm new to TinyOS and I was reading the lesson 2 of the tutorial 

http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson2.html

when I found 2 errors:

1) with tiny-OS-v2 the Timer.nc is not in tos/interfaces anymore but is in the 
lib/timer directory!
2) The function 

event void Timer0.fired()
  {
counter++;
if (counter & 0x1) {
  call Leds.led0On();
}
else {
  call Leds.led0Off();
}
if (counter & 0x2) {
  call Leds.led2On();
}
else {
  call Leds.led2Off();
}
if (counter & 0x4) {
  call Leds.led2On();
}
else {
  call Leds.led2Off();
}
  }

should call led1xx functions!:

if (counter & 0x2) {
  call Leds.led1On();
}
else {
  call Leds.led1Off();
}

Since I'm here, I'd like also to ask to someone using Cadena plugin of Eclipse 
to develop Tinyos components if it works also for tinyos-v2..all tutorials I 
found around seems to contemplate only version 1..am I wrong??

Thanks in advance,
Flavio Pompermaier


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help