# usb_modeswitch errors with ZTE MF190

## euSufook

Hello,

I have problems connecting with my ZTE MF190 USB HSUPA stick.

After plugging it in is recognized as a CD-ROM drive:

lsusb

```
Bus 002 Device 004: ID 19d2:0117 ZTE WCDMA Technologies MSM
```

dmesg

```
[ 1865.516053] usb 2-4: new high-speed USB device number 3 using ehci-pci

[ 1865.631818] usb 2-4: New USB device found, idVendor=19d2, idProduct=0083

[ 1865.631825] usb 2-4: New USB device strings: Mfr=3, Product=2, SerialNumber=4

[ 1865.631830] usb 2-4: Product: ZTE WCDMA Technologies MSM

[ 1865.631834] usb 2-4: Manufacturer: ZTE,Incorporated

[ 1865.631837] usb 2-4: SerialNumber: -removed-

[ 1865.634271] usb-storage 2-4:1.0: USB Mass Storage device detected

[ 1865.634450] scsi host5: usb-storage 2-4:1.0

[ 1867.459291] usb 2-4: USB disconnect, device number 3

[ 1867.769059] usb 2-4: new high-speed USB device number 4 using ehci-pci

[ 1867.885378] usb 2-4: New USB device found, idVendor=19d2, idProduct=0117

[ 1867.885386] usb 2-4: New USB device strings: Mfr=3, Product=2, SerialNumber=4

[ 1867.885390] usb 2-4: Product: ZTE WCDMA Technologies MSM

[ 1867.885395] usb 2-4: Manufacturer: ZTE,Incorporated

[ 1867.885398] usb 2-4: SerialNumber: -removed-

[ 1867.888345] usb-storage 2-4:1.3: USB Mass Storage device detected

[ 1867.888521] scsi host6: usb-storage 2-4:1.3

[ 1867.937095] usbcore: registered new interface driver usbserial

[ 1867.956222] usbcore: registered new interface driver option

[ 1867.956259] usbserial: USB Serial support registered for GSM modem (1-port)

[ 1867.956474] option 2-4:1.0: GSM modem (1-port) converter detected

[ 1867.957533] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB0

[ 1867.957589] option 2-4:1.1: GSM modem (1-port) converter detected

[ 1867.957685] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB1

[ 1867.957735] option 2-4:1.2: GSM modem (1-port) converter detected

[ 1867.957816] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB2

[ 1868.891206] scsi 6:0:0:0: Direct-Access     ZTE      MMC Storage      2.31 PQ: 0 ANSI: 2

[ 1868.892974] sd 6:0:0:0: Attached scsi generic sg2 type 0

[ 1868.895180] sd 6:0:0:0: [sdb] Attached SCSI removable disk
```

How can I mount this "disk" ? I tried mount -t iso9660 /dev/sdb /mnt/usb 

Then I want to use usb_modeswitch. I have in

```
 /usr/share/usb_modeswitch $ grep MF190 19d2\:*

19d2:0149:# ZTE MF190 (Variant)

19d2:0154:# ZTE MF190 (Variant) and others

19d2:1224:# ZTE MF190
```

Trying all of these:

usb_modeswitch -v 19d2 -p 0117 -c 19d2\:0149 > debug.log 2>&1

```
Error: can't use storage command in MessageContent with interface 0;

       interface class is 255, expected 8. Abort

Look for target devices ...

 No devices in target mode or class found

Look for default devices ...

   product ID matched

 Found devices in default mode (1)

Access device 004 on bus 002

Get the current device configuration ...

 OK, got current device configuration (1)

Use interface number 0
```

usb_modeswitch -v 19d2 -p 0117 -c 19d2\:0154 > debug.log 2>&1 

```
Look for target devices ...

   product ID matched

 Found devices in target mode or class (1)

Look for default devices ...

   product ID matched

 Found devices in default mode (1)

Access device 004 on bus 002

Get the current device configuration ...

 OK, got current device configuration (1)

Use interface number 0

Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)

-------------------------

Manufacturer: ZTE,Incorporated

     Product: ZTE WCDMA Technologies MSM

  Serial No.: -removed-

-------------------------

Sending standard EJECT sequence

Looking for active driver ...

 No active driver found. Detached before or never attached

Set up interface 0

Use endpoint 0x01 for message sending ...

Trying to send message 1 to endpoint 0x01 ...

 OK, message successfully sent

Read the response to message 1 (CSW) ...

 Response reading failed (error -7)

 Device is gone, skip any further commands

-> Run lsusb to note any changes. Bye!
```

usb_modeswitch -v 19d2 -p 0117 -c 19d2\:1224 > debug.log 2>&1 

```
Look for target devices ...

 No devices in target mode or class found

Look for default devices ...

   product ID matched

 Found devices in default mode (1)

Access device 004 on bus 002

Get the current device configuration ...

 OK, got current device configuration (1)

Use interface number 0

Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)

-------------------------

Manufacturer: ZTE,Incorporated

     Product: ZTE WCDMA Technologies MSM

  Serial No.: -removed-

-------------------------

Sending standard EJECT sequence

Looking for active driver ...

 No active driver found. Detached before or never attached

Set up interface 0

Use endpoint 0x01 for message sending ...

Trying to send message 1 to endpoint 0x01 ...

 OK, message successfully sent

Read the response to message 1 (CSW) ...

 Response reading failed (error -7)

 Device is gone, skip any further commands

-> Run lsusb to note any changes. Bye!
```

But the lsusb output does not change. The PID is still the same.

----------

## NeddySeagoon

euSufook,

```
[ 1867.956259] usbserial: USB Serial support registered for GSM modem (1-port)

[ 1867.956474] option 2-4:1.0: GSM modem (1-port) converter detected

[ 1867.957533] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB0

[ 1867.957589] option 2-4:1.1: GSM modem (1-port) converter detected

[ 1867.957685] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB1

[ 1867.957735] option 2-4:1.2: GSM modem (1-port) converter detected

[ 1867.957816] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB2 
```

Is the bit you are looking for.  One of those serial ports behaves just like a real modem.

The two disc drives are a fake CDROM containing Windows software and a USB memory stick, which requires you to fit a microSD card,

Install minicom and use it to talk to  /dev/ttyUSB[012] in turn.

If you send ATZ, it should respond Ok.  That means Reset.

ATDT<phone_number> will make the modem use DTMF to dial  <phone_number>.

You can go straight to wvdial if you want too.

That all looks normal.

You may not need usb_modeswitch at all.

----------

## euSufook

Thank you for this advice. Minicom is interesting. I can talk to it a little on ttyUSB1 and ttyUSB2. The command ATI works. ATZ also, it responds OK. But I cannot use ATDT - it responds with ERROR. AT+CPIN= responds with ERROR or CME ERROR 3 (operation not allowed). AT+CPIN=? responds OK. wvdial responds CME Error as well when trying to give the PIN.

----------

## NeddySeagoon

euSufook,

If the device needs a pin, you need to give AT+CPIN=<pin> to unlock the device before you do anything.

You will need to use trial and error to discover the serial port to use.

Google will show you lots of wvdial setups.

----------

## euSufook

That's what I did when I meant

 *euSufook wrote:*   

>  AT+CPIN= responds with ERROR or CME ERROR 3 (operation not allowed).

 .

I sent AT+CPIN=1234 with my real pin to both working serial ports and got ERROR or ERROR:operation not allowed.

----------

## kernelOfTruth

It's related - but not sure if the fix is among the posted links - nevertheless posting for reference:

https://forums.gentoo.org/viewtopic-p-7721320.html#7721320

----------

