[PATCH] Bluetooth improvements

Rick Walsh rickmwalsh at gmail.com
Sun Jul 19 05:18:03 PDT 2015

On 19 July 2015 at 22:06, Claudiu Olteanu <
olteanu.vasilica.claudiu at gmail.com> wrote:

> Thanks for the info, Rick!
> Did you tried to download the dives after you paired the devices
> manually (using bluetoothctl)?
I didn't think to try that before.  But I just tried and it worked.

> Currently the QtBluetooth library doesn't have an agent which
> can be used to set a custom PIN code on pairing step [1]. I don't
> know when they will implement it. The pairing step must be
> done only once when you connect a new device to the computer.
> Therefore we decided to postpone the implementation of a custom
> agent.

That's annoying.  Thankfully, most systems have a reasonably friendly way
to pair bluetooth devices, and it only needs to be done once.  Can you
detect if pairing fails, and ask the user to pair the device using their
operating system?  It's been a while since I've used the Shearwater Desktop
program, but I think it requires the user to pair the device using Windows.

> The only way to test if the pairing command was triggered from our
> widget is to open a default agent in the background and see if the
> PIN code request is raised. One solution is to use the bluetoothctl
> tool:
> > agent KeyboardOnly
> > default-agent
> Unfortunately I don't know why some devices need a pairing code
> and others don't need one. As I said before, I assume that they are
> smarter and they try some basic PIN codes on the authentication
> step.
> Claudiu
> [1] - https://bugreports.qt.io/browse/QTBUG-42740
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150719/90e9d8ef/attachment.html>

More information about the subsurface mailing list