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

Disable address advertising.

Hi All,

I have a basic question about advertsing data, more precisely about device's address. I try to disable in my advertising data, the address field but it doesn't work...

I do this like that:

uint32_t      err_code;
ble_advdata_t advdata;

memset(&advdata, 0, sizeof(advdata));

advdata.name_type          = BLE_ADVDATA_FULL_NAME;
advdata.include_appearance = true;
advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

err_code = ble_advdata_set(&advdata, NULL);
APP_ERROR_CHECK(err_code);

But when i scan with my smartphone my Ble device, i always see the address. I don't understand, beacause the field: bool include_ble_device_addr;

is equal to 0.So the advertising packet normally doesn't include the address...

I tested too with this line: advdata.include_ble_device_addr = true; But i have this error on nrfConnect app (Android):

image description

Best regards.

Related