When my device received name change request from central, I can catch this event (for updating device name in FDS) by callback *_on_ble_evt, event ID BLE_GATTS_EVT_WRITE and write handler 0x03. Value 0x03 was hardcoded in my firmware, but I suppose it looks like bad code style. And I'm not sure if this value never changes during next development.
Unfortunately, I see no ways how to get the exact value of Device Name handler after GAP initialization. Can you point me to function or structure containing handler value after stack init?