Hello,
I am using project ancs and I add sps service.
I would like to know how force android to be bonded before access and use sps service (switch to level 3 of gap security) ?
I am using the last version of sdk.
I already set defaultBLE_GAP_IO_CAP to GAP_IO_DISP_ONLY.
Thanks in advance,
Jérémy
Device:
Hi Jerem,
Only the central has the ability to send a Pairing Request to the device, and there are two ways in order to force it, either you have your characteristics protected, meaning that if the central attemps to read or write the characteristics, the device will prevent him from doing that unless he has sufficient authorization, then normally the android will initiate a security in order to be paired and get the clearance in order to read the characteristics of the device. The additional way in to just invoke the ble_app_set_sec_level(), this function will send a request to the central that it requires a specific security level in order to be paired (GAP_SEC_LEVEL_1, 2, 3, 4), if the central doesn't respond to the security request the peripheral will disconnect after 30 seconds. The example that you can refer to bms project in order to check out the implementation, also regarding the security APIs you can have a look at the UM-B-044-DA1468x Software Platform Reference v3.0.pdf.
Thanks MT_dialog