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

Change Device Name (S130) from Central.

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.

image description

image description

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.

Parents
  • The solution is to call again err_code = ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);

    after each name write. I use the same function than the first time advertising init called from main() and it works perfectly:

    advertising_init();

    When the device return to advertising mode the new name appears.

    Turn the bluetooth off and on the phone has no effect.

    Thank you all.

Reply
  • The solution is to call again err_code = ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);

    after each name write. I use the same function than the first time advertising init called from main() and it works perfectly:

    advertising_init();

    When the device return to advertising mode the new name appears.

    Turn the bluetooth off and on the phone has no effect.

    Thank you all.

Children
No Data
Related