How to: Ubuntu and mobile broadband connectivity

advertisement
Posted by Read 8 Comments

This is a Guest Post and does not necessarily reflect the thoughts and opinions of Techzim. We have a strong filtering process of what makes it to our blog and are confident that you’ll enjoy the article below.

This article is part of a series of guest posts by Garikai Dzoma on helping new users migrate successfully to the Ubuntu operating system. Garikai started using Ubuntu Linux in 2007 and is an active member of the Zimbabwe Ubuntu LoCo team.

I have said elsewhere in the series that the Ubuntu experience is not complete unless you have internet; good internet I mean. In addition, I provided a guide to choosing your ISP. In this article I will provide you with a guide to connecting to the internet using mobile broadband (the dongles) but before doing so I must expressly say three things:

1. I have not used any of the current CDMA mobile broadband modems due to financial reasons. Not to worry though since I am very confident this will work for most modems. If you want my help you can avail me with testing opportunity using your modem.

advertisement

2. Do not be afraid of the command line it is easy and empowering. Fear of it is no different from an irrational fear of the dark. ( What with all those ghosts out to get you!)

3. What you see is not what you get. An Econet modem is not an Econet modem nor is a PowerTel modem a PowerTel modem.

The third point has to be repeated: Just because your ISP branded your modem does not make it “their” modem see the next guide on troubleshooting for more on this.

Ubuntu will recognize most modems by default without you installing any drivers. However some modems are Windows-centric meaning that when they are plugged in for the first time they will show themselves as a CD/DVD/USB drive. For such a modem to be recognized as a modem right click on the CD/DVD/USB icon and click select eject. Once the modem is ejected it will be recognized as a modem and the new mobile broadband dialog box will appear.

The setup should be straight forward from then onwards. If the dialog does not appear automatically click on the network manager icon, select the mobile broadband tab and proceed by clicking on the new mobile broadband button. To connect just click on the network manager icon and select the connection of your choice. Also, you do not need a modem if you have a phone with a USB cable just connect it to your computer and jump to the command line steps.

The command line

There are two popular command line programs for connecting to the internet in Ubuntu: ppp and wvdial. Our focus shall be on the latter as it is the easiest.

4. To install wvdial you need a working Internet connection (remember the ZOLspot). Open a terminal and type: sudo apt-get install wvdial

5. Type the command: sudo wvdialconf

This should auto-detect the modem and spew out a lot of output. Do not be intimidated.

6. Enter the command: sudo gedit /etc/wvdial.conf&

7. Remove the # signs prepended to each line. Enter the username and password you got from your ISP. Do not worry about the APN you do not need it.

8. Change the phone number to #777 for CDMA and *99# or *99***1# for Econet and Telecel (both numbers work.)

9. Save the file to connect. Open a terminal and type: sudo wvdial

You will be notified if the connection was successful.

10. If the connection was successful but you are not able to connect to the internet open another terminal and type the following command: sudo route add default ppp0

11. If wvdial was not able to detect your modem first check your desktop to see if it is mounted as a CDROM and eject it as above or type the following command: dmesg|tail

The dmesg command prints out the latest output from the system log which will give you a hint on what is going on under the hood. The outpput itself should make sense to you. For example if the output includes words storage device it means the modem mounted itself as a CD/DVD/USB. You should take not of the line containing what is known as the device path for example if your device is presented as a CDROM and your system has another real CDROM there would most likely be a line saying device has been given the path /dev/sr1. The idea is to look for something beginning with /dev/something. If you find it type the following command in the terminal: sudo eject /dev/sr1

Be sure to replace sr1 with the apropriate device name as displayed by the dmesg command.

Now run the wvidialconf command from step 5 above. If this does not work please wait for the next guide coming soon.

12. There are two graphical frontends for wvdial called gnome-ppp and kpp. kpp is installed by default in Kubuntu I think as a result there will be no need to install wvdial since it will also be installed by default. To install gnome-ppp open a terminal and type: sudo apt-get install gnome-ppp

Please not this command may be used instead of the command in step 4. To use gnome-ppp open dash and type gnome-ppp or select the internet apps category and click on gnome-ppp. To those who have used dial-up internet the interface should be intuitive. First probe for the modem; this is similar to the command in step 5 and your username and password. Use the phone numbers in step 8.

Previous

TrustCo suspends journalists over Econet stories

Next

VimpelCom Group: Telecel’s new Russian Parent

8 Comments

  1. JamesM says:

    While I generally agree with your description some points warrant clarification. Before making a purchase for a modem that works on linux some basic research is warranted. Many modems simply don’t work on Linux. I can safely vouch that Africom (Black ZTE modem), Telecel and Econet modems work flawlessly on linux with out having to tinker with the command-line.
    “There are two graphical frontends for wvdial called gnome-ppp and kpp”. Actually on linux there are many but the point is if linux recognizes your modem, network manager on its own is sufficient to guide you through with the configuration. Only when a modem is not recognised should you resort to the command-line, and the command-line doesn’t guarantee that a modem will work.
    There’s a script called sakis3g, http://www.sakis3g.org/, for those on GSM networks to use with a troublesome modem

    1. Garikai says:

      Thanx for the contribution. I must say however that this guide was written with CDMA modems in mind and the Econet and Telecel lines in step 8 were added as an afterthought the reasoning being that since the user is more or less free to choose their own modem when using the UTMS/GPRS providers there would exploit that freedom and find something that works. Also the red Africom modem works using the command line as i will demostrate in my next article whilst Networkmanager might not work. Indeed some might recall versions of NetworkManager that did not work at all; I think this was the case in Kubuntu Karmic. The command line tools provided by default provide a uniform way for me to write a guide without being bogged down in the trivial differances that come as a result of the user’s desktop choice and are likely to work even in maiden installations without additional software installation. The upcoming article which I have already provided in Ubuntu-Zw lists provides the user with such methods.

  2. Libho says:

    ok guys let’s cut the long story short:
    if you’re running either linux mint 9 > or Ubuntu 9 > (> or above) this will work on both POWERTEL AND AFRICOM CDMA modems
    1: ctrl+alt+t(opening the terminal)
    2: type in as it is without quotes “sudo modprobe usbserial vendor=0x1d09 product=0xaef4” and hit enter
    3: type in your password and wait a few seconds then use the network manager to edit your account settings
    4: connect

    1. Garikai says:

      Thanx for your contribution Libho. I cannot test it though it sure looks like it will work.

  3. Anonymous says:

    @92f7f0bad2de4a040c9be32f8fc8e3e7:disqus Sometimes ejecting a modem does will not change it from mass-storage (CD/DVD) mode: there is a tool called usb-modeswitch you can use to force (certain) modems into modem mode. http://manpages.ubuntu.com/manpages/lucid/man1/usb_modeswitch.1.html

    1. Thanks t_api_wa. Worked like a charm on linux 10.04. To install: sudo apt-get install usb-modeswitch

Comments are closed.