From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GDhYN-0002yO-QD for garchives@archives.gentoo.org; Thu, 17 Aug 2006 13:04:56 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k7HD1h98015949; Thu, 17 Aug 2006 13:01:43 GMT Received: from newton.gmurray.org.uk (newton.gmurray.org.uk [81.2.114.237]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k7HCwCsY026602 for ; Thu, 17 Aug 2006 12:58:12 GMT Received-SPF: pass (newton.gmurray.org.uk: domain of graham@gmurray.org.uk designates 127.0.0.1 as permitted sender) receiver=newton.gmurray.org.uk; client-ip=127.0.0.1; helo=newton.gmurray.org.uk; envelope-from=graham@gmurray.org.uk; x-software=spfmilter 0.97 http://www.acme.com/software/spfmilter/ with libspf2-1.0.0; Received: from newton.gmurray.org.uk (graham@localhost [127.0.0.1]) by newton.gmurray.org.uk (8.13.8/8.13.8) with ESMTP id k7HCwBd3003253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Aug 2006 13:58:11 +0100 X-DKIM: Sendmail DKIM Filter v0.5.1 newton.gmurray.org.uk k7HCwBd3003253 DKIM-Signature: a=rsa-sha1; c=relaxed/simple; d=gmurray.org.uk; s=in200507; t=1155819491; bh=ZpNUjCxOH+XvzO43XJ/aqLwSQSE=; h=Received: X-Authentication-Warning:From:To:Subject:X-Hashcash:Date: Message-ID:User-Agent:MIME-Version:Content-Type; b=JtoCeOH4tiLH8Qyf S8fYVVQ6gCG63X8uBXDfGQnUFFxnrnZzi52tHv5FclIb/dtHSgcD9/gtVapfBFhL1hu EUg== Received: (from graham@localhost) by newton.gmurray.org.uk (8.13.8/8.13.8/Submit) id k7HCwB2T003252; Thu, 17 Aug 2006 13:58:11 +0100 X-Authentication-Warning: newton.gmurray.org.uk: graham set sender to graham@gmurray.org.uk using -f From: Graham Murray To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] udev and multiple usb-serial devices X-Hashcash: 1:22:060817:gentoo-user@lists.gentoo.org::w2KVl/CSZDK8Aa4x:000000000000000000000000000000000HN61 Date: Thu, 17 Aug 2006 13:58:11 +0100 Message-ID: <87ejvfpli4.fsf@newton.gmurray.org.uk> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archives-Salt: 1870579c-e866-4600-8616-b68d9d720651 X-Archives-Hash: 5fed50cff75c0bd6ab58ec912b52a1ab Is there any logic to the order in which usb-serial devices are enumerated when a system starts? When using multiple usb-serial devices, the program(s) have to know to which port each particular external device is connected. When initially connecting, the first to be plugged in will be /dev/ttyUSB0 and so on. Having connected them all, looking at the output of udevinfo, I can see the bus address to which each port is connected and can create udev rules to create aliases to 'fixed' names which the programs can reference. However when the system was restarted, the mappings were wrong and the bus addresses for some of the ports were swapped. I expected the /dev/ttyUSBx names to change, that is why I tried mapping to the bus ID (eg 1-4.1:1.0). Is there any way to write udev rules which will map the usb-serial device connected to a particular socket on either the PC or a hub to a known name? So that if the usb connector is removed and replaced (in the same socket) or the system is rebooted that programs will be able to open the correct device connected to each usb serial adaptor? -- gentoo-user@gentoo.org mailing list