BeagleBone running ubuntu and connected to internet using 3G usb

I managed to get my BeagleBone running ubuntu to connect to the
internet via a standard prepaid 3G USB dongle.
In my case this is a vodafone uk prepaid 3G modem, model K3772-Z,

Just in case anybody is trying this, here are the steps:

- Install wvdial, like so:
sudo apt-get install wvdial

- Plug in an external power supply, the USB power from a host alone
will not be enough to also power the 3G modem.
  (I use a %V 2.5amp switched mode power supply, bought cheaply from Maplin)

- Plug in the dongle, wait that it is showing some activity (flashing
an led), run 'dmesg' to see if it was recognised by the bone.

- Most tutorials I found say that you now need to use usb-modeswitch
to switch the USB device from mass-storage mode to modem mode. I found
that this is not necessary with the K3772-Z.

- Now configure wvdial as root, by running:
sudo wvdialconf

This will write the file /etc/wvdial.conf after probing for the
correct USB device (by scanning /dev/tty*), and trying initialisations
that work for that modem device.

- Edit the file (as root) and complete it by filling in the Username
and Password, and the APN settings. This information can be found on
the vodafone uk website, here:

- Find your device (mine is the K3772-Z, and on the support page in
the overview you can find which APN, Username and Password you should
use. This was the crucial information, and if it is wrong, the modem
simply won't connect.

For example for the prepaid K3772-Z the settings are:
Username and Password: web, APN: smart

- Now add the information about the APN, user and password to
/etc/wvdial.conf like this:
Username = web
Password = web
Init3 = AT+CGDCONT=1,"IP","smart"

- Save the file, and you're ready to go:

sudo wvdial

Look up other configuration options there are for wvdial on the web.

As I said, this worked for me, for a vodafone k3772-z, prepaid in the
UK. If your device and provider differs, use this only as guidance,
not verbatim.


Cool, since ppp is installed by default I'll add wvdial by default too
going forward... (that should help with the chicken/egg problem with
no ethernet as you need to install a pkg to get ethernet.)


That Would be very nice and definitely save me som time although I do
connect with ppp alone but it would be nice to use wvdial instead.

If needed the followings work fine for Three Mobile (Huawei) USB Dongle.

$ cat /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyUSB0
Username = three
Password = three
Dial Command = ATDT
Baud = 9600

[Dialer three]
Init2 = ATZ
Init3 = ATQ0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,“IP”,“3internet”
ISDN = 0
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
Baund = 460800

$wvdial three