I want to distinguish between my customized bootloader builds, for that I added some specific manufacturer data to the bootloader. I added 1 byte of manufacturer, but then the DfuTarg
advertising name changed to Dfu
as shown in the image below (length 0x08 but data are only 3 bytes).
what's the issue !!! does that means that the advertising packet is already full and I shouldn't add any byte??
is there anyway not to send all the 16 bytes of UUID to keep place for manufacturer data??
Bootloader advertising init
static void advertising_init(uint8_t adv_flags)
{
uint32_t err_code;
ble_advdata_t advdata;
ble_uuid_t service_uuid;
uint8_t adv_manuf_data_data[1];
uint8_array_t adv_manuf_data_array;
ble_advdata_manuf_data_t manufacturer;
service_uuid.type = m_dfu.uuid_type;
service_uuid.uuid = BLE_DFU_SERVICE_UUID;
// Build and set advertising data.
memset(&advdata, 0, sizeof(advdata));
advdata.name_type = BLE_ADVDATA_FULL_NAME;
advdata.include_appearance = false;
advdata.flags = adv_flags;
advdata.uuids_more_available.uuid_cnt = 1;
advdata.uuids_more_available.p_uuids = &service_uuid;
adv_manuf_data_data[0] = (uint8_t)0xBB;
adv_manuf_data_array.p_data = adv_manuf_data_data;
adv_manuf_data_array.size = 1;
manufacturer.company_identifier = 7;
manufacturer.data = adv_manuf_data_array;
advdata.p_manuf_specific_data = &manufacturer;
err_code = ble_advdata_set(&advdata, NULL);
APP_ERROR_CHECK(err_code);
}