This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to dynamically change GAP name of mesh device ?

Hi all,

I am using the nRF52832, Mesh sdk v4.2.0 and the nRF5 sdk v16.0.0.
How to dynamically change the GAP name of device when using smart phone (nRF connect APP)to scan device(GATT proxy role)?

I saw some methods from forum as follows but seems not to work.

static char test_gap_name[] = "Test";
uint32_t err_code;
ble_gap_conn_sec_mode_t sec_mode;

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);

err_code = sd_ble_gap_device_name_set(&sec_mode,
(const uint8_t *)test_gap_name,
strlen(test_gap_name));

Could anyone help this question?


Thanks,
Frank

Parents Reply
  • Hello again,

    frank_c said:
    Thanks for your example.

    No problem at all, Frank - I am happy to help!

    frank_c said:

    It can update the broadcast data successfully as follows.

    But how to only update the broadcast device name and keep other data fields the same? 

    I am glad to hear that you now are able to update the broadcast data as intended.
    If you wish to keep certain fields of the advertising data the same you could just populate the those datafields of the update with the same content every time.
    Since you are using SDK v16.0.0 you could just keep the advertising data structure static, and then change only the advertised device name in between each update.

    Best regards,
    Karl

Children
No Data
Related