From owner-freebsd-questions@FreeBSD.ORG Sat Jan 26 21:46:03 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 04D81A05 for ; Sat, 26 Jan 2013 21:46:03 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id ABED4EE for ; Sat, 26 Jan 2013 21:46:02 +0000 (UTC) Received: from www.dweimer.net (webmail.dweimer.local [192.168.5.1]) by webmail.dweimer.net (8.14.5/8.14.5) with ESMTP id r0QLjsvN054824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 26 Jan 2013 15:45:54 -0600 (CST) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 26 Jan 2013 15:45:54 -0600 From: dweimer To: FreeBSD Questions Subject: Locking USB Serial Device to Specific Com port Organization: dweimer.net Mail-Reply-To: Message-ID: <762f51b7c30dd5c920788336b3eb4fa5@dweimer.net> X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/0.8.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dweimer@dweimer.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 21:46:03 -0000 I have two USB Serial adapters I use on my web server, ones always connected, to allow NUT to monitor my UPS. The other I use to view the console of my pfSense firewall, however I sometimes disconnect this one to use it with my laptop to configure switches. Because this one is unplugged and plugged back in, sometimes on reboot it ends up switching its com port with the UPS, so NUT fails to start and the UPS is unmonitored. 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. dmesg output: ugen0.2: at usbus0 uplcom0: on usbus0 ugen0.3: at usbus0 uplcom1: on usbus0 sysctl -a | grep uplmon: device uplcom hw.usb.uplcom.debug: 0 dev.uplcom.0.%desc: Prolific Technology Inc. USB-Serial Controller, class 0/0, rev 1.10/3.00, addr 2 dev.uplcom.0.%driver: uplcom dev.uplcom.0.%location: bus=1 hubaddr=3 port=0 devaddr=2 interface=0 dev.uplcom.0.%pnpinfo: vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00 sernum="" release=0x0300 mode=host intclass=0xff intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 dev.uplcom.0.%parent: uhub0 dev.uplcom.0.ttyname: U0 dev.uplcom.0.ttyports: 1 dev.uplcom.1.%desc: Prolific Technology Inc. USB-Serial Controller, class 0/0, rev 1.10/3.00, addr 3 dev.uplcom.1.%driver: uplcom dev.uplcom.1.%location: bus=1 hubaddr=1 port=0 devaddr=3 interface=0 dev.uplcom.1.%pnpinfo: vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00 sernum="" release=0x0300 mode=host intclass=0xff intsubclass=0x00 intprotocol=0x00 ttyname=U1 ttyports=1 dev.uplcom.1.%parent: uhub0 dev.uplcom.1.ttyname: U1 dev.uplcom.1.ttyports: 1 Does anyone have any suggestions on how to do this? -- Thanks, Dean E. Weimer http://www.dweimer.net/