AnsweredAssumed Answered

QN908x device Bonded count

Question asked by Ankur Rathi on Feb 2, 2020
Latest reply on Feb 10, 2020 by Sebastián Del Río

Hi,
I am using QN908x Development board and Qn908x_SDK2.2.0 .
I am using HID device example code and I have enabled Pairing and Bonding.
In app_preinclude header file,

/*! Enable/disable use of bonding capability */
#define gAppUseBonding_d   1

 

/*! Enable/disable use of pairing procedure */
#define gAppUsePairing_d   1

 

and I am sending some command via BLE to Get the number of Bonded devices. For this, I am using "Gap_GetBondedDevicesCount" API.
While in the same power ON cycle, I am getting number of Bonded devices count correctly.

But, when I reset the card and then connect to some other device, bonded devices count reset to zero.
As I debug more,I saw that when Bonding is enabled, the code is adding the device to Whitelist. Whitelist just stored the data in RAM and not in Flash, so reset cycle again reset the Bonded devices.
Is their any API to save the Bonded device in Flash.

In "gap_interface" header file, I am able to see the API's "Gap_RemoveAllBonds" and "Gap_RemoveBond" but not "Gap_AddBond" api.
Is their any other way to save bonded data of the device between Reset cycle.

Outcomes