proposed changes to libdc

Dirk Hohndel dirk at
Thu Jun 22 22:31:33 PDT 2017

On Thu, Jun 22, 2017 at 10:22:54PM -0700, Linus Torvalds wrote:
> On Thu, Jun 22, 2017 at 9:52 PM, Dirk Hohndel <dirk at> wrote:
> >
> > I'm proposing to fix this to make this actually useful.
> [ snip snip ]
> Looks superficially sane to me.

"superficiallt sane" has always been what I was going for...  :-)

> .. except to be useful, most of those transports should also describe
> the "device pattern" so that you can actually do sane things.
> For example, DC_TRANSPORT_USB_HID on its own is *not* very useful knowledge.
> But DC_TRANSPORT_USB_HID, *together* with the USB vendor/device ID
> information, would be very useful indeed.
> Similarly, DC_TRANSPORT_{BT,BLE} is not very useful on its own, but if
> it comes with a way to match the actual devices in question, it would
> make a huge difference.
> For BLE, we *may* end up wanting secondary information too (ie it may
> turn out that we'd want to have an enumeration of the UUID's for the
> sending/receiving service for that dive computer. I'm not entirely
> sure of that yet, but it may be that we'll need per-backend knowledge
> like that to make a "generic" GATT interface work.

That sounds cool. We could pack in a union for each of the transports that
provides transport specific data like that. I know that Anton wanted
something like this to detect various FTDI dive computers by their vendor
and device ID combination. That way we could automatically pick a
connected device :-)


More information about the subsurface mailing list