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

sd_ble_gap_adv_data_set

i want to modify advertising data by calling sd_ble_gap_adv_data_set, the advertising data include advertising data flag and Manufacturer specific data,the format of advertising data was define in the following:

p_data[31]={0x02,0x01,0x05,0x1b,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0xF7,0xDB,0x34,0xC4,0x03,0x8E,0x5C,0x0B,0xAA,0x97,0x30,0X56,0xE6};

then ,i call sd_ble_gap_adv_data_set:

err_code=sd_ble_gap_adv_data_set(p_data,31,NULL,0);
err_code=NRF_ERROR_INVALID_LENGTH.

if the advertising data just include Manufacturer specific data ,the format of advertising data was define in the following:

p_data[31]={0x1e,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0xF7,0xDB,0x34,0xC4,0x03,0x8E,0x5C,0x0B,0xAA,0x97,0x30,0X56,0xE6};

i call sd_ble_gap_adv_data_set:

err_code=sd_ble_gap_adv_data_set(p_data,31,NULL,0);
err_code=NRF_SUCCESS .

i want to ask whether advertising data can't include advertising data flag and Manufacturer specific data at the same time.

Related