From a1e0268f409187c636400ef5fb92c287669ea1c2 Mon Sep 17 00:00:00 2001 From: Hrishikesh Dhayagude Date: Tue, 18 Feb 2020 14:42:07 +0800 Subject: [PATCH] Unified Provisioning - BLE: Fix characteristics read response issue Fix the issue when number of bytes to be read is an exact multiple of MTU-1 --- components/protocomm/src/transports/protocomm_ble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/protocomm/src/transports/protocomm_ble.c b/components/protocomm/src/transports/protocomm_ble.c index c04059812..3b5161fdb 100644 --- a/components/protocomm/src/transports/protocomm_ble.c +++ b/components/protocomm/src/transports/protocomm_ble.c @@ -112,7 +112,7 @@ static void transport_simple_ble_read(esp_gatts_cb_event_t event, esp_gatt_if_t ESP_LOGD(TAG, "Inside read w/ session - %d on param %d %d", param->read.conn_id, param->read.handle, read_len); - if (!read_len) { + if (!read_len && !param->read.offset) { ESP_LOGD(TAG, "Reading attr value first time"); status = esp_ble_gatts_get_attr_value(param->read.handle, &read_len, &read_buf); } else {