Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2013 09:10:08 +1030
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        dweimer@dweimer.net
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Locking USB Serial Device to Specific Com port
Message-ID:  <51045B48.40202@ShaneWare.Biz>
In-Reply-To: <762f51b7c30dd5c920788336b3eb4fa5@dweimer.net>
References:  <762f51b7c30dd5c920788336b3eb4fa5@dweimer.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27/01/2013 08:15, dweimer wrote:

> I would like to lock down the USB serial port adapter used on the UPS to
> /dev/cuaU0, to make sure the UPS is always monitored and I will get a
> clean shutdown in event of a power failure.
>
> I believe that this requires setting a hint line of some sort in the
> /boot/loader.conf file, but I am having trouble tracking down what this
> should be, or maybe I am on the wrong track.  Here is the current
> information from the adpapters, the UPS adapter was connected at boot,
> is on /dev/cuaU0, the other one was plugged in after boot, and is on
> /dev/cuaU1.

start with man devd.conf

You can add your own devd files in /usr/local/etc/devd/
Something along the lines of -

attach 200 {
	device-name "cuaU[0-9]+";
	match "vendor" "0x067b";
	match "product" "0x2303";
	action "sleep 2; cd /dev; ln -s ${device-name} upsmonitor";
};

use usbconfig to get info. I am thinking with the similarity of the two
you may need to rely on bus and hubaddr or devaddr to keep each device
identified by usb port location.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51045B48.40202>