I've a a working Arduino-code for my project and rewriting this in ESP-IDF.
For the following Arduino line I'm struggling to find the corresponding function for IDF.
static BLEUUID charUUID_tx("0000ff02-0000-1000-8000-00805f9b34fb");
uint8_t reqBasicInfo[7] = {0xdd, 0xa5, 0x3, 0x0, 0xff, 0xfd, 0x77};
BLERemoteCharacteristic *pRemoteCharacteristicTX;
pRemoteCharacteristicTX->writeValue(reqBasicInfo, sizeof(reqBasicInfo));
Do I use esp_ble_gattc_write_char
? What has to be the handle? 0xff02?
Thank you for your input.
You're correct, you can use the esp_ble_gattc_write_char() function as it technically does what you need. However, this is a low level function for which you need to get the characteristic value handle, connection handle, etc. Below is code (copied from here) that shows how this is done:-
Another useful references:-