With Duo as a BLE Central I can make connections, but it often takes several attempts for the connection to be successful. Here is what happens:
- BLE Connection initiated: ble.connect()
- Connection Success on callback: onConnectedCallback()
- Within ~200ms the Disconnect callback fires: onDisconnectedCallback()
The odd thing is that I get a connection handle in the connection callback, but my peripheral never sees any connection whatsoever. Any ideas what might be happening here? I have tried several other BLE central devices and none of them have any connection issues to my peripheral device. The signal is strong and the devices are in close proximity.
The other point is that once the Duo does eventually establish a connection it is solid and never drops. The connectivity issue is just when trying to establish the initial connection.
Last note is that I am scanning before, during and after the connection attempt. Should I disable scanning when trying to connect?