My home dsl router broke yesterday, so I had to figure out how to get online again. Luckily I have my free-data 3g modem (from 3.dk), which works great from Ubuntu (network-manager). This is great for one computer at a time, but not for my entire home network. I searched and found exactly what I was looking for at Hanne’s blog post, which describes how to use wvdial to connect with the usb-modem. Everything below is taken from her post;
Content of wvdial.conf
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone =
ISDN = 0
; Username =
Init1 = ATZ
; Password =
Modem = /dev/ttyUSB0
Baud = 9600
[Dialer pin]
Modem = /dev/ttyUSB0
Init1 = AT+CPIN=**** <- this is really my pin code
[Dialer hsdpa]
New PPPD = yes
Phone = *99#
Username = irrelevant
Password = irrelevant
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","data.tre.dk"
Options goes to /etc/ppp/options
lock
lcp-max-configure 10
mru 1440
nobsdcomp
nodeflate
nopredictor1
novjccomp
nomppe
usepeerdns
And how to dial
!/bin/sh
sudo /etc/init.d/network stop
sudo wvdial pin >/dev/null 2>&1
sleep 5
sudo wvdial hsdpa
I have no PIN code setup on my 3g modem, so I just had to execute vwvdial hsdpa.