Hi Stefano,

> I'm using the CVS version of tinyos-2.x, and I'm trying to read the ED
> value instead RSSI. I used the RssiDemo tutorial as code base and I
> slightly modified it to make it work with the Iris platform. The
> RssiDemo perfectly works if I read the RSSI value from the RF230, but
> as soon as I recompile it to read the ED value from the RF230 I always
> get 0 (zero) as ED value. Do you have any tips? Have anyone used the
> ED reading with Iris successfully?

I have not played with it. One problem could be that the ED is not yet
ready when we read it. There are two reasons why:

1) The required 140 microsec did not pass, but I think this is not the case

2) The ED is an averaged RSSI value calculated from 8 symbols. Maybe
we read this value too close to the beginning of the start message and
we measure mostly the "silence" before the transmission. I will looki
at the code.

> Also have looked at the /opt/tinyos-2.x/tos/chips/rf230/RF230LayerP.nc
> file and I have simple question, the code:
>
>                                        if( irq == RF230_IRQ_RX_START )
>                                        {
>                                                temp = 
> readRegister(RF230_PHY_RSSI) & RF230_RSSI_MASK;
>
>                                                rssiBusy += temp - (rssiBusy 
> >> 2);
>
> #ifdef RF230_RSSI_ENERGY
>                                                temp = 
> readRegister(RF230_PHY_ED_LEVEL);
> #endif
>
>                                                call PacketRSSI.set(rxMsg, 
> temp);
>                                        }
>
> should not be rewritten in the following way?
>
>                                        if( irq == RF230_IRQ_RX_START )
>                                        {
> #ifdef RF230_RSSI_ENERGY
>                                                temp = 
> readRegister(RF230_PHY_ED_LEVEL);
> #else
>                                                temp = 
> readRegister(RF230_PHY_RSSI) & RF230_RSSI_MASK;
>
>                                                rssiBusy += temp - (rssiBusy 
> >> 2);
> #endif
>
>                                                call PacketRSSI.set(rxMsg, 
> temp);
>                                        }
>

Absolutely not. You WANT to update the rssiBusy values (which ALWAYS
use the RSSI and not the ED for checking the busy channel. So that
part of the code is OK.

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

Reply via email to