By far the easiest way to get your 3G USB dongle to connect would be to use the gnome network manager (see here), or gnome-ppp… but I will also give directions for wvdial (for non gnome users).
If you are running the Gnome desktop… open a terminal, and type:
nm-connection-editor
Select the “Mobile Broadband” tab, Add, and follow the instructions.
See here:
http://linuxforums.org.uk/linux-tips-tricks/setting-up-a-3g-dongle-from-the-ubuntu-network-manager/
or
http://old.linux.co.uk//docs/center/how-to/recommended-3g-netbook-solution
or
Install gnome-ppp from your package manager, or with the command
sudo apt-get install gnome-ppp
start gnome-ppp from your menu or with the command
gnome-ppp
click “Setup”, then “Detect”, and enter the settings for your provider from below. (if needed)
Right, wvdial… this should work for everyone that has wvdial installed… so if you haven’t, install it NOW from your package manager.
I’m going to give the instructions for the “3” UK 3G dongle (Huawei E122), but they should work for most, if not all 3G dongles… settings for other carriers (networks) can be found at the bottom of this tutorial.
First we need to detect the modem, so plug in your 3G USB Dongle… Open a terminal and type:
sudo wvdialconf
Hit enter, and see if it detects your modem… you should get an output similar to this:
Editing `/etc/wvdial.conf'.Scanning your serial ports for a modem.
Modem Port Scan< *1>: S0 S1 S2 S3
ttyUSB0: Device or resource busy
Modem Port Scan< *1>: USB0
WvModem< *1>: Cannot get information for serial port.
ttyUSB1< *1>: ATQ0 V1 E1 – OK
ttyUSB1< *1>: ATQ0 V1 E1 Z – OK
ttyUSB1< *1>: ATQ0 V1 E1 S0=0 – OK
ttyUSB1< *1>: ATQ0 V1 E1 S0=0 &C1 – OK
ttyUSB1< *1>: ATQ0 V1 E1 S0=0 &C1 &D2 – OK
ttyUSB1< *1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OK
ttyUSB1< *1>: Modem Identifier: ATI – Manufacturer: huawei
ttyUSB1< *1>: Speed 9600: AT – OK
ttyUSB1< *1>: Max speed is 9600; that should be safe.
ttyUSB1< *1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OKFound a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1: Speed 9600; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”
The highlighted bit is what we are after (/dev/ttyUSB1)
Now as root, edit /etc/wvdial.conf so that it reads:
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Stupid Mode = 1 Modem Type = Analog Modem ISDN = 0 Phone = *99# Username = three Password = three Modem = /dev/ttyUSB1 Dial Command = ATDT Baud = 9600[Dialer three]
Init2 = ATZ
Init3 = ATQ0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,“IP”,“3internet”
ISDN = 0
Modem = /dev/ttyUSB1
Modem Type = Analog Modem
Baud = 460800
Then to connect… from a terminal:
sudo wvdial three
Hit enter.
Ctrl+C will close the connection.
IMPORTANT
if the bit in bold writing during detection reads something other than /dev/ttyUSB1, change both Modem = lines in wvdial.conf to reflect this.
3G SETTINGS FOR OTHER CARRIERS
The /etc/wvdial.conf contents for a T-mobile dongle should read:
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Stupid Mode = 1 Modem Type = Analog Modem Baud = 9600 New PPPD = yes Modem = /dev/ttyUSB1 ISDN = 0 Phone = *99# Password = user Username = user[Dialer TMobile]
Init2 = ATZ
Init3 = ATQ0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,”IP”,”general.t-mobile.uk”
ISDN = 0
Modem = /dev/ttyUSB1
Modem Type = Analog Modem
Baud = 460800
Then to connect… from a terminal:
sudo wvdial TMobile
Hit enter.
Ctrl+C will close the connection.
IMPORTANT
if the bit in bold writing during detection reads something other than /dev/ttyUSB1, change both Modem = lines in wvdial.conf to reflect this.
The /etc/wvdial.conf contents for an O2 dongle should read:
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Stupid Mode = 1 Modem Type = Analog Modem Baud = 9600 Modem = /dev/ttyUSB1 ISDN = 0 Phone = *99# Password = password Username = mobileweb Dial Command = ATDT[Dialer O2]
Init2 = ATZ
Init3 = ATQ0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,”IP”,”mobile.o2.co.uk”
ISDN = 0
Modem = /dev/ttyUSB1
Modem Type = Analog Modem
Baud = 460800
Then to connect… from a terminal:
sudo wvdial O2
Hit enter.
Ctrl+C will close the connection.
IMPORTANT
if the bit in bold writing during detection reads something other than /dev/ttyUSB1, change both Modem = lines in wvdial.conf to reflect this.
The /etc/wvdial.conf contents for an Orange 3G dongle should read:
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Stupid Mode = 1 Modem Type = Analog Modem ISDN = 0 Phone = *99# Username = orange Password = orange Modem = /dev/ttyUSB1 Dial Command = ATDT Baud = 9600[Dialer orange]
Init2 = ATZ
Init3 = ATQ0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,“IP”,“3internet”
ISDN = 0
Modem = /dev/ttyUSB1
Modem Type = Analog Modem
Baud = 460800
Then to connect… from a terminal:
sudo wvdial orange
Hit enter.
Ctrl+C will close the connection.
IMPORTANT
if the bit in bold writing during detection reads something other than /dev/ttyUSB1, change both Modem = lines in wvdial.conf to reflect this.
The /etc/wvdial.conf contents for a Vodafone 3G dongle should read:
[Dialer Defaults] Init1 = ATZ Modem Type = Analog Modem New PPPD = yes Modem = /dev/ttyUSB1 ISDN = 0 Phone = *99#[Dialer vodafone]
Username = web
Password = web
Baud = 460800
Stupid Mode = 1
Init2 = ATV1
Init3 = at+cops=3,2
Init4 = AT+CGDCONT=1,“IP”,“pp.internet”
Phone = *99#
ISDN = 0
Modem Type = Analog Modem
Then to connect… from a terminal:
sudo wvdial vodafone
Hit enter.
Ctrl+C will close the connection.
IMPORTANT
if the bit in bold writing during detection reads something other than /dev/ttyUSB1, change the Modem = line in wvdial.conf to reflect this.
If I’ve got something wrong or forgotten anything, feel free to add comments and settings