Fwd: feedback on experience with OSX packaging
tdb at tdb.fi
Mon Oct 8 08:44:54 PDT 2012
On 08.10.2012 11:28, Jef Driesen wrote:
> One of the things you could do is enumerate the serial ports on the
> system, and list them in the GUI (a dropdown or something). It's already
> a bit more user friendly than having to find the device name manually. I
> even considered adding support for enumerating ports in libdivecomputer,
> but it turned out to be pretty difficult to implement correctly. On
> Windows the enumeration api is different for each Windows version, on
> Linux I don't know how to do it all, and Mac OS X probably has an api
> for it too, but I'm not very familiar with it.
On Linux, you'd go through /dev/tty* and ignore those with just a
numeric identifier (virtual consoles). The most common patterns are
ttyS* (traditional serial ports), ttyUSB* (USB-serial converters) and
ttyACM* (USB modem class devices I think). There's also /dev/rfcomm*
for bluetooth devices, but I don't think those are relevant here.
> So in the end, I just didn't try to implement this.
>> Of course of different dive computer cables require different device
>> names we may need to change the DC selector that we have today into
>> something more like "Suunto (Gecko, Vyper Family, etc) with Suunto
>> cable", "Suunto (Gecko, Vyper Family, etc) with Idea cable", ...
> With a list of the available ports on the system, that shouldn't be
> necessary. It's very unlikely a user will have multiple types of cables
> connected at the same time, so normally the list will contain just one
While there's perhaps likely to be only one dive computer cable, there
may be other serial ports as well. USB-serial converters are fairly
popular with all kinds of embedded devkits, although I'd imagine the
users of those know what they have connected to their system. Windows
machines might also have all sorts of random virtual serial ports.
Not that listing the available ports would be a bad idea, but having
more than one port is a very real possibility.
More information about the subsurface