Part Number: CC2564C
Other Parts Discussed in Thread: CC2564
I have the following code that returns a number which is above or below the Golden Receive Power Range.
int8_t BT_GetRSSI(void)
{
SByte_t rssi;
Byte_t Status;
Word_t Connection_Handle, Connection_HandleStatus;
if(GAP_Query_Connection_Handle(BluetoothStackID, dongle_bdaddr, &Connection_Handle) == 0)
{
if(HCI_Read_RSSI (BluetoothStackID, Connection_Handle, &Status, &Connection_HandleStatus, &rssi) == 0)
{
if(Status != 0 && Connection_HandleStatus != 0)
{
BT_Display(("Status: %d\r\n", Status));
BT_Display(("Connection Handle: %d\r\n", Connection_HandleStatus));
return 0x7F;
}
else
{
return rssi;
}
}
else
{
BT_Display(("RSSI fail\r\n"));
return 0x7F;
}
}
return 0x7F;
}
This code works fine, but I need the raw value of the RSSI. According to Gigi Joseph the code above should give me the raw RSSI, but it doesn't. So, how do I get the raw RSSI values?
There is absolutely no sample code anywhere for this. Can you please give me some sample code that is working and complete?