On Sun, Oct 27, 2019 at 3:42 PM Vincent Tassy <
tim...@gmail.com> wrote:
>
> I follow the above-mentioned procedure all the way to launching the download (no issue with pairing so far).
>
> Model, Firmware, Serial # appear on the SubSurface download screen
Ok, that means it connected fine, and the data transfer started. So
things are working.
It's usually getting to that stage that has been problematic, but
that's not your issue, clearly.
> and after a few seconds, less than a minute, I get a popup in Subsurface reporting a "Dive
> data import error" (which seems to originate, unsurprisingly, from core/libdivecomputer.c)
So you seem to have an actual "packets lost" issue.
That generally shouldn't happen, but I've seen machines with flaky BLE
before. My laptop tends to have much more solid bluetooth than my
desktop machine does, for example.
> See attached the Log Error that also appears on the Perdix ! It didn't use to do that before ...
That's just "transfer started, but then timed out". Matches the
libdivecomputer log you quote
> What I read in the libdivecomputer log is:
>
> ERROR: Failed to receive the packet. [in shearwater_common.c:239 (shearwater_common_slip_read)]
> ERROR: Failed to receive the response packet. [in shearwater_common.c:379 (shearwater_common_transfer)]
> ERROR: Failed to download the dive. [in shearwater_petrel.c:380 (shearwater_petrel_device_foreach)]
where libdivecomputer just gives up when there's lost data.
Some of the libdivecomputer backends do retries, but the shearwater
one doesn't. It may not even be possible, I'm not sure.
> This is when the chaos I was mentioning kicks in...
>
> Since the pairing was originally OK and the download started, you would think that I could just hit the Retry Download button, but that systematically fails.
Yeah, no. That's where the shearwater bad BT implementation comes in.
It *might* work if you restart the shearwater bluetooth thing, but
it's also possible that there's just pending data. It also looks like:
> Every attempt to pair results in "Local device error: Pairing Error. If the remote device requires a custom PIN code, please try to pair the devices using your
> operating system"
this probably means that there's some BT confusion on the desktop
computer side too.
> I'm running 4.9.3 built from the source RPM over a month ago on my Fedora 29 and I'm using KDE Plasma.
>
> Maybe I should try the AppImage in case one of the Fedora libs is causing the trouble ...
It might be worth upgrading to F30, which is what I'm on. The Qt
bluetooth integration with bluez has been problematic, but it seems to
have been sorted out - but it's possible that F29 is still on
sluightly flaky ground.
But it might also be a dodgy bluetooth driver and/or controller. As
mentioned, that happens. Bluetooth in laptops _tends_ to be fairly
good (because people actually use it), but a lot of bluetooth is just
legacy and mainly mouse, keyboard and audio. So not all drivers and
not all chipsets have equally good support.
But a Qt issue is traditionally the biggest reason. It *used* to be
that Qt did all of its BLE communication directly, bypassing bluez
entirely. That worked quite well most of the time, but made scanning
really really slow (because there was no system caching of device
information), and it could result in odd problems when the system
bluetooth stack (bluez) did something at the same time as the Qt app.
And it required very specific versions of Qt to work at all - we used
to build our own version of Qt with various fixes for a long while to
get working BLE.
Then Qt moved over to using the proper bluez interfaces, but that
transition wasn't entirely smooth. I know F30 works fine (well, it
does for _me_), but I don't recall if there were issues on F29.
But as mentioned, it might also be a dodgy driver. Do you happen to
know what bluetooth hardware you have? I have successfully used btusb
devices (most of the BLE USB sticks, and a lot of the integrated
laptop ones), and the Intel bluetooth module from their wireless
mobile chipsets.
Linus