Cleaned up and rebased "libdivecomputer-NG" branch

Linus Torvalds torvalds at linux-foundation.org
Wed Apr 25 09:47:27 PDT 2018


On Wed, Apr 25, 2018 at 8:43 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> We should now focus on figuring out the problems with the Shearwater downloads.
> For some people these fail on rfcomm, for some they fail on BLE but succeed on
> rfcomm, and it seems that some can't download from their Shearwater devices at
> all...

So attached is a trial patch. It makes sense to me, but I don't have
any rfcomm devices to try with.

What it does is:

 - create a notion of "supported protocols"

 - use the "bluetooth_mode" to switch that between "BT and BLE" and
"everything _but_ BT and BLE"

 - take the "LE:" prefix into account when in bluetooth mode, and
limit things to _only_ BLE in that case

 - limit the final set of protocols to the bitwise logical and of the
"dive computer supports this protocol" and "we support this protocol".

 - and finally, try rfcomm _before_ trying BLE

What the *effect* of this should be:

 - we don't try the crazy "fall back on other protocols" if
bluetooth_mode was set

 - we actually start taking that "LE:" prefix into account again.

 - people who prefer rfcomm won't have us trying BLE first

but it's entirely untested. Well - it builds for me, and my Perdix AI
still downloads, but I obviously can't test the case that really
matters.

                Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2224 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20180425/5706d07c/attachment-0001.bin>


More information about the subsurface mailing list