index 8f7ca82..ae30195 100644 @@ -117,9 +117,6 @@ // How often to perform periodic event (in ms) #define SP_PERIODIC_EVT_PERIOD 5000 -// How often to read current current RPA (in ms) -#define SP_READ_RPA_EVT_PERIOD 3000 - // Delay (in ms) after connection establishment before sending a parameter update requst #define SP_SEND_PARAM_UPDATE_DELAY 6000 @@ -137,7 +134,6 @@ #define SP_PAIR_STATE_EVT 4 #define SP_PASSCODE_EVT 5 #define SP_PERIODIC_EVT 6 -#define SP_READ_RPA_EVT 7 #define SP_SEND_PARAM_UPDATE_EVT 8 #define SP_CONN_EVT 9 @@ -243,17 +239,11 @@ static Queue_Handle appMsgQueueHandle; // Clock instance for internal periodic events. Only one is needed since // GattServApp will handle notifying all connected GATT clients static Clock_Struct clkPeriodic; -// Clock instance for RPA read events. -static Clock_Struct clkRpaRead; // Memory to pass periodic event ID to clock handler spClockEventData_t argPeriodic = { .event = SP_PERIODIC_EVT }; -// Memory to pass RPA read event ID to clock handler -spClockEventData_t argRpaRead = -{ .event = SP_READ_RPA_EVT }; - // Per-handle connection info static spConnRec_t connList[MAX_NUM_BLE_CONNS]; @@ -318,11 +308,6 @@ static uint8 advHandleLegacy; // Address mode static GAP_Addr_Modes_t addrMode = DEFAULT_ADDRESS_MODE; -#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG) -// Current Random Private Address -static uint8 rpa[B_ADDR_LEN] = {0}; -#endif // PRIVACY_1_2_CFG - /********************************************************************* * LOCAL FUNCTIONS */ @@ -338,9 +323,6 @@ static void SimplePeripheral_processAdvEvent(spGapAdvEventData_t *pEventData); static void SimplePeripheral_processAppMsg(spEvt_t *pMsg); static void SimplePeripheral_processCharValueChangeEvt(uint8_t paramId); static void SimplePeripheral_performPeriodicTask(void); -#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG) -static void SimplePeripheral_updateRPA(void); -#endif // PRIVACY_1_2_CFG static void SimplePeripheral_clockHandler(UArg arg); #if defined(GAP_BOND_MGR) static void SimplePeripheral_passcodeCb(uint8_t *pDeviceAddr, uint16_t connHandle, @@ -822,12 +804,6 @@ static void SimplePeripheral_processAppMsg(spEvt_t *pMsg) SimplePeripheral_performPeriodicTask(); break; -#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG) - case SP_READ_RPA_EVT: - SimplePeripheral_updateRPA(); - break; -#endif // PRIVACY_1_2_CFG - default: // Do nothing. break; @@ -911,18 +887,6 @@ static void SimplePeripheral_processGapMessage(gapEventHdr_t *pMsg) // Enable legacy advertising for set #1 status = GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0); SIMPLEPERIPHERAL_ASSERT(status == SUCCESS); - -#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG) - if (addrMode > ADDRMODE_RANDOM) - { - SimplePeripheral_updateRPA(); - - // Create one-shot clock for RPA check event. - Util_constructClock(&clkRpaRead, SimplePeripheral_clockHandler, - SP_READ_RPA_EVT_PERIOD, 0, true, - (UArg) &argRpaRead); - } -#endif // PRIVACY_1_2_CFG } break; @@ -1090,31 +1054,6 @@ static void SimplePeripheral_performPeriodicTask(void) } } -#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG) -/********************************************************************* - * @fn SimplePeripheral_updateRPA - * - * @brief Read the current RPA from the stack and update display - * if the RPA has changed. - * - * @param None. - * - * @return None. - */ -static void SimplePeripheral_updateRPA(void) -{ - uint8_t* pRpaNew; - - // Read the current RPA. - pRpaNew = GAP_GetDevAddress(FALSE); - - if (memcmp(pRpaNew, rpa, B_ADDR_LEN)) - { - memcpy(rpa, pRpaNew, B_ADDR_LEN); - } -} -#endif // PRIVACY_1_2_CFG - /********************************************************************* * @fn SimplePeripheral_clockHandler * @@ -1136,14 +1075,6 @@ static void SimplePeripheral_clockHandler(UArg arg) // Post event to wake up the application SimplePeripheral_enqueueMsg(SP_PERIODIC_EVT, NULL); } - else if (pData->event == SP_READ_RPA_EVT) - { - // Start the next period - Util_startClock(&clkRpaRead); - - // Post event to read the current RPA - SimplePeripheral_enqueueMsg(SP_READ_RPA_EVT, NULL); - } else if (pData->event == SP_SEND_PARAM_UPDATE_EVT) { // Send message to app