Setup TX power in BLE raw data gap advertizing
Posted: Fri Mar 23, 2018 3:38 pm
Hi,
I'm trying to insert in my advertizing packet, using raw data function
the TX power (in practice GAP index 0x0A as per BLE specification).
In the above example it is fixed to 0xdb, but I would like to retrieve the effective TX power of the ESP32.
How can I get it? If it is not possible to have it with an API, how can I compose the
structure in order to setup the device name( GAP index 0x09) (in above example 'A', 'v', 'i', 'o', 'r').
Should I put in
element?
Thank you.
I'm trying to insert in my advertizing packet, using raw data function
Code: Select all
esp_ble_gap_config_adv_data_raw
Code: Select all
static uint8_t raw_adv_data[] = {
//Appearance (384 generic remote control)
0x03, 0x19, 0x80, 0x01,
/* flags */
0x02, 0x01, 0x06,
/* tx power */
0x02, 0x0a, 0xdb,
/* Device name */
0x06, 0x09, 'A', 'v', 'i', 'o', 'r'
};
How can I get it? If it is not possible to have it with an API, how can I compose the
Code: Select all
esp_ble_adv_data_t
Should I put in
Code: Select all
uint8_t *p_service_data
Thank you.