Hi there,
I am using the CC2541 keyfob module for detecting the signal strength, the main problem is I can't read the rssi value. I am posting part of the where I defined the RSSI parameters. newRSSI register is showing null all the time.
Is there a better way to read the RSSI value?
****************
static void peripheralStateNotificationCB( gaprole_States_t newState );
static void keyfobapp_RSSI( int8 newRSSI );
/*********************************************************************
* PROFILE CALLBACKS
*/
// GAP Role Callbacks
static gapRolesCBs_t keyFob_PeripheralCBs =
{
peripheralStateNotificationCB, // Profile State Change Callbacks
keyfobapp_RSSI // When a valid RSSI is read from controller
};
int8 rssi_value = 0;
static void keyfobapp_RSSI( int8 newRSSI )
{
rssi_value = newRSSI;
if(rssi_value <= 10){
//buzzerStart( BUZZER_ALERT_LOW_FREQ );
HalLedSet( HAL_LED_1, HAL_LED_MODE_ON);
HalLedSet( HAL_LED_2, HAL_LED_MODE_OFF);
}
else
{
//buzzerStart( BUZZER_ALERT_HIGH_FREQ );
HalLedSet( HAL_LED_1, HAL_LED_MODE_OFF);
HalLedSet( HAL_LED_2, HAL_LED_MODE_ON);
}
}
Regards
Siva