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 in cc2530

Other Parts Discussed in Thread: CC2530

Hello,

I am working on cc2530zdk and using zstack 2.5.1

I made following changes to files extracted from swrc147c to get RSSI value.

  • changes to the DemoSensor 

void zb_ReceiveDataIndication( uint16 source, uint16 command, uint16 len, uint8 *pData )
{
afIncomingMSGPacket_t *MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive(RSSI_ID);

abc=MSGpkt->rssi;

}

  • and following changes to DemoCollector file.

#define RSSI_ID    4

#define NUM_OUT_CMD_COLLECTOR 3

const cId_t zb_OutCmdList[NUM_OUT_CMD_COLLECTOR] =

{
SENSOR_REPORT_CMD_ID,
DUMMY_REPORT_CMD_ID,
RSSI_ID
};

But, when i burn the programs in cc2530 and see the result using zigbee sensor monitor, its showing only "00" value.

I also checked packets using packet sniffer and its also showing "00" only.

It means RSSI values are not sent over packets.

How do i achieve it then? What further changes should me made?

Thank You

  • Hi,

    It seems that RSSI in MSGpkt always shows zero. I will suggest you to grab the LQI in MSGpkt and convert it to RSSI with the following equation.

    RSSI in dbm =  -(81-(LQI*91)/255)

  • Hello,

    I have tried using LQI values using following function

    • in DemoSensor

    static uint8 readlqi(void)
    { uint8 LQI;

    afIncomingMSGPacket_t *MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive(RSSI_ID);
    LQI=MSGpkt->LinkQuality;

    return LQI;
    }

    • in DemoCollector

    zb_SendDataRequest( addrr, RSSI_ID, SENSOR_REPORT_LENGTH, pData, 1, txOptions, 1 );

    addrr=source; (sensor or end device)

    I checked the LQI value using packet sniffer. LQI values are changing but these values are not sent in packets. Only one constant value is sent.

    How do i correct this problem?

    Thank You.