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

BLE_HIDS_EVT_NOTIF_ENABLED event behavior when change the BD address and do bonding again

Hi team,

Our customer's application was mouse.

The requirement was to change BD ADDR  and do bonding again after pushing the bonding key.

However , we want the device did not  send HVX until the bonding progress was finish.

we saw that HID had BLE_HIDS_EVT_NOTIF_ENABLE and it will be trigger after first bonding.

However, it would not be triggered again after changing address and do an new bonding.

However , this event  never appear again. 

Can we modified the CCCD value to make the notification disable at every disconnected event??

Or any other event we can use ??

BR

Brian 

Parents
  • Hi Brian, 

    I apologize for the late reply. 

    It is not possible for a peripheral to modify the CCCD, this attribute is contained within the SD and can only be changed by the central writing to it. 

    When Bluetooth LE devices are bonded, then CCCD values are stored by the central will set these upon reconnecting to a peripheral device it is bonded to. 

    I think the easiest solution is to wrap the call to the HVX call in a if(ok_to_send_notifications){} statement and set/ clear this flag when you for instance get the disconnection event. 

    Best regards

    Bjørn

Reply
  • Hi Brian, 

    I apologize for the late reply. 

    It is not possible for a peripheral to modify the CCCD, this attribute is contained within the SD and can only be changed by the central writing to it. 

    When Bluetooth LE devices are bonded, then CCCD values are stored by the central will set these upon reconnecting to a peripheral device it is bonded to. 

    I think the easiest solution is to wrap the call to the HVX call in a if(ok_to_send_notifications){} statement and set/ clear this flag when you for instance get the disconnection event. 

    Best regards

    Bjørn

Children
Related