Hello,
We are using Bluetopia sdk v4.0.2.2 for cc2564. We have developed our code on the top of the HOGP Demo Example. We are using STM32F4 + CC2564 Solution.
We are getting issue related to the Whitelist Advertisement. Phone is not able to connect with the device, even if we provided phone address and address type in the Add whitelist api.
Our Steps are as below:
1) Device advertise with non whitelisted advertisement and do pairing/Bonding with the phone and then disconnect with the phone.
2) Now we configure paired phone address, as whitelist address, i.e. we add phone address in whitelist database in device using GAP_LE_Add_Device_To_White_List() api.
/*************Adding Whitelist*****************************/
int return;
unsigned int AddedDeviceCount,RemovedDeviceCount;
GAP_LE_White_List_Entry_t le_whitelst;
le_whitelst.Address = BondingInfo.BondPara[0].BD_ADDR;
le_whitelst.Address_Type =BondingInfo.BondPara[0].AddressType;
2.1) Clear the whitelist using "GAP_LE_Remove_Device_From_White_List" API we get the success response against this API.
return =GAP_LE_Remove_Device_From_White_List(BluetoothStackID,1,(GAP_LE_White_List_Entry_t*)&le_whitelst,&RemovedDeviceCount);
if(return!=0)
Display(("Error in Remove whitelist = %d\r\n",return));
else
Display(("Remove Whitelist Successfully done = %d\r\n",RemovedDeviceCount));
2.2) Add Bondend phone info in the whitelist using the "GAP_LE_Add_Device_To_White_List" API we got the success and also get the added device count as 1 in response.
return = GAP_LE_Add_Device_To_White_List(BluetoothStackID,1,(GAP_LE_White_List_Entry_t*)&le_whitelst,&AddedDeviceCount);
if(return!=0)
Display(("Error in add whitelist = %d\r\n",return));
else
Display(("Add Whitelist Successfully done = %d\r\n",AddedDeviceCount));
2.3) Enable the filter policy in the Advertising parameters.
/*************Advertisement Parameters Filters*************/
AdvertisingParameters.Scan_Request_Filter = fpNoFilter;
AdvertisingParameters.Connect_Request_Filter = fpWhiteList;
2.4) Start the Advertisement using the "GAP_LE_Advertising_Enable" API.
which means we started whitelisted advertisment.
3) Device is discoverable in phone scanning, and when we try to connect with device from there , we are not getting success and phone is not able to connect with device.
We verified all the information which we are passing but still we do not get clue how to resolve this issue. If we turn off the filter policy in the advertising parameters then the bonded device connect imediately.
Please review it and comment if anything is wrong with our procedure.
Regards,
khodidas