Răsfoiți Sursa

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]
Hrishikesh Dhayagude 6 ani în urmă
părinte
comite
6f875f2db2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      components/protocomm/src/transports/protocomm_ble.c

+ 1 - 1
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",
     ESP_LOGD(TAG, "Inside read w/ session - %d on param %d %d",
              param->read.conn_id, param->read.handle, read_len);
              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");
         ESP_LOGD(TAG, "Reading attr value first time");
         status = esp_ble_gatts_get_attr_value(param->read.handle, &read_len,  &read_buf);
         status = esp_ble_gatts_get_attr_value(param->read.handle, &read_len,  &read_buf);
     } else {
     } else {