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