GATT services discovery | Cypress Semiconductor
GATT services discovery
I'm trying to get data from a custom GAP peripheral, GATT server.
The peripheral sent data, and I can read GATT DB from CySmart, of course the services are unknown, but the data can be read and write.
Now, starting from PSoC_4_BLE_Central_IAS example, I try to read the same data.
• After the call back function initialization CyBle_Start(StackEventHandler) and CyBle_ProcessEvents(); I manage the events I scan for device CyBle_GapcStartScan(CYBLE_SCANNING_FAST);
• and after the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT I get advertising data from evetparameter pointer.
• Found my device, I connect it by CyBle_GapcConnectDevice(&connectPeriphDevice);
• did this, I start GATT discovery calling CyBle_GattcStartDiscovery(connHandle) that does not return any event parameter (the documentation says this) and
• I need to discover my GATT services and attributes. I've used CyBle_GattcDiscoverAllPrimaryServices(connHandle); and CYBLE_EVT_GATTC_DISCOVERY_COMPLETEe event are generated
from here I'm not understand how continue.
Where are the discovered services?
Does CYBLE_EVT_GATTC_DISCOVERY_COMPLETE returns an evetparameter? (reading the BLE documentation, this is not clear).
The examples on central function are very few, Can I have some help?