Satish B. SettyArchiveAboutRSS Feed

Use your Android phone as a USB modem

This article describes how to connect your Android phone as a USB modem on Debian-based Linux machines. Before you proceed, it is recommended to check out this Tekno Magnus how-to for Samsung Galaxy phones, which details the process for out-of-the-box USB tethering. Unfortunately, Samsung Galaxy S with 2.3.3 (Gingerbread) has a bug that USB tethering no longer works. This article uses a workaround for that bug.


Setting up wvdial

Instead of USB tethering, we set up a PPP connection using wvdial.

  1. Turn on the data connection on your phone.

  2. Select Samsung Kies mode from Settings → Wireless and network → USB settings. Do not activate USB tethering from the menus !

  3. Install wvdial on Debian/Ubuntu: sudo apt-get install wvdial

  4. Connect your phone via USB to your computer. It will be auto-detected as modem (/dev/ttyACM0)

  5. Run sudo wvdialconf This will create a stub /etc/wvdial.conf file.

  6. Edit /etc/wvdial.conf file to match the settings of your operator. The following works for DNA. For Saunalahti or Elisa, check the articles in links. Basically, you need to change the Init3 line and may be username/password for operators other than DNA.

        [Dialer Defaults]
        Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
        Modem Type = USB Modem
        Phone = *99#
        ISDN = 0
        Init1 = ATZ
        Modem = /dev/ttyACM0
        Baud = 460800
        Username = ''
        Password = ''
        Modem Type = USB Modem
        Stupid Mode = 1
        New PPPD = yes
        Init3 = AT+CGDCONT=1,"IP","internet"
  7. Whenever you want to connect to the internet, just run: sudo wvdial If the connection is successful, you’ll see the local/remote IP addresses and primary/secondary DNS addresses.

  8. Now you are ready to browse the Web ! You may need to restart your browser for the changes to take effect. You can always ping to see if it works.

  9. When you are finished browsing, press CTRL+C to stop wvdial. Remove the USB between your phone and the computer. If you want to reconnect, just connect the USB and run sudo wvdial again. No need to edit /etc/wvdial.conf.

  1. Tekno Magnus: Samsung Galaxy S, S II and Tab as 3G Router
  2. Ubuntu cable dialup