top | item 29450612

(no title)

offbyone | 4 years ago

The article is interesting in general, but this line really needs more than "works like a charm": `usb_modeswitch -W -v 12d1 -p 14fe -K -P 14ac -M "55534243000000000000000000000011060000000000000000000000000000"`

I mean, I believe you, but ... what on earth IS all of that?

discuss

order

tyingq|4 years ago

Here's what it sounds like. Most of these types of devices (USB/3G) are "multimode" devices. That is, they can act like either USB storage or a USB 3G/4G device. On Windows, that's handy because it can come up as storage and then the end user can install the drivers right from the device, and the drivers then handle the "mode switching" from storage to 3G/4G-device. It's basically a way to bootstrap operation without requiring driver downloads.

This "usb_modeswitch" program handles that for linux. It sniffs the USB traffic and switches the mode to 3G/4G for you. All the crazy args are whatever was in the Windows config file. The -v 12d1 is the "VID" (vendor ID) of the device to sniff traffic for. The -p arg is similar, but the "PID" (product ID). The -P 14ac is the "PID" to switch to to get from storage to 3G/4G device. The -M <long-string> is the magic payload sent to the device to make it switch.

ajsnigrutin|4 years ago

It has to be said here, that usb_modeswitch software already recognises most modems and has those magic strings saved in a file, and does the switch automagically.

Only if you have a relatively new or rare modem, you need to find the magic string yourself (or even reverse engineer it from a windows setup), to make it work.

numpad0|4 years ago

This is a USB Mass Storage SCSI Command Block Wrapper packet as far as I can google out. Content looks like "Test Unit Ready 0001 0001 10 flag=true link=false". Could be completely wrong. Thank you for pointing this out, this is interesting.

55 53 42 43: "USBC"

00 00 00 00: CBW Tag

00 00 00 00: Transfer length

00 00 00 00: CBW direction, LUN, CBW CB length, CBW Command Block

00 00 00 11: CBW CB(cont.)

06 00 00 00: (same)

00 00 00 00: (same)

00 00 00 00: (same)

00 00 00 : (same)

---

00 00 00 00 11 06: TUR LUN0 RSVD RSVD RSV1 0001 0110

00 00 00 00 00 00: TUR LUN0 RSVD RSVD RSVD 00RS VD00

00 00 00 00 00 00: TUR LUN0 RSVD RSVD RSVD 00RS VD00

00 00: ?