This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RSSI znpBuf CC2530 Simple Application

Other Parts Discussed in Thread: CC2530

Hi,

I have the same question, somebody could you help us?

goal: get rssi value of sensor (router send it to coordinator).

important data:

CC2530.

IAR

source path: Simple Application from CC2530 Mini Kit / ZNP Examples/ IAR/ Simple Application.eww

without more, regards

  • When there is an AF_INCOMING_MSG from sensor, there should be LQI included in it. You can use it to calculate RSSI.

  • Hi,
    AF_INCOMING_MSG has a field called LinkQuality which holds the information about the quality of the single hop radio link in a range from 0-255.
    The number comes from a simple clip and linearization formula which takes into account both correlation and RSSI. We give customers the option to whether use RSSI only mode, or RSSI and correlation.
    In the pre-compiled ZNP firmware, the LinkQuality value is simply a clip-linearized version of the RSSI only and what needs to be reversed.

    LinkQuality = [255* (RSSI-MIN_ED)]/[MAX_ED-MIN_ED]

    Therefore with simple algebra
    RSSI = MIN_ED+LinkQuality*( MAX_ED-MIN_ED)/255

    Default values for MIN_ED and MAX_ED are -87 and 10 respectively.

    The code I am referring to above is implemented as a reference in radioComputeED() function in mac_radio.c module that I suggest to look at for your reference.

    Thanks,
    TheDarkSide