Re: [Owfs-developers] tty2usb

2014-10-07 Thread Stefano Miccoli
Paul, you are right: in /sys/bus/usb-serial you will find only UART-over-USB devices, which are named /dev/ttyUSB%d /dev/ttyACM%d are instead "real" modems, conforming to the USB "Communication Device Class Abstract Control Model" (USB CDC ACM). (This means that they should respond to AT comm

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Paul Alfille
Hi Stefano, /sys/bus/usb-serial/devices doesn't seem to pick up ttyACM? devices, but does discover some devices I missed. Actually the two methods give quite different results on my machine: #-tty2usb output = 6 devices-- paul@hz tty2usb-code$ ./tty2usb List tty -> USB pairings

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Michael Markstaller
My 5ct & how I currently do it (for 6+ years, 2x weather-stations, DMX ir, x10, heat-pump, vents, and three different 1w-bm on a single host): PL2303(they have no serial# but are working reliable & are cheap) - udev-rules, Port/Bus/Devid: very error prone. Things depend on the reboot-pattern, if y

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Jerry Scharf
Hi, I haven't decided whether this is a good or terrible idea, so I'm just throwing it out there. If I know that a given 1-wire device serial number is on a given bus, can we use that for mapping things consistently. I am in particular thinking that some masters and switches have serial numbe

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Paul Alfille
Hi Michael, There are two possible uses for the usb<->tty mapping. 1. Discovery -- find a unique USB device (HobbyBoards, Eclo, etc) and then find the tty port to use. 2. Tune a FTDI device when the /dev/tty port is passed to owfs. You're right, of course. Probing an anonymous serial device is u

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Michael Markstaller
Hi Paul, this is very interesting (one has 3x FTDI with 2-4 ports and 7x PL2303) and so I installed it straight away on several boxes. I suffer from this problem, that the kernel (or BIOS or whoever..) assigns different Bus/Device-IDs (and therefore tty) to the same device depending on: - cold(po

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Stefano Miccoli
(disclaimer: I'm no linux kernel expert, so my post may turn out to be inaccurate). AFAIK sysfs is a linux kernel feature, independent of the availability of udevd, so navigating /sys/ is the "canonical" way of obtaining info on kernel objects and attributes. (And yes, it is the kernel that en

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Der Tiger
Hi, > 1. Recursively search /sys/devices for "busnum" (which seems to > indicate a USB device) Which, IMHO, would suggest devd or udevd to be required, since the enumeration is done by the daemon. BTW: I'm not sure, but "busnum" could be used by I2C device drivers, as well. You (or someone) may w

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Paul Alfille
I don't now. That's why I'm curious to hear about experiences. It should be easy to build anywhere. The algorithm used is simple: 1. Recursively search /sys/devices for "busnum" (which seems to indicate a USB device) 2. Recursively search from each busnum directory for tty[A-Za-z]* (which indicat

Re: [Owfs-developers] tty2usb

2014-10-06 Thread Colin Law
On 6 October 2014 04:30, Paul Alfille wrote: > After all the discussion about serial and usb pairing, I created a new > little program that does it, called tty2usb > > http://sourceforge.net/projects/tty2usb > > Currently it only works on linux, but OSX and freebsd would be useful to > add. > > Ex