Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
martinb
Posts: 1
Joined: 06 Oct 2014, 16:37

usb_modeswitch not triggering without modification

Post by martinb » 06 Oct 2014, 16:47

Hi all,

I'm using USB_ModeSwitch (version 2.1.0) on an embedded device. It does work, but not without modification.

For every device I need to modify the udev rules file, for example:

From:
# TP-Link MA180
ATTR{idVendor}=="2357", ATTR{idProduct}=="0200", RUN+="usb_modeswitch '%b/%k'"

To:
# TP-Link MA180
ATTR{idVendor}=="2357", ATTR{idProduct}=="0200", RUN+="/usr/sbin/usb_modeswitch -v 0x2357 -p 0x0200 -c /usr/share/usb_modeswitch/2357:0200"

The thing is; I don't understand why - and I can't seem to find any descriptions of similar problems on Google - or on here.

Thanks,

Martin

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb_modeswitch not triggering without modification

Post by Josh » 20 Oct 2014, 08:01

martinb wrote:The thing is; I don't understand why - and I can't seem to find any descriptions of similar problems on Google - or on here.
The udev rules do not call the usb_modeswitch binary directly. They run the shell script
"/lib/udev/usb_modeswitch" which in turn calls the wrapper usb_modeswitch_dispatcher. See also the main usb_modeswitch page (link at the top), paragraph "How to use".

Usually, you don't have to care about this at all. If it does not work, please provide more information about your system. Did you install usb_modeswitch from source? If not, please point to the respective install package.

Post Reply