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

Generic access profile write event handler

In ble_app_blinky_pca10040e_s112 example, Generic access service has read and write permission.

When writing the name, I want to handle this event and change the advertisement name. 

How do I do this? 

When I write the name, It triggers ble_evt_handler with p_ble_evt->header.evt_id  = 0x50. Where does this get handled and how does it stores the name? 

Parents Reply
  • Hi,

    As you've said, a write to the Generic Access characteristic Device Name generates a BLE_GATTS_EVT_WRITE event (0x050) in the ble handler. The ble_app blinky project doesn't have a case in the ble handler that handles this event, you would therefore have to make a case in the switch statement that handles this event and then changes the name as in the post i linked in the previous reply. I hope that answered you question.

    regards

    Jared 

Children
Related