Hi Matteo Dany,

You only need to make this. For CC2420 and RF230.

#if defined(PLATFORM_TELOSB) || defined(PLATFORM_TMOTE)
  int16_t getRssi(message_t *msg){
    int16_t rssi_raw = (int16_t) call CC2420Packet.getRssi(msg);
    if (rssi_raw > 0x80)
      rssi_raw = rssi_raw - 256 - 45;
    else
      rssi_raw = rssi_raw - 45;
    return (int16_t) rssi_raw;
  }
#elif defined(PLATFORM_IRIS)
  int16_t getRssi(message_t *msg){
    if(call PacketField.isSet(msg))
      return (int16_t) call PacketField.get(msg);
    else
      return 0xFFFF;
  }
#else
  #error Radio chip not supported! Currently only works for motes with
CC2420 or RF230 radios.
#endif

Best regards,
Miguel Silva

---------- Mensagem reencaminhada ----------
From: Mehmet Akif Antepli <[email protected]>
To: Matteo Dany <[email protected]>
Date: Sun, 16 Aug 2009 02:50:11 -0700
Subject: Re: [Tinyos-help] Help- Rssi and field group id
Yes, that's correct.

On Sun, Aug 16, 2009 at 2:43 AM, Matteo Dany <[email protected]> wrote:

    Thanks,

    I should understand, I read the rssi from a serial packet  with an
    program write in C.
    I put the rssi in a char and subtract -45.
    It's right?

    Thanks

    2009/8/16 Mehmet Akif Antepli <[email protected]>:
    > Hi Matteo,
    > You should interpret rssi reading as signed 8 bit value in 2's complement
    > form.
    > (From Page 64 of 87: CC2420 datasheet)
    > "RSSI (0x13) - RSSI and CCA Status and Control Register" part
    > On Sun, Aug 16, 2009 at 1:09 AM, Matteo Dany
<[email protected]> wrote:
    >>
    >> Hi guys,
    >>
    >> I have a tmote sky and I search to read a Rssi, but I have little
    >> problem with convert Rssi .
    >> I read correctly the Rssi from radio message and the value appears in
    >> a range  0, 255. But how convert the value in dbm?
    >> I search in google and I read the CC2420 datasheet, they suggest to
    >> subtract -45 to the value found.
    >> When I found 255 - 45 = 210 dbm? I read in the datasheet that the
    >> range is from 0 to -100 dbm.
    >> Where I wrong?
    >>
    >>
    >> Thank you very much
    >>
    >> Matt
    >> _______________________________________________
    >> Tinyos-help mailing list
    >> [email protected]
    >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
    >
    >
    >
    > --
    > Mehmet Akif Antepli
    > Grad. Student
    > Dept. of EEE
    > Middle East Technical University
    >

-- 
Miguel Torres Silva
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to