Mobile Broadband (3G, HSPA) with Ubuntu

Some time ago I wrote about Mobile Broadband with Ubuntu. I have just done some testing to see if the situation is still the same, and unfortunately it basically still is.
Written by J.A. Watson, Contributor

Some time ago I wrote about Mobile Broadband with Ubuntu. I have just done some testing to see if the situation is still the same, and unfortunately it basically still is. However, in the process of doing this I have refined the wvdial configuration a bit, to make it simpler and get it to start up a bit faster, so after summarizing the current situation, I will include my latest configuration at the end of this post.

Basically what appears to have happened is that the Network Manager package has been update so that Mobile Broadband, 3G, HSPA, whatever you want to call it, works correctly with an AT&T "branded" Sierra Wireless card, but it certainly does not work with my Swisscom OEM version of the same card. Whether it works with other versions of the card, or other cards, I don't know, but I would love to hear from anyone who has experience with this, either way.

What happens with my Swisscom card is that the card itself is recognized by the Ubuntu Network Manager, and I am able to select a "Swisscom" configuration for it. But when I try to connect, it just fails and eventually times out. However, based on information given to me by Swisscom customer support, I was able to get their Sierra Wireless card working with the wvdial dialup internet utility. Then, using information from the Ubuntu bug tracking for Network Manager, I found that I could make a small change to the Network Manager configuration for the Sierra Wireless card, and once the card had successfully connected using wvdial, it would then also connect using Network Manager.

Ok, so here's the details. Start a terminal window on Ubuntu, and use sudo vi /etc/wvdial.conf (or whatever editor you prefer) to make the contents of the configuration file look like this:

[Dialer Defaults] Phone = *99***1# Username = gprs Password = gprs Dial Command = ATD Modem = /dev/ttyUSB0 Baud = 720000 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","gprs.swisscom.ch" Stupid Mode = yes

The significant differences between this and what I had posted previously are the removal of some unused lines, and the addition of the "Stupid Mode" line, which causes the connection setup not to wait for a login prompt which will never arrive, so it connects much faster.

After editing and saving the file, use the command sudo wvdial to start a Wireless Broadband connection. You will be able to tell from the output whether the connection works or not - it should, and it does for me. Once the connection is up, you can disconnect right away by entering CTRL-C, as you don't really want to work with this connection.

Next, right-click on the Network Manager icon in the panel, and select "Edit Connections". In the Network Connections window that pops up, select "Mobile Broadband", then "Edit" for whatever connection you have (mine is called "Swisscom"). In the "Editing" window, simply remove whatever value is in the "Advanced... APN" field, and leave it blank. That's it. Now click "OK" and "Close", then select the Network Manager icon and click whatever your connection is called. It should now connect right away, and you will be able to work with all of your Internet programs normally.

A final word of warning. There seems to be some sort of timeout on the validity of the connection setup by that initial wvdial procedure. So after some time (usually several days in my case), you may find that Network Manager fails to connect again. When this happens, just open a terminal window and use the sudo wvdial / CTRL-C steps to establish the connection again. Network Manager will then happily connect again.

It would be nice if this were really "fixed" in the Linux Network Manager package, so that it works in general rather than only working for some specific situations. But this workaround is not too painful, and I am happy to use it, when the alternative is to have to boot Windows every time I need to use a Mobile Broadband connection.

As I said, if anyone has direct experience with Mobile Broadband under the Linux Network Manager either working, or not working, I would like to hear about it.

jw 15/1/2009

Editorial standards