1

I didn't find anything about that in RxAndroidBLE sample code/description. In vanilla Android BLE API I can easily use BluetoothDevice.createBond() method for that, but i am totally confused how to do the same using RxAndroidBLE.

1 Answers1

1

RxAndroidBle does not support bonding / encryption as for the version 1.1.0. You can create the bond using standard Android BLE API though.

You will have a problem on subsequent connections when you will try to read / write encrypted characteristics as the Android BLE API is establishing encryption on an actual read / write of the characteristic and returns an error on first attempt — that error is effectively closing the connection within the library.

Edit: Since version 1.3.0 errors on individual operations are no longer closing the connection which gives an opportunity to retry them after the encryption is established.

Dariusz Seweryn
  • 3,212
  • 2
  • 14
  • 21
  • Do you have a plan to support bonding / encryption in further versions? –  Mar 21 '17 at 12:09
  • 1
    Yes — we do have a plan to support bonding / encryption — but it is not on the top of our priority list unfortunately. This is an open source project so anyone who would like to help us and contribute is welcome. – Dariusz Seweryn Mar 21 '17 at 12:19
  • The library was updated to version `1.3.0` and it should be possible to use encrypted characteristics now. – Dariusz Seweryn Jun 09 '17 at 22:19
  • Great news! Will try it asap –  Jun 11 '17 at 03:37