USB_ModeSwitch

From Gentoo Wiki
Jump to:navigation Jump to:search

Resources

USB_ModeSwitch is a tool for controlling "flip flop" (multiple devices) USB gear like UMTS sticks.

Hardware detection

Run dmesg in monitor mode:

user $dmesg -w

Plug in the device and check if it gets detected as a new CD-ROM drive. If so, then you have a "flip flop" device and you need USB_ModeSwitch.

Installation

Install sys-apps/usb_modeswitch:

root #emerge --ask usb_modeswitch

Configuration

Note
USB_ModeSwitch is designed to work out-of-the-box. Plug in the device and let udev do the work.

If USB_ModeSwitch doesn't work out-of-the-box, search the internet for a matching config. Use lsusb to detect the device's vendor and product IDs. If you find a config, create a new configuration file using the device's vendor and product IDs, e.g.:

FILE /etc/usb_modeswitch.d/12d1:1446
TargetVendor=0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,1432,1433,1436,14ac,1506,1511"

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

If you don't use udev, you have to run usb_modeswitch manually:

root #usb_modeswitch -c /etc/usb_modeswitch.conf

Result checking

After switching lsusb should detect a different product ID.

If the right drivers are loaded, the proper device files appear. E.g. in the case of the option driver the /dev/ttyUSB* files.

Troubleshooting