From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josua Dietze Date: Mon, 09 Aug 2010 22:37:23 +0000 Subject: Environment woes Message-Id: <4C608323.5010502@draisberghof.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi everyone, I am in need of a friendly hint regarding a delicate matter ... I maintain a Linux tool to put USB devices from one mode (or state) to the other. Many wireless sticks support that "feature", showing up as a storage device and providing their Windows drivers onboard. To be used as modems they are switched by these drivers (once they are installed) to their second mode. This can be handled in Linux and is properly tested. Usually there is more than one interface exposed after the mode switch, but only one is suitable for a wireless connection; binding the GSM driver ("option") or the generic serial driver will add multiple ports though (ttyUSB). Up to now I have used a rule to add a symlink to the "right" port; the check is done by a script via "PROGRAM". If the port is not right, the result of the script is empty, thus no symlink: ACTION="add", KERNEL="ttyUSB*", PROGRAM="