This method is commonly used to mount USB on first startup. Other methods are also applicable, such as usbserial "usbserial.
fist: check the number of vendor and product of your modem, in this case i use ZTE C261 as Modem.
root@leptop# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 064e:a101 Suyin Corp. Acer CrystalEye Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 004: ID 05c6:9004 Qualcomm, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 009: ID 0930:6544 Toshiba Corp. Kingston DataTraveler 2.0 Stick (2GB)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
second : edit your grub menu to recognize your USB device. Edit on /etc/default/grub, and changed it, see on source bellow.
root@leptop# vim /etc/default/grub
GRUB_DEFAULT=0#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbserial.vendor=0x05c6 usbserial.product=0x9004"
GRUB_CMDLINE_LINUX=""
last : update your grub by running update-grub
root@leptop # update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
done
okay, now you need to restart your computer, and you can use this device to make ppp connection via wvdial or other software.
At the startup, you may need to run modprobe to load usbserial module to Linux kernel, and wvdialconf to create default configuration file of wvdial so that you can edit this file, as shown bellow :
root@leptop # modprobe usbserial vendor=0x05c6 product=0x9004
root@leptop # wvdialconf
root@leptop # vim /etc/wvdial.conf
The wvdial should be like this :
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Baud = 460800
Idle Seconds = 300
Stupid Mode = 1
Compuserve = 0
Asl Password = 0
FlowControl = CRTSCTS
Dial Command = ATDT
Modem Type = Analog Modem
New PPPD = yes
Modem = /dev/ttyUSB1
ISDN = 0
Phone = #777
Password = smart
Username = smart
As default, this connection will reset every 50 minutes, so you also need to change value of lcp-echo-failure, here is my lcp-echo-failure value :
cat /etc/ppp/options | grep lcp
# lcp-echo-failure option to detect that the peer is no longer connected.
lcp-echo-interval 30
# option requires a non-zero value for the lcp-echo-interval parameter.
lcp-echo-failure 9999994
7 comments: