3G Internet on Raspberry Pi - Success!
This is a bit of a brain dump of how I got a 3G USB dongle working on the Raspberry Pi. Following on from getting the Raspberry Pi to send SMS.
That's The Power Of Love
The first thing to say is use a powered USB hub! I had lots of problems getting the modem working when it was plugged directly into the Pi. A 3G signal takes more power than the Pi's USB sockets can supply.

In the above image, you can see that the Raspbery Pi is plugged into the mains - via a 1.8A plug. The USB cable has two male ends. The black plug goes directly into the Pi for data. The red plug goes into the mains via a 1A plug (an Amazon Kindle adapter).
I used a USB Y Cable to supply power and data.
I also tried plugging both plugs into the Pi - that didn't work either. You need a separate powered hub.
Rather than use two plugs, I'm going to try to find a mains plug with two USB sockets. Each socket needs to supply at least 1A. Something like this looks like it should do the trick.
Or, you can use a cable like this.
Put one male USB plug into the PI and the other into a power supply. The dongle fits into the female USB socket.
P-p-p-p-pick Up A PPPD
In order to get our network connected, we need to install the ppp package.
sudo apt-get install ppp
If You Think I'm Sakis, And You Want My Body...
I tried using wvdial and numerous other ways to connect to 3G. None of them worked reliably. In the end, I turned to sakis - the All-In-One script for connecting 3G modem.
Sakis says it is:
"The easiest way to have your 3G/UMTS/GRPS connection up and running."
I can't argue with that!
Installation is very simple:
First, download the latest version. The Raspberry Pi runs on an ARM processor, so this is the version we download.
wget "http://www.sakis3g.org/versions/latest/armv4t/sakis3g.gz"
The script is compressed. Unzip it.
gunzip sakis3g.gz
Finally, we want to make the file executable so that we can run it.
chmod +x sakis3g
Running sakis is quite straightforward. It has a basic GUI which will work even if you're just using the command line.
sudo ./sakis3g --interactive

Sakis has a fairly comprehensive list of connection details - it should find yours automatically and present you with this screen.
If it doesn't know your connection settings (if you're on GiffGaff for example) you can manually enter them.
All being well, after a few seconds, you should see this screen.
You can now exit sakis. You will stay connected.
To check the details of your connection, run the following command:
sudo ./sakis3g connect info
You'll get back something like this:
K3565 connected to giffgaff (23410). Connection Information Interface: P-t-P (ppp0) Connected since: 2012-07-13 07:36 Kilobytes received: 2 Kilobytes sent: 2 Network ID: 23410 Operator name: giffgaff APN: giffgaff.com Modem: K3565 Modem type: USB Kernel driver: option Device: /dev/ttyUSB0 IP Address: 10.136.6.52 Subnet Mask: 255.255.255.255 Peer IP Address: 10.64.64.64 Default route(s): 10.64.64.64
That's it! You can now access the Internet via your 3G modem.
Surfin' Safari
One last tip for you! There's no need to start your window manager to surf the web. There's a brilliant lo-fi web browser called Lynx.
You install it by typing:
sudo apt-get install lynx
You run it by typing:
lynx http://www.bbc.co.uk/news
(or whatever website you want to visit).
So, that should be everything you need to get the Raspberry Pi connected over a USB 3G dongle. Have fun!
allaun says:
juanRIOT says:
Jimbob says:
SRullo says:
SRullo says:
richard says:
richard says:
Andrew says:
Stefan says:
novalis says:
Ferdinando says:
Ferdinando says:
Pranao Walekar says:
Ferdinando says:
Ferdinando says:
ahmed wahdan says:
sanjay says:
pi says:
Marko Novak says:
Damage says:
khingcat says:
khingcat says:
Mequa says:
Damage says:
Mequa says:
fcastril says:
Henry says:
Richard M says:
NiBa says:
Amogh says:
Amogh says:
Amogh says:
Marius says:
Michael says:
Peter says:
exstud says:
lepidas blades says:
FD says:
Nick B says:
lauhub says:
GekkePrutser says:
exstud says:
exstud says:
Tony says:
Zoltan M. says:
Zoltan M. says:
Zoltan M. says:
exstud says:
Zoltan M. says:
Neil says:
Michal says:
Giuseppe says:
Giuseppe says:
Cyan says:
RobotZombie (@NecBalaam) says:
Dario Cillerai says:
Dario Cillerai says:
Dario Cillerai says:
Gnichi M says:
Jochen says:
stakhanov says:
kyle says:
Bill says:
Sam says:
JoeBob says:
xavier says:
clementine says:
Sorath Asnani says:
Sufi says:
Sufi says:
Sufi says:
Sufi says:
atat says:
Googly says:
gazaeyesight says:
oldnick says:
Terence Eden says:
oldnick says:
Terence Eden says:
clementine says: