diff options
author | Sven Gothel <[email protected]> | 2021-02-01 20:29:14 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-02-01 20:29:14 +0100 |
commit | 72a387df5bbf136810c0aabe05dc34bd72beb669 (patch) | |
tree | 2b5b3e957ac53990691042a322bd43d78f939654 /examples/direct_bt_scanner10 | |
parent | 08984dd0d2e8a2a3092d84143bb12f59b6f1169f (diff) |
Complete C++/Java Scanner10 example for automatic security negotiation
Diffstat (limited to 'examples/direct_bt_scanner10')
-rw-r--r-- | examples/direct_bt_scanner10/dbt_scanner10.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp index 5b69f8d6..bc5a4ff2 100644 --- a/examples/direct_bt_scanner10/dbt_scanner10.cpp +++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp @@ -619,10 +619,10 @@ static void connectDiscoveredDevice(std::shared_ptr<BTDevice> device) { if( nullptr != sec ) { if( sec->isSecurityAutoEnabled() ) { bool res = device->setConnSecurityAuto( sec->getSecurityAutoIOCap() ); - fprintf(stderr, "****** Connecting Device: Using SecurityDetail.AutoIOCap %s, set OK %d\n", sec->toString().c_str(), res); + fprintf(stderr, "****** Connecting Device: Using SecurityDetail.SEC AUTO %s, set OK %d\n", sec->toString().c_str(), res); } else { bool res = device->setConnSecurityBest( sec->getSecLevel(), sec->getIOCap() ); - fprintf(stderr, "****** Connecting Device: Using SecurityDetail.IOCap %s, set OK %d\n", sec->toString().c_str(), res); + fprintf(stderr, "****** Connecting Device: Using SecurityDetail.Level+IOCap %s, set OK %d\n", sec->toString().c_str(), res); } } else { fprintf(stderr, "****** Connecting Device: No SecurityDetail for %s\n", device->getAddressAndType().toString().c_str()); @@ -1032,7 +1032,7 @@ int main(int argc, char *argv[]) const BDAddressAndType macAndType(EUI48(mac), getBDAddressType(atype)); MyBTSecurityDetail* sec = MyBTSecurityDetail::getOrCreate(macAndType); sec->io_cap_auto = getSMPIOCapability(atoi(argv[++i])); - fprintf(stderr, "Set auto security io_cap in %s\n", sec->toString().c_str()); + fprintf(stderr, "Set SEC AUTO security io_cap in %s\n", sec->toString().c_str()); } else if( !strcmp("-unpairPre", argv[i]) ) { UNPAIR_DEVICE_PRE = true; } else if( !strcmp("-unpairPost", argv[i]) ) { |