It seems fitting that my first post for project 52 (albeit a bit late) involves connecting to the internets. 'Cause that is generally the first step on all most of the stuff I do on the computer.

I have a HSD Reliance ZTE datacard/modem which I had been unable to run on Linux till tonight. The interesting bit is, I have had this card for around 7 months now -- and it was forcing me to use Windows Vista (the horror, the agony, the pain!).

As a log (in case my computer gets formatted sometime in the future -- a likely, but not hoped for occurrence -- ) as well as a possible guide to others, here are the steps I followed.

Note: I'm using Ubuntu 9.10 with a Reliance NetConnect ZTE AC8710 modem.

  1. Connect to the net using some other, temporary connection
    1. Get usb-modeswitch. Those with access to a repository can simply do
      sudo apt-get install usb-modeswitch
      

      Others can get the latest version from http://www.draisberghof.de/usb_modeswitch/ .

    2. You will also need (do an apt-get as required)
      lsusb, libusb-dev, wvdial, modprobe
      
  2. Connect your modem and run
    lsusb
    

    You should see one of the usb ports having your modem -- it will probably be classified as ONDA and have a vendor/product id specified. Along the lines of

    192d:fff6
    

    The fff6 indicates that it has been detected as a flash drive/cd rom and not as a modem.

  3. Also do a
    dmesg | tail
    

    And observe where the modem has gone -- usbtty0 / 1 / 2/ 3 etc.

  4. Edit the usb-modeswitch configuration to make your computer recognize it as a modem
    sudo vim /etc/usb_modeswitch.conf
    

    Navigate till you find the settings for your vendor id/product id.

    ########################################################
     568 # ZTE AC8710
     569 #
     570 # Two ID variants known; check your default
     571 #
     572 # Contributor: Michael Khurtsiya
     573
     574 ;DefaultVendor=  0x19d2
     575 ;DefaultProduct= 0xfff5
     576
     577 ;TargetVendor=   0x19d2
     578 ;TargetProduct=  0xffff
     579
    <strong> 580 # No. 2
     581
     582 ;DefaultVendor=  0x19d2
     583 ;DefaultProduct= 0xfff6
     584
     585 ;TargetVendor=   0x19d2
     586 ;TargetProduct=  0xfff1
     587
     588 # only for reference
     589 # MessageEndpoint=0x05</strong>
     590 <strong>
     591 ;MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"</strong>
    

    And remove the ';' before the required lines. Save and exit.
    Run it.

    sudo usb_modeswitch
  5. Check whether it's worked -- do another
    lsusb
    

    and see that the product id has changed to fff1 (or whatever your target product was).

  6. Now we need to do a modprobe
    modprobe usbserial vendor=0x19d2 product=0xfff1
    

    Replace vendor and prodcut as you require.

  7. Once that's done, you need to make your wvdial.conf file. To edit the file:
    sudo vim /etc/wvdial.conf
    

    Copy paste the following in it.

    [Dialer Defaults]
     Username = &lt;enter your 10 digit modem number here&gt;
     Password = &lt;enter your 10 digit modem number here&gt;
     Init1 = ATZ
     Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0
     Modem Type = Analog Modem
     Phone = #777
     ISDN = 0
     SetVolume = 0
     FlowControl = Hardware (CRTSCTS)
     Modem = /dev/ttyUSB0 &lt;modify based on the results of your dmesg&gt;
     Dial Command = ATDT
     Baud = 460800
     Stupid Mode = 1
  8. Once that's done, you should be good to go. Simply run
    sudo wvdial
    

And you should be connected. Hopefully this helps someone and prevents them from wasting as much time as I did.

Sources: