[elrepo] kmod-option, buggy?

Alan Bartlett ajb at elrepo.org
Thu Dec 17 10:36:22 EST 2009


2009/12/13 Clinton Lee Taylor <clintonlee.taylor at gmail.com>:

>  Using kmod-option, so that we can use a USB Dongle Huawei E220 3G
> device, I have found that first time we connect the USB device, it
> works fine, but if we remove the USB device and reconnect it without
> unloading module option, then the /dev/ttyUSB0 and /dev/ttyUSB1 don't
> come back.  If I unload module option and reconnect, then all works
> fine.

How about writing a udev rule for the device?

With the E220 device connected to your system, use the udevinfo
command to examine the information related to it that has been created
under the /sys/ directory.

Then create a file, say 99-Huawei-E220.rules, owner/group == root,
mode == 0644, in your /etc/udev/rules.d/ directory with contents
something like the following --

[quote]
SUBSYSTEM=="usb", ATTRS{model}=="whatever", RUN+="/sbin/modprobe -r
option 2>/dev/null; /sbin/modprobe option"
[/quote]

(I have typed one line above -- if a new-line is inserted, it is the
MTA effect and should be disregarded.)

Obviously that rule is incomplete. You will need to read up on udev
rule creation [1] and decide the correct means to identify when the
device is plugged in.

Alan.

[1] http://www.reactivated.net/writing_udev_rules.html



More information about the elrepo mailing list