To connect to Internet, you can use the console command WvDial (wvdial)
1. Check whether your Ubuntu installation has wvdial:
Click Applications menu » Accessories » Terminal option.
Type sudo wvdial and press Enter key.
If the first line in the output is "--> WvDial: Internet dialer version 1.60" or something similar, it means that you indeed have wvdial and you can go to the next step.
2. Type
wgethttp://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.1.tar.bz2 , and press Enter key
(This will download the program usb_modeswitch from www.draisberghof.de)
3. Then type the following commands at the prompt
tar jxf usb_modeswitch-1.0.1.tar.bz2 (press Enter key)
cd usb_modeswitch-1.0.1 (press Enter key)
sudo cp usb_modeswitch /usr/sbin (press Enter key)
(This will extract the binary usb_modeswitch from the tarball and copy it to /usr/sbin)
3. Type at the prompt sudo cp usb_modeswitch.conf /etc (press Enter key)
(this command will copy the file named usb_modeswitch.conf to the folder /etc)
4. Type sudo gedit /etc/usb_modeswitch.conf (press Enter key)to open the file in the Gnome Text editor
The file may have some settings for each type of modem
Add the following lines to the file
DefaultVendor= 0x12d1
DefaultProduct= 0x1411
HuaweiMode=1
Make sure to comment out all other lines starting with DefaultVendor,
DefaultProduct, TargetVendor, TargetProduct etc by placing a ';'
(semicolon) or '#' (hash) at the beginning of each line.
Save the file and close gedit
5. In the terminal console
type sudo gedit /etc/udev/rules.d/99-huawei_00.rules (press Enter key)
and type the following in the gedit text editor.
SUBSYSTEM=="block", \
ACTION=="add", \
SYSFS{idVendor}=="12d1", \
SYSFS{idProduct}=="1411", \
OPTIONS="ignore_device"
save and close gedit
Similarly, create another file by name 99-huawei_01.rules by typing in the terminal console sudo gedit /etc/udev/rules.d/99-huawei_00.rules (press Enter key)
Enter the following in the gedit text editor.
SUBSYSTEM=="usb", SYSFS{idProduct}=="1411", SYSFS{idVendor}=="12d1",
RUN+="/sbin/mydevice_switch.sh"
Save and close gedit
6. In the terminal console type
sudo gedit /sbin/mydevice_switch.sh(press Enter key)
and type the following lines in the text editor
#!/bin/sh
/usr/sbin/usb_modeswitch
sleep 1
/sbin/modprobe usbserial vendor=0x12d1 product=0x1411
this will create a script named mydevice_switch.sh under /sbin
Save and close gedit
7. In the terminal console type
chmod a+x /sbin/mydevice_switch.sh(press Enter key)
This will make it the file mydevice_switch.sh executable
7. Type sudo gedit /etc/wvdial.conf(press Enter key)
Edit the file accordingly.
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = Your password
Phone = #777
Modem Type = Analog Modem
Stupid Mode = 1
Baud = 460800
Modem = /dev/ttyUSB0
ISDN = 0
Username = Your username
Save and close the gedit
8. At the teminal type wvdial and press Enter key
9. Check the File >> work offline in the firefox browser and can connect to the internet