nordic

Fork of nRF51822 by Nordic Semiconductor

Revision:
320:cf62d065e70a
Parent:
319:1edcbcd1bf21
Child:
321:b1281aaf0076
--- a/btle/btle_discovery.cpp	Fri Jun 19 15:55:31 2015 +0100
+++ b/btle/btle_discovery.cpp	Fri Jun 19 15:55:31 2015 +0100
@@ -374,6 +374,19 @@
                 sdSingleton.processDiscoverUUIDResponse(&p_ble_evt->evt.gattc_evt.params.char_val_by_uuid_read_rsp);
             }
             break;
+
+        case BLE_GATTC_EVT_READ_RSP:
+            printf("BLE_GATTC_EVT_READ_RSP\r\n");
+            if (DiscoveredCharacteristic::onDataReadCallback != NULL) {
+                DiscoveredCharacteristic::ReadResponse_t response = {
+                    .handle = p_ble_evt->evt.gattc_evt.params.read_rsp.handle,
+                    .offset = p_ble_evt->evt.gattc_evt.params.read_rsp.offset,
+                    .len    = p_ble_evt->evt.gattc_evt.params.read_rsp.len,
+                    .data   = p_ble_evt->evt.gattc_evt.params.read_rsp.data,
+                };
+                DiscoveredCharacteristic::onDataReadCallback(&response);
+            }
+            break;
     }
 
     sdSingleton.progressCharacteristicDiscovery();