I'm using kernel 2.6.24, udev version 100, usb-modeswitch v.1.1.7.
Everything works automatically only if I have udev running in debug mode and I have usb-modeswitch logging turned on. If either of those are NOT turned on, usb-modeswitch only works by invoking it manually.
Any suggestions on why this is happening?
SOLVED: Everything works, but only in debug mode
Last edited by linuxgeek on 20 Jul 2011, 21:43, edited 1 time in total.
I've got this running on an embedded processor and for code base reasons we just can't keep changing kernel versions. So really this is what I have to work with.
As far as udev, upgrading that is tricky as well because it relies on kernel headers that may or may not exist for the kernel version we're running. Getting a newer version to build may not work.
A lot of times on embedded systems we see situations like this where if you are writing things to the terminal such as during debugging that the timing changes enough to make things work. I'm guessing that's maybe what's going on here but I don't know what kind of timing that would be. Time for the device to settle?
That's the part I might need help solving.
As far as udev, upgrading that is tricky as well because it relies on kernel headers that may or may not exist for the kernel version we're running. Getting a newer version to build may not work.
A lot of times on embedded systems we see situations like this where if you are writing things to the terminal such as during debugging that the timing changes enough to make things work. I'm guessing that's maybe what's going on here but I don't know what kind of timing that would be. Time for the device to settle?
That's the part I might need help solving.
If you suspect timing reasons, you could try to insert "after" commands in the dispatcher script. They work like "sleep" statements in bash, but take milliseconds as parameters.
"after 500" will wait for half a second.
The dispatcher is named "usb_modeswitch.tcl" before installing; it will be copied to
"/usr/sbin/usb_modeswitch_dispatcher".
"after 500" will wait for half a second.
The dispatcher is named "usb_modeswitch.tcl" before installing; it will be copied to
"/usr/sbin/usb_modeswitch_dispatcher".
I believe its on the udev side, since when I run only it in debug mode, I can see that usb-modeswitch never gets kicked off. I have substituted other test programs in its place as well and they don't run either.
Still baffling.
BTW: I got udev version 135 to build and it behaves the same as version 100. Significantly newer with same results.
Still baffling.
BTW: I got udev version 135 to build and it behaves the same as version 100. Significantly newer with same results.