Any brave dive computer download testers out there?
Jef Driesen
jef at libdivecomputer.org
Sun Apr 22 12:22:48 PDT 2018
On 22-04-18 18:37, Linus Torvalds wrote:
> On Sun, Apr 22, 2018 at 3:52 AM, Jérémie Guichard <djeBrest at gmail.com> wrote:
>>
>> I just tried Scubapro G2 over bluetooth on Android build and it did not
>> work, but I must say this was already the case on Android for the normal
>> release.
>
> Hmm. I just tried my G2 over USB, and that worked fine.
>
> But bluetooth connects and starts downloading the data fine, but then
> it doesn't import:
>
> Dive data import error dives downloaded 0
>
> but I did get one "Failed to receive the packet" error. The BLE packet
> handling is a _lot_ less reliable than serial is.
>
> Hmm. I tried again, and it worked and downloaded all 78 dives on my G2.
>
> So the bluetooth case works (at least on Linux desktop), it's just:
>
> (a) really really damn slow, and you can't interrupt it in the middle
> because it doesn't download one dive at a time
>
> (b) fragile and does bad things if you get any BLE errors.
>
> and that makes it less than wonderful (to the point of maybe being useless).
>
> Jef, even when I already have all dives, the G2 download will
> apparently just download the whole memory dump and then parse later.
> That _really_ doesn't work very well. Is there no way to download one
> dive at a time?
No, the protocol doesn't support that. But it does support downloading only the
new dives. Unfortunately, the only way to take advantage of that is by means of
the libdivecomputer fingerprint feature.
This is actually one of those cases where trying to implement the download only
new dives feature entirely on the application side (without using the
fingerprint feature) will always be inefficient. That's because the protocol
works a bit different here. Unlike most other dive computers, it's the dive
computer that does the work. You need to send a timestamp (of the most recent
previously download dive) to the dive computer, and then the dive computer will
only send back the newer dives.
The result is that if you don't use the fingerprint feature, then you will
always request ALL dives And once you have all dives, you can ignore the ones
you already had. But at that point you have already downloaded them all.
Jef
More information about the subsurface
mailing list