Unable to advertise 128 bit UUID
Posted: Wed Sep 27, 2017 8:27 pm
Hi,
I am facing very basic problem which I think is because of very low experience with ESP32.
Actually, I wanna advertise complete list of 128bit service UUID in advertisement packet (which obviously is doable), but I am unable to do it with the following code:
And then using
As you can see that the I am not using Base UUID and also using .service_uuid_len=128 (tried 16 as well; I am not sure if this length is in bits or bytes) but of no use.
I don't get any service UUID in the advertisement packet and get the following error in the log:
Can anyone help me in resolving this problem. Will be very grateful.
Thanks in advance.
I am facing very basic problem which I think is because of very low experience with ESP32.
Actually, I wanna advertise complete list of 128bit service UUID in advertisement packet (which obviously is doable), but I am unable to do it with the following code:
Code: Select all
uint8_t adv_service_uuid128[16] = {
/* LSB <--------------------------------------------------------------------------------> MSB */
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0x00, 0xFC, 0xDD, 0xDD,
};
esp_ble_adv_data_t adv_data = {
.set_scan_rsp = false,
.include_name = true,
.include_txpower = true,
.min_interval = 0x20,
.max_interval = 0x40,
.appearance = 0x00,
.manufacturer_len = 0, //TEST_MANUFACTURER_DATA_LEN,
.p_manufacturer_data = NULL, //&test_manufacturer[0],
.service_data_len = 0,
.p_service_data = NULL,
.service_uuid_len = 128,
.p_service_uuid = adv_service_uuid128,
.flag = (ESP_BLE_ADV_FLAG_GEN_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT), //ADV Data Type= 0x01
};
And then using
Code: Select all
esp_err_t ret = esp_ble_gap_config_adv_data(&adv_data);
I don't get any service UUID in the advertisement packet and get the following error in the log:
Code: Select all
E (1862) BT: btc128_to_bta_uuid: Unknown UUID length 0!
E (1862) BT: btc128_to_bta_uuid: Unknown UUID length 0!
E (1868) BT: btc128_to_bta_uuid: Unknown UUID length 0!
E (1874) BT: btc128_to_bta_uuid: Unknown UUID length 0!
Thanks in advance.