Thursday, June 25, 2009

Howto connect to the Internet using ZTE AC 8710 USB EVDO modem and Reliance Netconnect Plus service in Ubuntu

-------------Update on 26 Dec 09 ----------------------------------
Ive upgraded to Ubuntu Karmic Koala (9.10) and found to my pleasant surprise that I dont have to do the modeswitch as explained below... The kernel parameters are required to be passed at boot time but once you insert the modem, the switch happens automatically! Upon insertion, my dmesg shows this:
1781.557336] usb 4-1: new full speed USB device using uhci_hcd and address 7
[ 1781.728425] usb 4-1: configuration #1 chosen from 1 choice
[ 1781.733527] usbserial_generic 4-1:1.0: GSM modem (1-port) converter detected
[ 1781.733858] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1781.737839] usbserial_generic 4-1:1.1: GSM modem (1-port) converter detected
[ 1781.738124] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1781.739791] usbserial_generic 4-1:1.2: GSM modem (1-port) converter detected
[ 1781.740855] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 1781.744782] usbserial_generic 4-1:1.3: GSM modem (1-port) converter detected
[ 1781.745112] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 1781.747243] usbserial_generic 4-1:1.4: GSM modem (1-port) converter detected
[ 1781.747527] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB4

So I directly run wvdial cdma and connect.
Ps. I am still not able to use Network Manager which now includes an entry for Reliance in the Mobile Broadband section.

-----------------------------------------End of Update------------------------------------------------

The prerequisites to achieve the above are:

1. An activated Reliance Netconnect Plus EVDO service with the ZTE AC8710 EVDO modem.

2. A laptop/desktop with Ubuntu Jaunty Jackalope (9.04); It could/should work with other flavors/versions too with minor tweaks.

3. The usb_modeswitch utility from here -->

4. The wvdial package.

The steps:

1. First download the usb_modeswitch utility and either compile it or use the binary (this worked in my case).

2. This utility is required to switch the ZTE modem from mass storage mode to modem mode. This is because ZTE cleverly added a usb storage mode which could allow them to bundle the windows driver and utility along with the dongle thus ensuring that people using netbooks etc (those without CD-Rom drives) could install and work with the modem. Unfortunately in Linux (Ubuntu Jaunty in my case), this does not happen and the device shows up as a mass storage device always thus leading to an impasse.

3. The next interesting point to note is that with Jaunty, the usbserial module has got built into the kernel instead of being a loadable module (This is the primary difference when working with earlier flavors like Intrepid- 8.10 where this module has to be loaded with the modprobe command).

4. Hence the parameters to the usbserial module have to be passed at boot time. One needs to add the following two values (usbserial.vendor and usbserial.product) to the end of the kernel line in the /boot/grub/menu.lst for the default kernel. In my case it looks like this after modification ( I am making the assumption that people know how to edit files in Linux):-

kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=61f8e10e-6e9f-44c9-8e41-43deb8589139 ro quiet splash usbserial.vendor=0x19d2 usbserial.product=0xfff1

5. The next step is to unzip (optionally compile ) and install the usb_modeswitch tool. This puts a binary called usb_modeswitch in /usr/sbin/usb_modeswitch and the configuration file in /etc/usb_modeswitch.conf

6. Edit the /etc/usb_modeswitch.conf file to reflect the modem type and other settings. In my case the relevant line numbers (582 to 591) look so: -

   582 DefaultVendor=  0x19d2
583 DefaultProduct= 0xfff6
585 TargetVendor= 0x19d2
586 TargetProduct= 0xfff1
588 # only for reference
589 # MessageEndpoint=0x05
591 MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"

7. The next step is to reboot after saving all changes to ensure that the usbserial module gets the required values.

8. After rebooting, we need to now switch mode. To do this, insert the USB modem, wait for it to get recognized as a mass storage device and then run the command (as root) usb_modeswitch. If one tails the messages file (tail -f /var/log/messages), one can see that new devices such as /dev/ttyUSB0 get created.

Before switch the log looks so: -

usb-storage: device scan complete

[ 2326.587996] scsi 6:0:0:0: CD-ROM ZTE USB Storage FFF1 2.31 PQ: 0 ANSI: 2

[ 2326.656896] sr0: scsi-1 drive

[ 2326.657023] sr 6:0:0:0: Attached scsi CD-ROM sr0

[ 2326.657121] sr 6:0:0:0: Attached scsi generic sg2 type 5

After switch it is:-

usb 2-2: new full speed USB device using uhci_hcd and address 10

[ 2328.646405] usb 2-2: configuration #1 chosen from 1 choice

[ 2328.649209] usbserial_generic 2-2:1.0: generic converter detected

[ 2328.649622] usb 2-2: generic converter now attached to ttyUSB0

[ 2328.652650] usbserial_generic 2-2:1.1: generic converter detected

[ 2328.653049] usb 2-2: generic converter now attached to ttyUSB1

[ 2328.655786] usbserial_generic 2-2:1.2: generic converter detected

[ 2328.656234] usb 2-2: generic converter now attached to ttyUSB2

[ 2328.658435] usbserial_generic 2-2:1.3: generic converter detected

[ 2328.658781] usb 2-2: generic converter now attached to ttyUSB3

[ 2328.661470] usbserial_generic 2-2:1.4: generic converter detected

[ 2328.661814] usb 2-2: generic converter now attached to ttyUSB4

9. Once this is done, we now need to run the wvdialconf tool to create the wvdial.conf file. In my case, it could detect the ZTE modem and detected a 9600 baud capable modem.

10. We can now edit the /etc/wvdial.conf file to add other values including the username and password (the reliance number associated with the EVDO service is both in this case). After it is done, my wvdial.conf looks so: -

     2 [Dialer cdma]
3 Stupid Mode = 1
4 Inherits = Modem0
5 Password = 93xxxxxxxx
6 Username = 93xxxxxxxx
7 Phone = #777
9 [Modem0]
10 Init1 = ATZ
11 Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
12 SetVolume = 0
13 Modem = /dev/ttyUSB0
14 Modem Type = Analog Modem
15 ;Baud = 9600
16 Baud = 115200
17 FlowControl = Hardware (CRTSCTS)
18 Dial Command = ATDT
19 ISDN = 0

Pl note that I added the [Dialer cdma] part and also changed line 15 from 9600 to 115200 and it works just fine!

11. Once this is done, just run the command wvdial cdma and if all goes well, you should be connected. my final output, once connected looks so:

--> WvDial: Internet dialer version 1.60

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ



--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0


--> Modem initialized.

--> Sending: ATDT#777

--> Waiting for carrier.



--> Carrier detected. Starting PPP immediately.

--> Starting pppd at Thu Jun 25 09:52:01 2009

--> Pid of pppd: 11296

--> Using interface ppp0

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

--> local IP address

--> pppd: ��[06][08]0�[06][08]

--> remote IP address

--> pppd: ��[06][08]0�[06][08]

--> primary DNS address

--> pppd: ��[06][08]0�[06][08]

--> secondary DNS address

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

--> pppd: ��[06][08]0�[06][08]

12. Thats it!! Fire up your browser, email client etc etc and happy surfing. I am getting 500 Kbps in Chennai and Hyderabad.

ps. i found out that i hadnt had pppd installed so had to install that as well.

I know that there might be a more elegant GUI way of doing this but this is the best I could do after reading a lot of stuff that other people had done.


amit said...

I try the steps on Fedora and got the same messages you posted for successful connection. But I am still not able to surf the internet. Please Help

Shiv said...

Hi Amit,
If you did get the same messages, then # ifconfig ppp0 should show you the ip address that your machine got assigned.
Also, in my case, I found that somehow Firefox would still think that I dont have a connection and go into "Offline" mode. The workaround is to uncheck the Work Offline checkbox in the File menu of Firefox.
It would help if you could post the output of the ifconfig ppp0 so that I can understand better.

TNT (Travis Neo Tyler) said...

Your blog was helpful in getting ZTE8710 working for me. This is how i got it working on Ubuntu Intrepid detailed with some gotchas along the way

Shiv said...

Hi Travis,
Im glad that it helped you. Thanks for updating info on Intrepid.

ERWIN said...

May i know how much this zte ac 8710?

Shiv said...

Reliance charges Rs 3500/- as a one time fee for the dongle and depending upon the plan you select, your monthly charges vary. The one I am on costs Rs 1750/- per month.

Denis said...

You rock! I've red tons of articles about ZTE ac8710 and ubuntu, and this tutorial is the only thing that made it work! Thanks!

Shiv said...

Thanks Denis. Glad to be of help :)

Bala said...

Hello Shiv,

I have been struggling with my ZTE AC 8710 USB modem (Tata Photon) for a couple of days now. I have tried to follow your instructions closely, but to no avail. I have also tried out many other similar instructions. And I am about out of moves now. My Windows install too is down and I dont really want to get it back up and running. Would greatly appreciate if you could possibly help me with this.

One note - my 'lsusb' output shows that my usbproduct = ffff. This is very different and I see only values such as fff1 or fff5 or fff6 in all of the other guides that I have seen so far.

In my usb_modeswitch.conf, I have 'ffff' as the Default product and 'fff1' as the Target product. Is that the right way to go about? Also my menu.lst has the 'fff1' as I thought it needed the target product value and not the default one.

Problem is when I do the usb_modeswitch it says 'No drivers found'. Any thoughts? Thanks in advance.

Bala said...


It is getting stranger. Somewhere on the net, I read that if my device was getting recognized as product code - ffff, then it is ready to be connected as a modem.

Well, I just modified the wvdial.conf appropriately and did a wvdial. And lo, it connected!

I got the same messages as detailed in your blog and got assigned the DNS addresses as well.

But the terminal just hangs there - is that normal? Also while, the wvdial shows that I have connected, I am actually not able to get connected to the internet at all.

The ifconfig ppp0 command does show a list of addresses that have been assigned as well. So, not sure what exactly is the problem here? Any thoughts?

Shiv said...

Hi Bala,
Wvdial sits in the foreground so thats not an issue.
If you are able to see the ppp0 interface with an IP address (Public) then everything is pretty much up.
Some things you can further check are whether you are able to resolve DNS correctly. Eg., dig should resolve.
Other things you can also check is whether the gateway is reachable.
route -n should show you the gateway for the ppp0 interface.

Bala said...

Hello Shiv,

I figured out what the problem was. The maddening thing was I did not come across anybody with a similar problem:). The resolv.conf file was not getting written into for some reason. I manually edited it and added in the DNS addresses and everything started working perfectly.

By the way, does the fact that the Modem Baud rate gets detected at 9600 have anything to do with internet speed? I somehow feel that the internet speed is faster with Windows. Should I modify the Baud figure in the wvdial.conf file? If so, what value should I use?

Perl said...

This worked on Fedora 12.

Anonymous said...

great ...........................................................

Vineeth Chandran said...

Hi Shivkumar.

This article is great and helped me.

By the way, usb-modeswitch is available in software channel for karmic (universe).

Thanks for this great article.


James Franklin said...

Free Social Media Marketing where Every thing will be Free, Facebook Likes, Twitter Followers, Twitter Tweets, Twitter Re-Tweets, Twitter Favorites, Google Plus Followers, StumbleUpon Followers, Youtube Views, Youtube Likes, Youtube Subsribes, Pinterest Followers, Pinterest Likes, Pinterest PinIt, Free Website Visitors.
Just Join now and Free Increase your Social Media Networks.

singar said...
This comment has been removed by the author.
singar said...

Waaw.. I got Reliance Broadband+ ZTE AC8710 connected onto Raspbian (Raspberry Pi) using your procedure.. Thanks a lot for your post...