This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hide Characteristics values before Bound

Hello,

I am going my project with NRG51822 in SDK 11. I build a android app that can connect to my device and access vendor specific service.

My device dedicates one button for BLE connection, and it will trigger limited advertising on button pressed. Android could connect to device in 30 secs after BLE button pressed, and it will perform bond procedure after "Just Works" pairing.

I want characteristics that in vendor specific service can not be accessible before bound, what should I do? Does any example in SDK 11 has the similar procedure that I could refer to?

Regards,

code_hard

Parents
  • So the Android device will do service discovery and then bond if it receives an att error: insufficient authentication (unless the slave sends and SMP request prior to that). I suggest you add the vendor specific service after bonding and send a service changed indication to android to trigger a new service discovery (works as long as the android phone supports service changed indications). Note it's possible to add services, but not remove them. That is you wil have to reinitialize the SD to remove services, but this should only take about 1 ms.

Reply
  • So the Android device will do service discovery and then bond if it receives an att error: insufficient authentication (unless the slave sends and SMP request prior to that). I suggest you add the vendor specific service after bonding and send a service changed indication to android to trigger a new service discovery (works as long as the android phone supports service changed indications). Note it's possible to add services, but not remove them. That is you wil have to reinitialize the SD to remove services, but this should only take about 1 ms.

Children
No Data
Related