Debian Codegraph @

REFERENCE

raw
1 Configuration File Reference for USB_ModeSwitch
2 -----------------------------------------------
3
4 Last modified: 2019-11-26
5
6
7
8 General Rules:
9
10 Numbers can be decimal or hexadecimal, Bulk message strings must be
11 hexadecimal without prepended "0x". Digits 9-16 (message tag) in
12 mass storage messages (which start with "55534243") are random; I set
13 them to "12345678". Note that you must make them unique if more than
14 one MessageContent is used.
15
16 -> ALL MISTYPED PARAMETERS AND OTHER ENTRIES ARE SILENTLY IGNORED <-
17
18
19
20 Parameter Reference:
21
22 Note: if there is a matching command line flag for any of the parameters
23 then it is appended to the respective line. For the full command line
24 parameter reference see the usb_modeswitch(1) man page.
25
26
27 * DefaultVendor -v <hex number>
28 * DefaultProduct -p <hex number>
29
30 This is the ID the USB device shows after having been plugged in.
31 The program needs this, either on the command line or in the config
32 file; if not found -> no action.
33
34 Note: newer config files do not contain these parameters because of
35 the redundancy with regard to the config file name.
36
37
38 * TargetVendor -V <hex number>
39 * TargetProduct -P <hex number>
40
41 These are the IDs of the USB device after successful mode switching.
42 They are optional, but required for a proper success check
43
44
45 * TargetProductList <comma separated hex strings without "0x">
46
47 Like TargetProduct, but multiple targets
48
49
50 * TargetClass -C <hex number>
51
52 Some devices don't change their ID, only their layout. To check for a
53 successfull mode switch, the class of the first interface is checked
54
55
56 * MessageEndpoint -m <hex number>
57 * ResponseEndpoint -r <hex number>
58
59 A kind of address inside the interface to which the "message"
60 (the sequence that does the actual switching) is directed or
61 from which the reply is read if NeedResponse is active.
62 OBSOLETE since version 0.9.7 due to autodetection, only useful for
63 testing
64
65
66 * MessageContent -M <hex string>
67
68 A hex string containing the "message" sequence; it will be
69 sent as a USB bulk transfer
70
71
72 * MessageContent2, ...3 -2/-3 <hex string>
73
74 Additional "messages". Use with "NeedResponse"!
75
76
77 * ReleaseDelay -w <milliseconds>
78
79 Waiting time after message transfers. Helps with some sensitive devices
80 that don't want any traffic after the mode switch initialisation
81
82
83 * NeedResponse <0/1> -n
84
85 Some devices were reported to require receiving the response of the
86 bulk transfer to do the switching properly. Usually not needed.
87
88
89 * DetachStorageOnly <0/1> -d
90
91 Some early devices just needed to be detached from the usb-storage
92 driver to initiate the mode switching. Now practically obsolete for
93 switching, but still comes handy sometimes
94
95
96 * StandardEject <0/1> -K
97
98 Sends a specific bulk message sequence representing the SCSI commands
99 "ALLOW MEDIUM REMOVAL" and "START STOP UNIT", basically an eject
100 action. Many modems are using this for mode switching.
101 Can be combined with one additional 'MessageContent'
102
103
104 * HuaweiMode <0/1> -H
105
106 Some early Huawei devices can be switched by a special control
107 message. Don't use with recent devices
108
109
110 * HuaweiNewMode <0/1> -J
111
112 The standard for many newer Huawei devices. Sends a specific bulk message,
113 but different target layouts may be reached with variants of that
114 message; use MessageContent for these
115
116
117 * HuaweiAltMode <0/1> -X
118
119 An alternative to the Huawei standard, recommended by the manufacturer for
120 the Android OS. Sends a different bulk message which brings newer modems
121 into NCM mode (well supported in Linux) and older ones into plain PPP mode.
122 Also globally settable with HuaweiAltModeGlobal in /etc/usb_modeswitch.conf
123
124
125 * OptionMode <0/1> -U
126
127 The standard for all devices by Option. Sends a specific bulk message
128
129
130 * SonyMode <0/1> -O
131
132 Some Sony-Ericsson devices can be switched by a special control
133 message. May take a long time (20+ seconds).
134
135
136 * SierraMode <0/1> -S
137 * KobilMode <0/1> -T
138 * GCTMode <0/1> -G
139 * SequansMode <0/1> -N
140 * MobileActionMode <0/1> -A
141 * QisdaMode <0/1> -B
142 * QuantaMode <0/1> -E
143 * BlackberryMode <0/1> -Z
144 * CiscoMode <0/1> -L
145
146
147 Flags to support devices that need special control messages.
148 The names are referring to the respective manufacturers.
149
150
151 * PantechMode -F <num value>
152
153 Extended flag for Pantech devices offering multiple target modes. Not
154 all models were confirmed to support all modes. Possible values are:
155
156 1 - Automatic choice, checks for MBIM driver availability (recomm.)
157 2 - forced RNDIS mode
158 3 - forced CDC Ether mode (internal switch, no usb_modeswitch action)
159 4 - forced MBIM mode
160
161 Note: the -F parameter value for usb_modeswitch is directly used as
162 wValue in the control message!
163
164
165 * ResetUSB <0/1> -R
166
167 Few devices or systems need a rougher treatment. If the switching seems
168 to do something but your system does not reflect it, try this somewhat
169 brutal method to do a reset after switching. May also be useful for
170 all kinds of experiments
171
172
173 * Configuration -u <hex number>
174
175 Some devices are doing the "right" thing and provide different layouts
176 in the standard-compliant way. They don't "restart", so don't have to be
177 rediscovered by the system after the change. Strictly speaking, they are
178 not doing a mode switch
179
180
181 * Interface -i <hex number>
182 * AltSetting -a <hex number>
183
184 More USB parameter to help with tricky devices and for doing lots
185 of cruel experiments; usually not needed ...
186
187
188 Note:
189 AltSetting/Configuration changes and ResetUSB are executed after all
190 other steps and can be combined or used on their own (e.g. a reset
191 might have the same effect as a manual replug)
192
193
194 * InquireDevice <0|1> -I (enables inquiry)
195
196 Formerly printed out SCSI device attributes. Obsolete and ignored since
197 usb_modeswitch version 2.3.0.
198
199
200 * CheckSuccess -s <number>
201
202 Check continuously if the switch succeeded for max <number> seconds.
203 If the target ID is given, the check waits for it to appear.
204 Otherwise, the check waits for the device to "go away"; most devices
205 vanish after switching and can't be accessed anymore. It also checks
206 the bus/device count, trying to determine if the device "came back"
207
208 Note: this feature is not used in the full-featured Linux package of
209 usb_modeswitch where the success check is done by the wrapper script
210
211
212 * NoDriverLoading <0|1> (no command line parameter)
213
214 (Obsolete, ignored since usb_modeswitch 2.4.0)
215 The binary tells the wrapper script NOT to check for and initiate
216 binding of the serial driver after switching.
217 Mostly useful for non-modem devices and newer modems which do not use
218 the serial driver.
219
220
221 * WaitBefore <seconds> (no command line parameter)
222
223 Waiting time before taking any action. Helps with some sensitive setups.
224
225
226 * NoMBIMCheck <0|1> (no command line parameter)
227
228 Disable the check for devices providing the MBIM standard; this check
229 is otherwise done by default. See /etc/usb_modeswitch.conf from the
230 program package for a global setting regarding this.
231 The usb_modeswitch wrapper will test if a device has a configuration
232 according to the MBIM standard. If so, it will search for the matching
233 kernel driver. It it's available, the device will be configured for
234 MBIM usage which is preferable to other modes and configurations
235
236 --