I started adding USB ids to a shell script which echos the USB product / ID into /sys/bus/usb-serial/drivers/option1/new_id if appropriate.
Unfortunately, you can receive many hotplug events for a single device insertion so I wrote a program which will "compress" all of the matching events into a single event, and call /sbin/usb-added with the USB product / id which was added. It's fairly clean, but it is by no means complete. -M On Mon, 2010-10-25 at 18:20 +0200, Daniel Golle wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi benjamin! > afaik the creation of /dev/serial, /dev/disk, ... symlinks is done by > udev and therefore requires udev installed. > while this could solve the problem, it occupies 166kB (which is more > than all needed USB-serial kernel modules together...) > i tried that anyway. however, after installing the udev package, udevd > doesn't get started during boot and this seems to be an architectural > problem already discussed a couple of years ago (see @9412). starting > udevd manually and then re-plugging the usb wwan does create the > symlink, but this doesn't solve the problem. (i.e. hotplug after udevd > is started works, but coldpluged devices are not getting processed by > udevd as it is started afterward) > according to it's author, running hotplug2 and udevd together is not > really a good idea anyway, see > http://svn.nomi.cz/svn/isteve/hotplug2/README. > > i guess i should get hotplug2 to create those symlinks then. in order to > be able to do this, hotplug2 has to be extended to provide the info from > sysfs (path inside /sys/devices, idVendor, idProduct) to the > rule-scripts which could then create meaningful persistent symlinks. > everybody agree so far? any better way to do the same? > > cheers > > daniel _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
