|
From: Johan S. <jo...@st...> - 2014-09-22 07:00:08
|
On 22/09/14 00:21, Robin Gilks wrote: >> 1. Trying to resolve a serial port TTY name (i.e. /dev/cuaU1 on FreeBSD) >> to a potential USB device is probably doable, but not without a lot of >> effort and OS specific code. >> I don't think it's worth trying to go down that road. >> > How about using udev on Linux (is there an equivalent on other OSes?) that > creates a symlink to a device node with a unique name from the type (FTDI) > and bus number and OWFS looks for that specific device name. > > Just an idea (had to do that years ago with serial devices to sort out a > connection to a weather station and an IR blaster, never sure what device > names each would come up with!). > > I have a similar setup myself, using FreeBSD's devd. It uses my known, hard-coded USB serials to set up a symlink from /dev/cua-linkusb to /dev/cuaXXX when device is detected, to easier find which tty device I should be using for what (I think I have ~4 serial ports on my box) However, this doesn't solve the auto-deteciton problem, the user still needs to manually tell which USB device to be used, by serial-no or otherwise. And if that has to be done, it could just as well be done directly in owfs. |