# ZTE USB modem and wvdial

## ilovebeer

Hey all, I have a plug in ZTE proprietry usb modem that i'm trying to get going with wvdial. unfortunately under linux it's not recognised as a modem so wvdialconf reports no modem found. here is the relevant lsusb -v output.

Bus 008 Device 002: ID 19d2:0031  

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x19d2 

  idProduct          0x0031 

  bcdDevice            0.00

  iManufacturer           2 ZTE, Incorporated

  iProduct                1 ZTE CDMA Technologies MSM

  iSerial                 3 1234567890ABCDEF

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength          138

    bNumInterfaces          5

    bConfigurationValue     1

    iConfiguration          4 Qualcomm Configuration

    bmAttributes         0xa0

      (Bus Powered)

      Remote Wakeup

    MaxPower              500mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass       255 Vendor Specific Class

      bInterfaceSubClass    255 Vendor Specific Subclass

      bInterfaceProtocol    255 Vendor Specific Protocol

I've spent a couple of days on this with no joy! Could someone please push me in the right direction, even just to get this recognised as a modem by wvdial. After that should be relatively easy. Possibly with a few kernel selections that I've missed. 

I've done the usual with usbserial etcetera with no result.  

Naturally it works under Vista but if i have to use Vista much longer I might do some harm to this computer  :Wink: 

Anybody got the Bigpond 7.2 ZTE usb modem stick working under Linux? I'm getting so desperate I'm thinking of installing gentoo in windows with Virtualbox so at least i'll be in familiar territory. 

Thanks

----------

## NeddySeagoon

ilovebeer,

google says

```
# prompt: USB Option PCMCIA serial driver

# type: tristate

# depends on: CONFIG_USB_SERIAL && CONFIG_USB_OHCI_HCD && CONFIG_PCCARD

# defined in drivers/usb/serial/Kconfig

# found in Linux Kernels: before 2.6.12 version still available on 2.6.27 release
```

Your device 19d2:0031 is listed there so if you fix your kernel, it should JustWork.

----------

## ilovebeer

Hey thanks for replying Neddy. I had most of those options selected except ohci_hcd. Unfortunately the device is still not recognised as a modem. Anyway, I'll just keep fiddling away until I make some progress.

Thanks

----------

## NeddySeagoon

ilovebeer,

CONFIG_USB_OHCI_HCD is only if you have non intel/via USB 1.

It really means it wants USB 1 support on.

When it works, udev should create you a new USB serial device. You modem will be on the end of that.

----------

## ilovebeer

Hey all, YAHOO! Haven't got it working properly yet but at least I now have /dev/ttyUSB0. The module usb_storage needs to be unloaded before allowing the device to be detected correctly. Then I have to rmmod option usbserial... then modprobe usbserial vendor 0x19d2 product 0x0031 option. It's then that I get /dev/ttyUSB0... but   :Rolling Eyes:   the device needs a cold boot to reset properly. However a cold boot still loads usb_storage and thus the problem continues.

How can I stop usb_storage from being loaded at startup? &&

How can I make the appends to usbserial permanent on boot?

UPDATE: This thread https://forums.gentoo.org/viewtopic-t-720605.html shows a related problem of mine. *sigh* 

Thanks for your help so far.

ilb

----------

## NeddySeagoon

ilovebeer,

You can blacklist usbstorage, so udev will not load it,

To pass options to a module at boot time, you make a file in /etc/modules.d/ any name you like, and put the options this file

Look in the file /etc/modules.conf for hints in the syntax.  This file is made by concating all the files in  /etc/modules.d/* at boot.

emerge minicom and talk to your modem on /dev/ttyUSB0

When you type 

```
at
```

 it should return 

```
ok
```

```
atdt<number>
```

will make it dial a number. Google the Hays command set and play with it.

When minicom works, move on to wvdial.

----------

## ilovebeer

Thanks Neddy, your info will be valuable as soon as i resolve my loading option module problem https://forums.gentoo.org/viewtopic-t-720605.html. Thanks for your assistance.

ilb

----------

## Jefferies

I had the same problem. Here is a solution. It is useful after full installation (sorry) - but it might be instructive:

```
gedit /etc/wvdial.conf 
```

Edit the wvdial.conf file to:

```
[Dialer Defaults]

modem = /dev/ttyUSB0

Phone = #<number>

Username = <username>

Password = <password>

New PPPD = yes

[Dialer mdsl]

Stupid Mode = on

Modem = /dev/ttyUSB0

Baud = 9216000

Init = ATZ

Phone = #<phone number>

Username = <username>

Password = <username>

New PPPD = yes 
```

As an example, here in Sudan (!   :Shocked:  ) , I configure wvdial.conf as follows:

```
[Dialer Defaults]

modem = /dev/ttyUSB0

Phone = #777

Username =sudani

Password =sudani

New PPPD = yes

[Dialer mdsl]

Stupid Mode = on

Modem = /dev/ttyUSB0

Baud = 9216000

Init = ATZ

Phone = #777

Username = sudani

Password = sudani

New PPPD = yes   
```

The phone number, username and password are those given by the provider, natch.

To start connection:

```
wvdial mdsl
```

To close connection CTL C

But better is to use Gnome-ppp.

It works for me.  :Very Happy: 

----------

## ilovebeer

Thanks Jefferies, that'll be helpful when I get the modem working. 

UPDATE: A few bizarre things happening now. The zte modem is only recognised if i boot from windows straight into gentoo! Obviously Windows imparts something to the modem that sticks for the first boot into Linux because   :Rolling Eyes:   wvdialconf recognises the modem but then the modem fails to respond with wvdial. Then the devices ttyUSB0-4 disappear! A reboot does not bring ttyUSB0-4 back again with all the same modules present! Only a boot into windows and then a boot straight into Linux will bring ttyUSB0-4 back! I suppose I've got a lot of searching to do   :Shocked:  I'll post any advances I have but appreciate any ideas you may have. thanks

ilb

----------

## NeddySeagoon

ilovebeer,

I suspect that windows provides firmware, or the USB ID of the device changes.

Do a cold boot into linux and run lsusb ... note the vendor and device IDs of the modem

Do a cold boot into windows then a reboot (without power cycling) into Linux.

Look at the the Vendor and device IDs. are they the same as the first time ?

Google confirms that many ZTE USB modems need firmware - get the right firmware for yours and put it in /lib/firmware

----------

## ilovebeer

Right on the money Neddy!

In Windows as follows vendor=0x19d2 product=0x0031

In Linux as follows      vendor=0x19d2 product=0x2000 which is what I've been loading it with.

But all this means?

Thanks for firmware tip I'll start looking.

ilb

----------

## NeddySeagoon

ilovebeer,

This means the device ID changes when the firmware is loaded.

----------

## kupusc

Hi,

Your device is recognized as an usb storage. I had exactly the same problem with my ZTE MF100 modem. You should disable the storage option in the modem's chipset via AT commands. Then you will not need any hacking in modules.

```
AT+ZCDRUN=8
```

 if I remember correctly.

----------

## pa4wdh

Hi,

It seems you're having trouble with a fancy feature called "ZeroCD", this feature emulates a CD-ROM device to the host operating system which contains software to control the modem. However, i never saw any software for GNU/Linux there.

I have a ZTE MF638 stick here, for which i made a description in my GPRS HOWTO: http://www.xs4all.nl/~ernstagn/GPRS-HOWTO/GPRS-HOWTO-3.html#ss3.14

The story in short:

- Your kernel needs SCSI and SCSI CD-ROM support in order to see your CD-ROM device (and of course the USB OPTION driver mentioned in this topic for the tty's)

- You can use the eject command (sys-apps/eject) to make it switch to "modem mode"

- After that you can use any PPP tool to make a dail-in connection

If your modem behaves the same as my MF628 you don't need any firmware.

Best regards,

pa4wdh

----------

