I've read diferents answers to this question. When I change the device nace from nrf Master Contorl pannel the new name is set but the advertising is done with the old name.
I also try to do sd_ble_gap_device_name_set() in response to BLE_GATTS_EVT_WRITE and the char BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME but doesn't work.