enhance example, relate to #150

This commit is contained in:
hathach committed 2019-01-11 14:50:37 +07:00
1 parent 71efec28ec
commit 1182aca25c
3 files changed
+13 -4

No files matched your search

@@ -82,7 +82,11 @@ bool BLEDiscovery::_discoverService(uint16_t conn_handle, BLEClientService& svc,
int32_t bytecount = _adamsg.waitUntilComplete(BLE_DISCOVERY_TIMEOUT);
// timeout or has no data (due to GATT Error)
if ( bytecount <= 0 ) return false;
if ( bytecount <= 0 )
{
LOG_LV1("DISC", "[SVC] timeout or error", start_handle);
return false;
}
// Check the discovered UUID with input one
if ( (disc_svc.count) && (svc.uuid == disc_svc.services[0].uuid) )