[elrepo] kmod-option, buggy?

Clinton Lee Taylor clintonlee.taylor at gmail.com
Fri Dec 18 06:27:52 EST 2009


Greetings ...

2009/12/17 Dag Wieers <dag at wieers.com>:
> On Thu, 17 Dec 2009, Alan Bartlett wrote:
>
>> 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?
 I did do that ...

>> 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.
 Wrote two rules ... One to start the 3G modem on plugged in and a
second, to remove the option module, so that when been plugged back
in, it should start it up again ...

> You first have to test whether the problem is only the missing device node
> entry, or in fact a module issue. In general it is a bad idea to
> unload/reload a module from udev. I can imagine the module load to generate
> another udev event, causing another unload, reload ad infinitum.
 Yes, I did run into this problem, which I then create a script to run
and accept a timeout, before doing what ever needed to be run, so that
it would not freak out ... Not perfect, but it works, with some odd
problems ... Would be great to have to not hack the system ...

> If the problem is just that upon connecting the USB device the device nodes
> are not created, then you need a udev rule for creating them. That's how it
> is supposed to be on Linux nowadays, so not a module problem in se.
 Mmm, I'm not sure about this as a problem ... I would believe that if
it worked on the first plug-in, then when it got removed, I would
believe that it should work once plugged back in again ... Having to
modprobe -r option, is a bug, but I can't seem to find any version
later that 0.7.2, that EL Repo is packaging ... Otherwise, I would try
and repackage and test further, but I seem to be unable to find more
stuff ...

Thanks for all the help.

Mailed
LeeT



More information about the elrepo mailing list