I am having trouble trying to pair & bond a Bluetooth LE device using btframework (www.btframework.com), specifically the Nonin Wristox 3150 BLE
The documentation for the device states...
The 3150 BLE uses the Just Works pairing method with bonding support. Upon successful pairing, the collector should initiate bonding, and the 3150 BLE will save the long term bonding key associated with the collector. The 3150 BLE requires the collector to be bonded in order to encrypt the connection. When bonding is complete, the collector should encrypt the connection.
I'm trying to work out what I should be doing to get connected. I've actually managed to get it connected once, which is how I've done all my development, but what I've done does not seem to have worked when I try it again. Using the BTFramework demo application, their "GattClient" - I can discover my device no problem, but when I click on "Connect", it connects to the device with a 0 error code (indicates success) , but the device disconnects a second later. I'm guessing this is because I haven't done all the pairing above.
So I've used their "Bluetooth Manager" to try pairing. I set the MITM to "ProtectionRequiredBonding", IOCap to "DisplayOnly" and BLE Protection to "Encryption", and click "Pair".
This actually worked once - I was paired, and then I was able to use the GattClient to Connect and get the services, characteristics and see the characteristic changes.
However I haven't been able to repeat the exercise. When I use Windows to remove the device, I'm back to the previous state where I can connect but get disconnected by the device, and I tried the above again. It doesn't seem to work now though. I usually get error 0x005105C (device not found) when I try to connect now. In the Window settings devices page, the status seems to change between "Connected" and "Paired" at random, and sometimes the device itself just starts reporting a connection error. (The device is not very forthcoming about what's causing the error). It always reports the pairing itself to be a success though
There is also this:
If the encryption process fails, it is likely that either the collector or 3150 BLE has deleted its bond key. When this occurs, the 3150 BLE will delete its bond key if present. It is recommended that the collector also delete its bond key if present.
Is this something I need to be doing? How is this done with btframework?