aboutsummaryrefslogtreecommitdiffstats
path: root/examples/direct_bt_scanner10/dbt_scanner10.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-25 21:34:38 +0200
committerSven Gothel <[email protected]>2020-05-25 21:34:38 +0200
commit3021035aa42a8d8075615e5159e9ebd2d70b58ae (patch)
treec67a827f4e10229665d793ebd93378ca023fdd74 /examples/direct_bt_scanner10/dbt_scanner10.cpp
parent589e2718189a4501c3611cbceffc3a90d2ff7ef5 (diff)
DBTDevice/HCIComm: More 'snappy' connect method names and drop unused LE min/max ce_len,filter params
Show device on connection failure.
Diffstat (limited to 'examples/direct_bt_scanner10/dbt_scanner10.cpp')
-rw-r--r--examples/direct_bt_scanner10/dbt_scanner10.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp
index 14bc4853..940cda3a 100644
--- a/examples/direct_bt_scanner10/dbt_scanner10.cpp
+++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp
@@ -246,10 +246,10 @@ static void deviceConnectTask(std::shared_ptr<DBTDevice> device) {
device->getAdapter().stopDiscovery();
bool res = false;
if( !USE_WHITELIST ) {
- res = device->connectHCIDefault();
+ res = device->connectDefault();
}
fprintf(stderr, "****** Device Connector: End result %d of %s\n", res, device->toString().c_str());
- if( !USE_WHITELIST && !BLOCK_DISCOVERY ) {
+ if( !USE_WHITELIST && ( !BLOCK_DISCOVERY || !res ) ) {
device->getAdapter().startDiscovery(false);
}
}