Bonding best practices
See original GitHub issueI needed to initiate a bond with a peripheral using “Just Works” bonding. This means no exchange of a PIN. I got it to work by simply grabbing the underlying BluetoothDevice and calling createBond()
, but I wanted to check to see if this is somehow wrong, and I should be doing something else, or in a more idiomatic way.
val device: RxBleDevice = bluetoothService.getBleDevice(selectedDevice.macAddress)
Observable.fromCallable<RxBleDevice> {
device.bluetoothDevice.createBond()
device
}
.flatMap {
it.establishConnection(false)
}
.doOnNext {
Timber.e("Connection established.")
}
...
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Linux Channel Bonding Best Practices and Recommendations
This white paper describes channel bonding configurations on different Linux distributions on IBM® Z, and explains the recommended options for the Linux ......
Read more >Best Practice in Adhesive Bonding
Outline of service experience with bonded structures and repairs. • Identify safety critical issues. • Major cause of bond failure.
Read more >7.7. Using Channel Bonding Red Hat Enterprise Linux 7
1. Bonding Module Directives. It is a good idea to test which channel bonding module parameters work best for your bonded interfaces before...
Read more >Best Practices for Industrial Structural Adhesives - LORD Corp
Joint configuration should be designed so that the basic stress is primarily shear. Tensile, or compressive with cleavage, and peel stresses should be...
Read more >networking:bonding [Wiki]
A value of 100 is a good starting point. ... There are, essentially, two methods for configuring bonding: with support from the distro's ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello,
Here is a way to implement pairing/bonding with RxAndroidBle. It might be useful for people having to deal with that process.
https://gist.github.com/craigzour/edf7f3bd8bef4b162887b4244e27dc1f
I came up with a slightly different helper class based on @craigzour solution. The main difference is that in Craig’s solution, the completable completed successfully if the device was already bonded. In my case, that wasn’t useful, because when I try to read or write the first characteristic to be encrypted, the operation failed anyway. To avoid that, I always unbond and bond again before establishing the connection, so I added an unbonding operation before.
https://gist.github.com/dglozano/9b0ce38a558eeca16137909bd368698c