Sunday, 27 April 2008

UMTS Modem in Ubuntu 8.04

Dial up internet connections are easy to set up, one might think. I wanted to connect to my ISP using a PCMCIA UMTS card. Searching the internet I found three different approaches:
  1. use wvdial to set up a ppp connection
  2. use gnome-ppp to set up a ppp connection
  3. use a specific software (like umtsmon or vodaphone-mobile-link)that installs all required drivers
I run Ubuntu 64 on my notebook, so vodaphone does not work. There is an ancient x64 .deb package that refuses to install. The tar files don't compile due to missing twisted python modules. and finally (after installing twisted) it refused to start.

I found a much simpler solution: Gnomes network-manager.

network-manager allows you to configure 1 dial up connection. It requires some tweaking of a configuration file in order to reap the maximum speed from your modem but other than this, it is an easy solution without any bells and whistles.

Configuration of network manager
  1. Left click your network icon in the top right of your Gnome panel. Select "Manual configuration..."
  2. Unlock the dialog
  3. Select "Point to Point connection" and edit its "Properties" (this brings up a 3-tabbed dialog)
  4. On the General-Tab tag "Enable this connection" and adjust the connection type, access point name and account data.
  5. Change connection type to "serial modem" to enter the phone number. Change back to GPRS/UMTS. The phone number gets stored in the configuration file
  6. On the Modem-Tab type the modem port. In my case I hat to overwrite what was offered by the dialog ("/dev/ttyUSB0"). I found this information in the gnome-device-manager.
  7. The Options-Tab allows to set the modem to provide the default route (which is helpful on the road) and to accept the DNS servers from your provider. I did not select "Retry if the ..." reconnect option here, but rather in the configuration file (as this sets it to retry permanently)
  8. OK and close the configuration dialog and you are done.
Insert the card, left click the network icon in the panel. You can "Dial Up Connections>/Connect to ppp0 via Modem...". It takes a few seconds, then the connect is made.

There is not much of an indication as the line being up. On my modem, the LED is on permanently. Network-manager does not change its icon to reflect connection status.

Configuration myths and files

There are lots of rumors out. Here is what I found out:
  • wvdial and other command line tools use /etc/wvdial.conf to configure dialup connection.
  • gnome-ppp and network manager use ~/.wvdial.conf (in your home directory)
Both files use similar syntax but Gnome does not read /etc/wvdial.conf or setup configuration in /etc/ppp...

Here is my .wvdial.conf:
[Dialer Defaults]
Modem = /dev/ttyUSB0
ISDN = off
Modem Type = USB Modem
Baud = 460800
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+cgdcont=1,"IP","mynetwork"
Init4 =
Init5 =
Init6 =
Init7 =
Init8 =
Init9 =
Phone = telefonnumber_from_provider
Phone1 =
Phone2 =
Phone3 =
Phone4 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM1L1DT
Ask Password = off
Password = mypassword
Username = myusername@mynetwork.domain
Auto Reconnect = off
Abort on Busy = off
Carrier Check = on
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = off
Idle Seconds = 180
Auto DNS = on
;Minimize = off
;Dock = on
;Do NOT edit this file by hand!
Despite the last line, the file can be edited by hand. network-manager honors changes in the file. I changed Baud from 57600 to 460800. This provides significant increase in performance.


Marcus said...

Thank you for your description. It helped me a lot an is an easy way of setting up an UMTS Modem.

Aditionaly I have found the tool "ppptray" which shows an icon in the Gnome Panel which displays the status of your PPP Connection. On my setup it works flawless.

Kind regards and agin many thanks,


Pippus said...

How can I force PAP as authentication protocol for UMTS connection? My company APN works only with PAP protocol. If anyone knows... thanks in advance!