aboutsummaryrefslogtreecommitdiffstats
path: root/examples/java/DBTPeripheral00.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-06-18 08:16:16 +0200
committerSven Gothel <[email protected]>2022-06-18 08:16:16 +0200
commit3c0c992b125d19f8892b90e1d11f21eeca298830 (patch)
tree3e5d30f6459e0c4f13bf2b5d5b15064793d9ef81 /examples/java/DBTPeripheral00.java
parentc699fc3c8f5f10db30b78bf82d5574595d092cbd (diff)
BTAdapter::setDefaultConnParam() may fail w/ UNKNOWN_COMMAND on GNU/Linux < 5.9 (Ubuntu 20.04), tolerate it.
Diffstat (limited to 'examples/java/DBTPeripheral00.java')
-rw-r--r--examples/java/DBTPeripheral00.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java
index eebb80d0..72e8d388 100644
--- a/examples/java/DBTPeripheral00.java
+++ b/examples/java/DBTPeripheral00.java
@@ -689,8 +689,10 @@ public class DBTPeripheral00 {
status = adapter.setDefaultConnParam(conn_min_interval, conn_max_interval, conn_latency, supervision_timeout);
if( HCIStatusCode.SUCCESS == status ) {
BTUtils.fprintf_td(System.err, "initAdapter: setDefaultConnParam OK: %s\n", adapter.toString());
+ } else if( HCIStatusCode.UNKNOWN_COMMAND == status ) {
+ BTUtils.fprintf_td(System.err, "initAdapter: setDefaultConnParam UNKNOWN_COMMAND (ignored): %s\n", adapter.toString());
} else {
- BTUtils.fprintf_td(System.err, "initAdapter: setDefaultConnParam failed: %s\n", adapter.toString());
+ BTUtils.fprintf_td(System.err, "initAdapter: setDefaultConnParam failed: %s, %s\n", status.toString(), adapter.toString());
return false;
}