49
49
!! You need the usb-modeswitch-data package from the same source as this !!
51
51
If you have an earlier version installed, de-installation is recommended ("make
52
uninstall"). The wrapper script location changed in 1.1.0, old ones might be
53
orphaned in /usr/sbin.
55
Important: you need "tcl" for the wrapper script to work; if you enter "tclsh"
56
and you get a "%" prompt, you are set (to exit type "exit"). The "tcl" package
57
is part of all distributions I know. Use version 8.4 and higher.
58
If you are space-restricted you can also use the "jimsh" mini Tcl interpreter. The
59
Tcl wrapper is compatible with the limited command set of this small shell. Since
60
version 1.1.7 an alternative source package containing jimsh will be provided.
61
The typical size of jimsh is 140 kB, or 70 kB in a compressed file system.
63
To install the tool set, unpack and in the newly created directory use this line
64
at the shell (as root):
68
This installs the small shell script, the dispatcher (wrapper) script, a global
69
config file, the binary and a man page. If you chose the package with jimsh, the
70
Tcl shell is configured, built and installed in the same step, optimized for
73
Install the data package as well and you are set already; if your device is
74
known, you should be able to just plug it and use it. If it doesn't work -
75
we will find out why not.
52
uninstall") but not mandatory. The wrapper script location changed in 1.1.0;
53
old files might be orphaned but will not do any harm.
55
The main prerequisite for installing from source is package "libusb-dev" !!
57
To install the tool set, unpack and run the install command (see below) in the
58
newly created directory.
60
From version 1.2.0, there are three flavours of installing. The only difference
61
between those is the way the dispatcher is installed, but this affects the
64
1. If you have the "Tcl" scripting language available on your system (packages
65
"tcl" or "jimsh"), use the light-weight installation:
69
2. If you are size-constrained and have the Jimsh library on your system
70
(package "libjim-dev"), you can have the Tcl interpreter embedded with the
71
dispatcher, using its shared lib:
75
3. If you are size-constrained and definitely don't need a Tcl interpreter
76
for anything else, choose the statically embedded flavour. This will have
77
no further dependency as it uses the included interpreter code, which is
78
configured for small size:
82
These commands will install a small posix shell script, the dispatcher
83
(wrapper) as script or as binary, a global config file, the core program and
86
Install the data package as well and you are set.
92
If your device is known, you should be able to just plug it and use it. If
93
it doesn't work - we will find out why.
77
95
For manual use just run "usb_modeswitch" (as root). Work with the command
78
96
line interface or with a setup file. You can use any file and give its path
79
97
with the "-c" parameter.
80
The file named "device_reference.txt" that you can find in this package is
81
a device and configuration reference containing most known devices; you can
82
use it as a base to create your own configuration file.
98
The file named "device_reference.txt" that you can find on the home site of
99
this package is a device and configuration reference containing most known
100
devices; you can use it as a "database" to create your own configuration file.
83
101
It's heavily commented and should tell you what to do. It also contains a
84
102
thorough explanation of all the parameters.
86
104
Run "usb_modeswitch -h" to list the command line parameters.
87
105
See also the provided man page.
89
Note: manual use is intended for testing and analyzing !
107
Note: Manual use is mainly intended for testing and analyzing !
91
109
Once your new device is switching fine you can add a rule entry to the rules
92
110
file to let udev run usb_modeswitch as soon as the default IDs are found
96
114
/lib/udev/rules.d/40-usb_modeswitch.rules
98
Then add your new setup file to the folder
99
"/usr/share/usb_modeswitch". And don't forget to report your success !!
116
Then add your new config file to the folder
117
"/etc/usb_modeswitch.d" (only for custom config files!).
118
And don't forget to report your success !!
101
Again, mind that the rules file and the config folder are installed by
102
the usb_modeswitch data package.
120
Again, remember that the rules file and the default device config folder
121
(/usr/share/usb_modeswitch) are installed by the usb_modeswitch data package.
138
Copyright 2007, 2008, 2009, 2010 Josua Dietze (mail to "usb_admin"
157
Copyright 2007, 2008, 2009, 2010, 2011 Josua Dietze (mail to "usb_admin"
139
158
at the domain "draisberghof.de" or write a personal message through the forum
140
to "Josh"; NO SUPPORT QUESTIONS VIA E-MAIL, use the forum!)
142
Command line parsing, decent usage/config output and handling, advanced options
144
Joakim Wennergren (jokedst) (gmail.com)
160
NO SUPPORT QUESTIONS VIA E-MAIL, use the forum!
164
Command line parsing and other essential contributions:
146
167
TargetClass parameter implementation to support new Option devices/firmware:
147
168
Paul Hardwick (http://www.pharscape.org)