Connecting the HUAWEI E1550 broadband modem using WvDial and PPPD

This document is copyright Jeddy Azuriey, It may be copied freely as a whole for non-commercial purpose, but must retain the indication of authorship. If you want to include it in a collection for sale, please contact the author. Furthermore, any alterations must have the permission of the author.


  1. Insert HUAWEI E1550 modem into USB slot. Wait for seconds to make sure kernel detect the hardware. Then, run command dmesg. Make sure last lines contains information that the modem is discovered.
  2. ...
    USB Serial support registered for GSM modem (1-port)
    option 1-1:1.0 GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attahed to ttyUSB0
    option 1-1:1.1 GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attahed to ttyUSB1
    option 1-1:1.2 GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attahed to ttyUSB2
    option 1-1:1.3 GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attahed to ttyUSB3
    usbcore: registered new interface driver option
    option: v0.7.2:USB Driver for GSM modems
    usb-storage: device scan complete
    usb-storage: device scan complete
    scsi 10:0:0:0 CDROM		HUAWEI	Mass Storage	2.31 PQ: 0 ANSI: 2
    scsi 11:0:0:0 Direct Access	HUAWEI	MMC Storage	2.31 PQ: 0 ANSI: 2
    sr1: scsi-1 drive
    sr 10:0:0:0: Attached scsi CD-ROM sr1
    sr 10:0:0:0: Attached scsi generic sg2 type 5
    sr 11:0:0:0: Attached scsi generic sg3 type 0
    sr 11:0:0:0: [sdb] Attached SCSI removable disk
    [jedi@localhost !]$
    
  3. For the first time, create wvdial configuration file.
  4. [jedi@localhost !]$ wvdialconf /etc/wvdial.conf
    Editing `/etc/wvdial.conf'
    
    Modem Port Scan<*1>: S0 S1 S2 S3
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB0<*1>: ATQ0 V1 E1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB0<*1>: Speed 9600: AT -- OK
    ttyUSB0<*1>: Max speed is 9600; that should be safe.
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
    ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
    ttyUSB2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB3<*1>: ATQ0 V1 E1 -- OK
    ttyUSB3<*1>: ATQ0 V1 E1 Z -- OK
    ttyUSB3<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB3<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    ttyUSB3<*1>: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB3<*1>: Speed 9600: AT -- OK
    ttyUSB3<*1>: Max speed is 9600; that should be safe.
    ttyUSB3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    
    Found a modem on /dev/ttyUSB0
    Modem configuration written to /etc/wvdial.conf
    ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    ttyUSB3: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    
  5. Edit the configuration file
  6. [jedi@localhost !]$ vim /etc/wvdial.conf
    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type = Analog Modem\ISDN = 0
    Phone = *99#
    Modem = /dev/ttyUSB0
    Username = azuraidi
    Password = 0193347603
    Baud = 9600
    
  7. Run the dialer.
  8. [jedi@localhost !]$ wvdial
    --> WvDial: Internet dialer version 1.60
    --> Cannot get information for serial port.
    --> Initializing modem.
    --> Sending: ATZ
    ATZ
    OK
    --> Sending: ATQ V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ATQ V1 E1 S0=0 &C1 &D2 +FCLASS=0
    OK
    --> Modem initialized
    --> Sending: ATDT*99#
    --> Waiting for carrier
    ATDT*99#
    CONNECT
    --> Carrier detected. Waiting for prompt.
    --> Don't know what to do! Starting pppd and hoping for the best.
    --> Starting pppd at Fri Dec 17 21:00:26 2010
    --> Pid of pppd: 2187
    --> Using interface ppp0
    --> pppd: Ox Ox
    --> pppd: Ox Ox
    --> pppd: Ox Ox
    --> pppd: Ox Ox
    --> pppd: Ox Ox
    --> local IP address 10:163:74:110
    --> pppd: Ox Ox
    --> remote IP address 10:64:64:64
    --> pppd: Ox Ox
    --> primary DNS address 203:82:64:145
    --> pppd: Ox Ox
    --> secondary IP address 203:82:64:129
    --> pppd: Ox Ox
    
  9. Any time after connecting, WvDial will start PPP if it sees a PPP sequence from the server, or, alternatively, tries to start PPP. If all of this fails, WvDial just runs pppd and hopes for the best. From the command results, WvDial has failed to receive messages from the peer.
  10. By looking at kernel messages, we knew that the connection is established.
  11. [jedi@localhost ~]$ tail -f /var/log/messages
    
    Dec 17 21:00:26 localhost pppd[2187]: pppd 2.4.4 astarted by root, uid 0
    Dec 17 21:00:26 localhost pppd[2187]: Using interface ppp0
    Dec 17 21:00:26 localhost pppd[2187]: Connect: ppp0 <--> /dev/ttyUSB0
    Dec 17 21:00:26 localhost pppd[2187]: CHAP authentication succeeded
    Dec 17 21:00:26 localhost pppd[2187]: CHAP authentication succeeded
    Dec 17 21:00:26 localhost kernel: PPP Deflate Compression modeule registered
    Dec 17 21:00:26 localhost pppd[2187]: Could not determine remote IP address: defaulting to 10:64:64:64
    Dec 17 21:00:26 localhost pppd[2187]: local IP address 10.163.74.118
    Dec 17 21:00:26 localhost pppd[2187]: remote IP address 10.64.64.64
    Dec 17 21:00:26 localhost pppd[2187]: primary DNS address 203.82.64.145
    Dec 17 21:00:26 localhost pppd[2187]: secondary DNS address 203.82.64.129
    Dec 17 21:00:26 localhost pppd[2187]: Terminating on signal 15
    Dec 17 21:00:26 localhost pppd[2187]: Connect time 11.4 minutes
    Dec 17 21:00:26 localhost pppd[2187]: Sent 120 bytes, received 192 bytes.
    Dec 17 21:00:26 localhost pppd[2187]: Connection terminated.
    
  12. Edit resolver configuration file, /etc/resolv.conf to include name servers we got from above message.
  13. [jedi@localhost ~] $ vi /etc/resolv.conf
    
    domain localdomain
    search localdomain
    nameserver 203.82.64.145
    nameserver 203.82.64.129
    
  14. I suspect your worse problem is that the ppp is not getting set to default. Remove the default route to your ethernet card.
  15. [jedi@localhost ~]$ route del default
    [jedi@localhost ~]$ route add default gw 10.64.64.64 dev ppp0
    
    [jedi@localhost ~]$ route
    Kernel IP routing table
    Destination	gateway	Genmask		Flags	Metric	Ref	Use	Iface
    10.64.64.64	*	255.255.255.255 UH				ppp0
    default		*	10.64.64.64	UG				ppp0
    
  16. Try to ping any hostname you know. Replies have been sent to you to show that the PPP connection is established.
  17. [jedi@localhost ~]$ ping www.google.com
    
    Mohd Azuraidi bin Harun <jd (dot) azura (at) gmail (dot) com>
    $Id: wvdial.php 456 2014-02-20 16:23 MYT azuraidi $

    Valid XHTML 1.0 Strict!   Valid CSS!