File: REFERENCE

package info (click to toggle)
usb-modeswitch-data 20191128-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,324 kB
  • sloc: tcl: 53; makefile: 37; sh: 19
file content (236 lines) | stat: -rw-r--r-- 7,419 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
Configuration File Reference for USB_ModeSwitch
-----------------------------------------------

Last modified: 2019-11-26



General Rules:

Numbers can be decimal or hexadecimal, Bulk message strings must be
hexadecimal without prepended "0x". Digits 9-16 (message tag) in
mass storage messages (which start with "55534243") are random; I set
them to "12345678". Note that you must make them unique if more than
one MessageContent is used.

-> ALL MISTYPED PARAMETERS AND OTHER ENTRIES ARE SILENTLY IGNORED <-



Parameter Reference:

Note: if there is a matching command line flag for any of the parameters
then it is appended to the respective line. For the full command line
parameter reference see the usb_modeswitch(1) man page.


* DefaultVendor            -v <hex number>
* DefaultProduct           -p <hex number>

This is the ID the USB device shows after having been plugged in.
The program needs this, either on the command line or in the config
file; if not found -> no action.

Note: newer config files do not contain these parameters because of
the redundancy with regard to the config file name.


* TargetVendor             -V <hex number>
* TargetProduct            -P <hex number>

These are the IDs of the USB device after successful mode switching.
They are optional, but required for a proper success check


* TargetProductList        <comma separated hex strings without "0x">

Like TargetProduct, but multiple targets


* TargetClass              -C <hex number>

Some devices don't change their ID, only their layout. To check for a 
successfull mode switch, the class of the first interface is checked


* MessageEndpoint          -m <hex number>
* ResponseEndpoint         -r <hex number>

A kind of address inside the interface to which the "message"
(the sequence that does the actual switching) is directed or
from which the reply is read if NeedResponse is active.
OBSOLETE since version 0.9.7 due to autodetection, only useful for
testing


* MessageContent           -M <hex string>

A hex string containing the "message" sequence; it will be
sent as a USB bulk transfer


* MessageContent2, ...3    -2/-3 <hex string>

Additional "messages". Use with "NeedResponse"!


* ReleaseDelay             -w <milliseconds>

Waiting time after message transfers. Helps with some sensitive devices
that don't want any traffic after the mode switch initialisation


* NeedResponse <0/1>       -n

Some devices were reported to require receiving the response of the
bulk transfer to do the switching properly. Usually not needed.


* DetachStorageOnly <0/1>  -d

Some early devices just needed to be detached from the usb-storage
driver to initiate the mode switching. Now practically obsolete for
switching, but still comes handy sometimes


* StandardEject <0/1>      -K

Sends a specific bulk message sequence representing the SCSI commands
"ALLOW MEDIUM REMOVAL" and "START STOP UNIT", basically an eject
action. Many modems are using this for mode switching.
Can be combined with one additional 'MessageContent'


* HuaweiMode <0/1>         -H

Some early Huawei devices can be switched by a special control
message. Don't use with recent devices


* HuaweiNewMode <0/1>      -J

The standard for many newer Huawei devices. Sends a specific bulk message,
but different target layouts may be reached with variants of that
message; use MessageContent for these


* HuaweiAltMode <0/1>      -X

An alternative to the Huawei standard, recommended by the manufacturer for
the Android OS. Sends a different bulk message which brings newer modems
into NCM mode (well supported in Linux) and older ones into plain PPP mode.
Also globally settable with HuaweiAltModeGlobal in /etc/usb_modeswitch.conf


* OptionMode <0/1>         -U

The standard for all devices by Option. Sends a specific bulk message


* SonyMode <0/1>           -O

Some Sony-Ericsson devices can be switched by a special control
message. May take a long time (20+ seconds).


* SierraMode <0/1>         -S
* KobilMode <0/1>          -T
* GCTMode <0/1>            -G
* SequansMode <0/1>        -N
* MobileActionMode <0/1>   -A
* QisdaMode <0/1>          -B
* QuantaMode <0/1>         -E
* BlackberryMode <0/1>     -Z
* CiscoMode <0/1>          -L


Flags to support devices that need special control messages.
The names are referring to the respective manufacturers.


* PantechMode              -F <num value>

Extended flag for Pantech devices offering multiple target modes. Not
all models were confirmed to support all modes. Possible values are:

    1 - Automatic choice, checks for MBIM driver availability (recomm.)
    2 - forced RNDIS mode
    3 - forced CDC Ether mode (internal switch, no usb_modeswitch action)
    4 - forced MBIM mode

Note: the -F parameter value for usb_modeswitch is directly used as
wValue in the control message!


* ResetUSB <0/1>           -R

Few devices or systems need a rougher treatment. If the switching seems
to do something but your system does not reflect it, try this somewhat
brutal method to do a reset after switching. May also be useful for
all kinds of experiments


* Configuration            -u <hex number>

Some devices are doing the "right" thing and provide different layouts
in the standard-compliant way. They don't "restart", so don't have to be
rediscovered by the system after the change. Strictly speaking, they are
not doing a mode switch


* Interface                -i <hex number>
* AltSetting               -a <hex number>

More USB parameter to help with tricky devices and for doing lots
of cruel experiments; usually not needed ...


Note:
AltSetting/Configuration changes and ResetUSB are executed after all
other steps and can be combined or used on their own (e.g. a reset
might have the same effect as a manual replug)


* InquireDevice <0|1>      -I (enables inquiry)

Formerly printed out SCSI device attributes. Obsolete and ignored since
usb_modeswitch version 2.3.0.


* CheckSuccess             -s <number>

Check continuously if the switch succeeded for max <number> seconds.
If the target ID is given, the check waits for it to appear.
Otherwise, the check waits for the device to "go away"; most devices
vanish after switching and can't be accessed anymore. It also checks
the bus/device count, trying to determine if the device "came back"

Note: this feature is not used in the full-featured Linux package of
usb_modeswitch where the success check is done by the wrapper script


* NoDriverLoading <0|1>    (no command line parameter)

(Obsolete, ignored since usb_modeswitch 2.4.0)
The binary tells the wrapper script NOT to check for and initiate
binding of the serial driver after switching.
Mostly useful for non-modem devices and newer modems which do not use
the serial driver.


* WaitBefore <seconds>     (no command line parameter)

Waiting time before taking any action. Helps with some sensitive setups.


* NoMBIMCheck <0|1>        (no command line parameter)

Disable the check for devices providing the MBIM standard; this check
is otherwise done by default. See /etc/usb_modeswitch.conf from the
program package for a global setting regarding this.
The usb_modeswitch wrapper will test if a device has a configuration
according to the MBIM standard. If so, it will search for the matching
kernel driver. It it's available, the device will be configured for
MBIM usage which is preferable to other modes and configurations

--