My BLE GATT server shows a fault for (ESP_GATTS_CONF_EVT)
Posted: Fri Nov 22, 2019 3:25 pm
I'm currently trying to figure out why two different Android Applications using the Bluedroid API are not able to receive notifications from my BLE GATT server. I've based it on the given GATT Server example supplied in the ESP-IDF repository.
I notice the following when the Application connects to the GATT server:
Basically, in summary
Might this have something to do with why my Applications cannot receive notifications? Strangely enough, all subsequent events in this handler succeed. Even though when they do succeed, I still do not receive notifications.
I notice the following when the Application connects to the GATT server:
Code: Select all
I (992) BLE-Driver: GATTS Event: ESP_GATTS_REG_EVT
I (992) BLE-Driver: GATTS Profile: Device name is: EKG-ESP32
I (992) BLE-Driver: GATTS Profile Event : Service ID: 255
I (1002) BLE-Driver: Ready
I (1012) BLE-Driver: GATTS Event: ESP_GATTS_CREATE_EVT
I (1012) MAIN: Startup Completed
I (1022) BLE-Driver: GAP advertising started
I (1022) BLE-Driver: GATTS Event: ESP_GATTS_START_EVT
I (1022) BLE-Driver: GATTS Profile: Service started
I (1032) BLE-Driver: GATTS Event: ESP_GATTS_ADD_CHAR_EVT
I (1032) BLE-Driver: GATTS Event: ESP_GATTS_ADD_CHAR_DESCR_EVT
I (13092) BLE-Driver: GATTS Event: ESP_GATTS_CONNECT_EVT
I (13092) BLE-Driver: GATTS Profile: Connect event
I (13582) BLE-Driver: Connection parameters updated
I (13862) BLE-Driver: Connection parameters updated
I (14012) BLE-Driver: GATTS Event: ESP_GATTS_WRITE_EVT
W (14012) BLE-Driver: GATTS Profile: WRITE_EVT to Characteristic Descriptor
I (14012) BLE-Driver: GATTS Profile: Notify Enabled!
W (14022) BLE-Driver: 01 00
I (14042) BLE-Driver: GATTS Event: ESP_GATTS_RESPONSE_EVT
I (14042) BLE-Driver: GATTS Profile: ESP_GATTS_RESPONSE_EVT okay!
I (14052) BLE-Driver: GATTS Event: ESP_GATTS_CONF_EVT
E (14052) BLE-Driver: GATTS Profile: ESP_GATTS_CONF_EVT error (87)!
I (14062) BLE-Driver: e4 47 0f 40 04 a2 fb 3f a5 aa fb 3f b0 aa fb 3f
I (14072) BLE-Driver: 09 00 00 00
- 1. The characteristic descriptor is written to. The applications wants to receive Notifications. This is received OK (0x01, 0x00)
2. A GATTS response event is fired, and the status is OK.
3. A GATTS confirm event is fired, but there is an error!
Code: Select all
// According to the documentation: "When receive confirm, the event comes"
case ESP_GATTS_CONF_EVT: {
if (param->conf.status == ESP_GATT_OK) {
ESP_LOGI("BLE-Driver",
"GATTS Profile: ESP_GATTS_CONF_EVT okay!");
} else {
ESP_LOGE("BLE-Driver",
"GATTS Profile: ESP_GATTS_CONF_EVT error (%X)!",
param->conf.status);
esp_log_buffer_hex("BLE-Driver", param->conf.value, param->conf.len);
}
}
break;