Unable to read characteristics since new API
Posted: Tue Oct 31, 2017 12:36 pm
Since the new GATTC API I am unable to read the characteristics.
The same flow is used.
Scan for advertising devices and gattc_open the proper device.
A GATTC_CONNECT event is followed by a GATTC_OPEN event.
A ESP_GAP_BLE_SEC_REQ_EVT is raised and we respond with true.
The devices successfully pair after confirming on the android phone app.
MTU is configured and we call esp_ble_gattc_search_service().
A service is found in the SEARCH_RES_EVT.
The search completes and we call esp_ble_gattc_read_char(gattc_if, conn_id, 0xff00, ESP_GATT_AUTH_REQ_SIGNED_NO_MITM); This is the only call we changed in our sources.
Resulting in a ESP_GATTC_READ_CHAR_EVT with read.status == ESP_BT_STATUS_FAIL.
I noticed a error:
I mounted the wear_level filesystem and hardcoded the filepath, the error disappeared but I am still unable to read my characteristic.
log output: https://pastebin.com/7qCUn2ZA
log with BT_TRACE_LEVEL_VERBOSE https://pastebin.com/bhR5t4ks
How do I find out why the read characteristic is failing?
Any help would be appreciated =)
The same flow is used.
Scan for advertising devices and gattc_open the proper device.
A GATTC_CONNECT event is followed by a GATTC_OPEN event.
A ESP_GAP_BLE_SEC_REQ_EVT is raised and we respond with true.
The devices successfully pair after confirming on the android phone app.
MTU is configured and we call esp_ble_gattc_search_service().
A service is found in the SEARCH_RES_EVT.
The search completes and we call esp_ble_gattc_read_char(gattc_if, conn_id, 0xff00, ESP_GATT_AUTH_REQ_SIGNED_NO_MITM); This is the only call we changed in our sources.
Resulting in a ESP_GATTC_READ_CHAR_EVT with read.status == ESP_BT_STATUS_FAIL.
I noticed a error:
It seems bta_gattc_cache_write wants to open a file for writing.E (1808) BT: bta_gattc_cache_write: can't open GATT cache file for writing: /data/misc/bluetooth/gatt_cache_6789c2b071c6, errno: 2, No such file or directory
I mounted the wear_level filesystem and hardcoded the filepath, the error disappeared but I am still unable to read my characteristic.
log output: https://pastebin.com/7qCUn2ZA
log with BT_TRACE_LEVEL_VERBOSE https://pastebin.com/bhR5t4ks
How do I find out why the read characteristic is failing?
Any help would be appreciated =)