1. lsusb in terminal to view whether the usb modem is connected or not.
2. sudo wvdialconf to configure the modem with your system.
3. Edit /etc/wvdial.conf and give the following text as it is,
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = #777
New PPPD = yes
Modem = /dev/ttyUSB0
Username = waps
Password = waps
Baud = 9600
now type sudo wvdial to connect the internet.