On 2024-05-02 07:00, Daniel Samarin wrote:
> Thanks for your patience! There is something different or unique with
> how Subsurface handles the Galileo Sol. On my computer (Win10) it greys
> out the "Device or mount point" selection so I can't select anything.
> We're going to need to dig into the source code to understand why and
> that may take some time.
>
> Fortunately, we know our device works with Cressi several dive
> computers as expected, across Linux/Windows/MacOS/Android/iOS, so now
> we just need to figure out what is special about Uwatec.
The explanation is easy. The Galileo and some of the other
Uwatec/Scubapro models are IrDA enabled dive computers, and are marked
as such in the source code:
https://github.com/libdivecomputer/libdivecomputer/blob/master/src/descriptor.c#L144
Thus when you select one of those models, subsurface will offer the
available IrDA devices that were found during the IrDA device discovery.
It won't offer any usb-serial devices, because normally the dive
computer doesn't support those, and it makes no sense to offer choices
to the user that are not going to work.
In theory you could add the DC_TRANSPORT_SERIAL transport (or just
select a model where this transport is already present like the Scubapro
Meridian), but I doubt that is going to work. That's because the framing
used in the serial communication is a bit different from the one used in
the IrDA communication:
https://github.com/libdivecomputer/libdivecomputer/blob/master/src/uwatec_smart.c#L500-L520
So if your device is simply passing through the data unchanged and just
translates between usb-serial and IrDA communication, then this won't
work. The easiest workaround is probably to use a custom transport that
is actually a serial transport, but disguises itself as an IrDA
transport. Something like this:
dc_custom_cbs_t callbacks = {
dc_iostream_set_timeout, /* set_timeout */
dc_iostream_set_break, /* set_break */
dc_iostream_set_dtr, /* set_dtr */
dc_iostream_set_rts, /* set_rts */
dc_iostream_get_lines, /* get_lines */
dc_iostream_get_available, /* get_available */
dc_iostream_configure, /* configure */
dc_iostream_poll, /* poll */
dc_iostream_read, /* read */
dc_iostream_write, /* write */
dc_iostream_ioctl, /* ioctl */
dc_iostream_flush, /* flush */
dc_iostream_purge, /* purge */
dc_iostream_sleep, /* sleep */
dc_iostream_close, /* close */
};
// Open the underlying serial transport.
dc_iostream_t *tmp = NULL;
status = dc_serial_open (&tmp, context, devname);
// Disguise it as an IrDA transport.
dc_iostream_t *iostream = NULL;
status = dc_custom_open (&iostream, NULL, DC_TRANSPORT_IRDA,
&callbacks, tmp);
> To Aryel,
> I am confident the device will work with the Giotto. As for the Genius,
> I believe that dive computer uses Bluetooth for data transfer, no?
The Genius supports both serial and BLE communication.
Jef