<div dir="ltr">Resending to the entire list due to not enough coffee.<div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Benjamin</b> <span dir="ltr"><<a href="mailto:nystire@gmail.com">nystire@gmail.com</a>></span><br>Date: 23 September 2017 at 10:18<br>Subject: Re: BLE on macOS and many requests for testing<br>To: Dirk Hohndel <<a href="mailto:dirk@hohndel.org">dirk@hohndel.org</a>><br><br><br><div dir="ltr">Good morning<div>Due to the Mediterranean not cooperating, I'm testing software instead of diving today :(</div><div>Running the latest version from the daily builds - 4.6.4 - 839 with a Petrel 2.</div><div>Windows 10 64 bit - Bluetooth works fine<br>macOSĀ 10.13 Beta (17A360a) - can't seem to connect to the dive computer. The logfile consists of the following 2 lines:</div><div>







<p class="m_-1512484050754653509gmail-p1"><span class="m_-1512484050754653509gmail-s1">INFO: Open: name=00:13:43:0C:56:29</span></p>
<p class="m_-1512484050754653509gmail-p1"><span class="m_-1512484050754653509gmail-s1">ERROR: Failed to open the serial port. [in ../../src/shearwater_common.c:<wbr>46 (shearwater_common_open)]</span></p><p class="m_-1512484050754653509gmail-p1"><span class="m_-1512484050754653509gmail-s1">This behaviour under macOS is consistent even after removing the Bluetooth pairing and reassociating the dive computer to the computer.</span></p><span class="HOEnZb"><font color="#888888"><p class="m_-1512484050754653509gmail-p1"><span class="m_-1512484050754653509gmail-s1">Benjamin</span></p></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 18 September 2017 at 02:41, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I finally found some time to look more into BLE on macOS. Things there are<br>
rather different because Qt doesn't give us BT addresses. Or, actually, it<br>
never gives us BT addresses for BLE devices, it seems, it sometimes (but I<br>
can't quite figure out when) gives us BT addresses for BT classic devices.<br>
<br>
Anyway, our whole BLE setup was designed around the idea that we'd have a<br>
BT address to use in order to create our QLowEnergyController. Sadly that<br>
doesn't work at all on macOS (or iOS), and is deprecated on Linux (I<br>
haven't checked if it will still be in 5.10, though).<br>
<br>
Instead, what you are supposed to do is to create that controller using<br>
your QBluetoothDeviceInfo. But sadly I haven't figured out a way to get<br>
this unless I am scanning for BT/BLE devices. So what this means is that<br>
at least in the BLE case you now need to scan for and pick your dive<br>
computer every time you want to download. :-(<br>
<br>
At first I tried to use that newer method on all OSs, but it turns out<br>
that that was a bad idea. For one thing, our Android implementation<br>
doesn't use Qt to scan for devices, so a lot more code would have to be<br>
rewritten there. And additionally, the new interfaces were only introduced<br>
in Qt 5.7, so the Linux distros with Qt 5.6 would fail to build Subsurface<br>
after I made those changes.<br>
<br>
So for now I went back to the old code for all the non-Apple OSs.<br>
<br>
So what has been tested (and works) so far:<br>
<br>
BLE download on Mac, right after scanning for and selecting the dive<br>
computer appears to work with Shearwater Petrel AI, Shearwater Petrel 2,<br>
and Suunto EON Steel.<br>
<br>
More testing (especially with other BT and BLE dive computers) would be<br>
extremely useful:<br>
<br>
<a href="http://subsurface-divelog.org/downloads/test/Subsurface-4.6.4-830-gae209a3d9f8e.dmg" rel="noreferrer" target="_blank">http://subsurface-divelog.org/<wbr>downloads/test/Subsurface-4.6.<wbr>4-830-gae209a3d9f8e.dmg</a><br>
<br>
BLE download on Linux (Fedora with a manual install of Qt 5.9.1) works<br>
with a Shearwater Petrel AI. I couldn't get the Petrel 2 to work because<br>
BT and BLE code somehow stepped all over each other there (this is a dual<br>
mode dive computer). I need to investigate a bit more what's going wrong<br>
there.<br>
<br>
I have NOT checked Windows, yet; obviously, BLE isn't supported there at<br>
all, but I would love to know if BT still works or if I inadvertandly<br>
broke something there.<br>
<br>
<a href="http://subsurface-divelog.org/downloads/test/subsurface-4.6.4-831-g753c00a4936f.exe" rel="noreferrer" target="_blank">http://subsurface-divelog.org/<wbr>downloads/test/subsurface-4.6.<wbr>4-831-g753c00a4936f.exe</a><br>
<br>
I did a quick test on Android and things seem to continue to work there.<br>
Again, there's a new test APK and testing would be appreciated.<br>
<br>
<a href="http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.6.4.831-arm.apk" rel="noreferrer" target="_blank">http://subsurface-divelog.org/<wbr>downloads/test/Subsurface-mobi<wbr>le-4.6.4.831-arm.apk</a><br>
<br>
And I haven't had enough time to try to build a new iOS binary based on<br>
this latest code. This will require me to write some Qt based BLE scanning<br>
for Subsurface-mobile (which might eventually allow us to migrate the<br>
Android binary to the new way of doing things).<br>
But in general, I'm hoping that we might be getting closer to having<br>
working BLE download for iPads and iPhones.<br>
<br>
Please test and let me know.<br>
<br>
Thanks<br>
<br>
/D<br>
<br>
______________________________<wbr>_________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.<wbr>org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelo<wbr>g.org/cgi-bin/mailman/listinfo<wbr>/subsurface</a><br>
</blockquote></div><br></div>
</div></div></div><br></div></div>