You are on page 1of 2

If you have an earlier version installed, de-installation is recommended ("make uninstall"). Several file locations changed in 1.1.

0, old ones might be orphaned if not taken care of. If you have a version after 1.1.0 you can just update and overwrite all existing files. Important: you need "tcl" for the wrapper script to work; if you enter "tclsh" a nd you get a "%" prompt, you are set (to exit enter "exit"). The "tcl" package i s part of all distributions I know. Alternatively - if your resources are constrained - you can use the jimsh, a fas t small tclsh replacement. From version 1.1.6 the Tcl wrapper script is compatib le with it. Unpack the source file of the program (who might have thought!). In the newly cr eated directory run as root or superuser: # make install This installs a small shell script for udev, the larger wrapper script, a config file, the man page and the freshly compiled binary. Now do the same for the data package. It will install the config files in /etc/u sb_modeswitch.d and the udev rule file in /lib/udev/rules.d. You are set already; if your device is known, you should be able to just plug it and use it. If it doesn't work right away we'll find out why. For manual use just install the program. Work with the command line interface or with the original setup reference file. To do the latter you put "usb-modeswitc h.setup" into "/etc" and edit it according to your hardware. It's heavily commen ted and should tell you what to do. The setup file can have any name and place; just tell usb_modeswitch how to find it with the -c parameter. Manual use is intended for testing and analyzing. See next paragraph. How to use In most cases, you should be able to use your device without any interaction exc ept plugging your device in. For testing, debugging and taming new devices from the wild, you can use the bin ary part of USB_ModeSwitch in manual mode. There are two ways for that: using a config file or using the command line. Run "usb-modeswitch -h" to list the command line parameters. If any of them exce pt -W, -D, -I and -q are used, a config file given with -c is ignored and all ma ndatory parameters have to be provided on the command line. See also the include d man page. To work with a config file, use one of the little files in /etc/usb_modeswitch.d or create one yourself. Then give the path and file name to usb_modeswitch with the -c option. You also can have a look into the device_reference.txt (gzipped) for hints about model families and an explanation of the parameters. Important: USB_ModeSwitch - like all programs ot (or with "sudo") when calling it manually. urn up and things won't work. When trying out it's probably easier to work at a root shell ). using libusb - has to be run as ro Otherwise strange error messages t switching commands and strategies, for a while ("sudo bash" or "su -"

The automatic approach consists of several components working together, listed i n the logical order of usage: /lib/udev/rules.d/40-usb_modeswitch.rules - the udev rules starting the wrapper if a known device ID (vendor/product) is recognized. If the switched device provides standard serial ports, a second rule calls the w

rapper again and adds a symbolic link to the correct connection port (see below) /lib/udev/usb_modeswitch - a shell script forking to the real wrapper script. Ve rsion 1.1.6 is fully compatible with the "dash" shell used in Ubuntu as well as older "bash" variants. /usr/sbin/usb_modeswitch_dispatcher - this is doing additional device checking a nd then using the binary to switch with the selected device config file. For thi s to work, the "tcl" package is needed on the system. /etc/usb_modeswitch.conf - a global config file to enable extensive logging when troubleshooting, or to disable switching alltogether (mostly to access the inst all part of devices) /etc/usb_modeswitch.d - a folder containing the individual setup information fil es per device, named according to the IDs and possibly further identity tokens ( to resolve known ambiguities). If your device ID shows up in one of the file nam es, chances are your device is supported even if the model or brand does not mat ch. /usr/sbin/usb_modeswitch - the binary program effectively doing the switch After switching and driver-loading, it is the responsibility of the system to di scover the new (mostly serial) device. When dealing with wireless devices, there may be issues with NetworkManager (or its ModemManager component) which does not seem to be overly reliable when tryin g to auto-detect a proper modem port. Good results were reported by working with wvdial, UMTSmon and several tools pro viding a user interface to PPP like kppp; some of these programs may require a b it of basic knowledge though. There is also a new - unusual but intriguing - concept which shortcuts the tedio us path of putting together all components for a successful wireless broadband c onnection. The Sakis3G tool is a self-containing script (including among others the latest USB_ModeSwitch binary). It supports quite a number of providers alrea dy and is rapidly expanding. The beauty of it is that no installation is necessa ry and only a minimum of input required. Contrary to NetworkManager, it really d elivers. Check it out at Sakis' blog ToDo Forever. There is even a HowTo for setting it u p so that it connects right away when a modem is plugged in. The main hurdle for NetworkManager and others to a fully automated use of a newl y switched modem is to find the right port for connecting. Often more than one s erial port is created after switching (even up to five). Generally, not all of t hem are really standard serial (the driver can't decide), some may look like it and even accept AT commands, but usually the right one is providing an interrupt transfer endpoint. Unfortunately, NetworkManager does rely on other ways of pro bing for the correct port and sometimes fails. It is worth to note that the said Sakis3G tool is able to find this port quite easily. Starting from version 1.1.2, usb_modeswitch will add a symbolic link to the corr ect port with interrupt transfer if the device provides standard serial ports. T he link will have the name /dev/gsmmodem, with a number appended if more than on e device is attached. You can use this name with connection helpers like wvdial. Note that in many cas es you may have to edit the configuration file manually. If you managed to get a new or badly supported device to switch correctly in man ual mode, you can add a udev rule and a config file yourself. But please report it back to share it !! See Contribute.

You might also like