| 
View
 

3G Internet

Page history last edited by Jon Davies 12 years, 6 months ago

Good day people!

 

As part of a bigger project, I have figured out how to get a spare Huawei E160 (I found unused in a drawer at work - permanently acquired with permission!) to connect to the GiffGaff 3G mobile internet service.  The following method should work for a variety of 3G Dongles and Service Providers though, because the tool in use - Sakis3G - appears to be very flexible and extensible.

 

Hardware

You NEED the following items as a bare minimum:

  • Raspberry Pi board

  • SD Card with Raspbian Wheezy
  • Input/Output 
    • 'Headerless' option
      • Network connection
      • Laptop/Desktop Computer on same network
    • 'KVM' option
      • USB Keyboard
      • USB Mouse
      • HDMI/DVI Monitor
  • Powered USB hub
    NOTE: Your rPi will NOT have enough power for the dongle!  You have been warned! :) 
  • 3G Dongle and SIM with a Data tariff
    NOTE: You may be charged more than you bargained for if your SIM doesn't have a decent Data tariff!  You have been warned!  Again! :)

 

Getting Started - Interactive Mode

The site I found the answer to the 3G problem was Terence Eden's Blog.  Here's a shortened version of the solution - copy and paste the following text into a console on your rPi:

 

sudo apt-get -y install ppp
wget "http://www.sakis3g.org/versions/latest/armv4t/sakis3g.gz"
gunzip sakis3g.gz
chmod +x sakis3g
sudo ./sakis3g --interactive

...after which you'll be presented with the Sakis3G interactive configuration:

sakis3g interface

Select 'Connect with 3G'

sakis3g interface APN

Sakis3G has a fairly comprehensive list of service providers, so yours may well be listed.  I have been using a 'GiffGaff' SIM so had to select 'Custom APN' and enter some alternative details to the above suggestions.

sakis3g interface connected

Despite Sakis3G lacking the GiffGaff APN information, it still coped just fine once I'd supplied the information it had requested.

 

Note that the successful connection on 3G seems to break the default connection on the LAN interface in Raspbian Wheezy, as in, the LAN interface connection was no longer usable.  However, when I manually configured interface settings (rather than using DHCP), the LAN interface continued to be usable.

 

Command Line Mode v1

(Custom APN)

Since toying further with the Sakis3G tool and referring to the Sakis3G Wiki, I've also put together a set of non-interactive commands for connecting and disconnecting to my custom service provider.  If you also use a custom service provider, these may be a handy reference for you:

Connect:

sudo ./sakis3g connect APN="CUSTOM_APN" CUSTOM_APN="giffgaff.com" APN_USER="giffgaff" APN_PASS="password"

Disconnect:

sudo ./sakis3g disconnect

 

Command Line Mode v2

(Config File with Custom APN)

A bit more rummaging around the internet and I found a page with an example config file where I can put my custom APN settings.  This means the non-interactive commands are simpler:

Add custom APN in Config File:

  1. Open the config file in your favouride editor:
    sudo nano /etc/sakis3g.conf
  2. Add/edit the following configuration:
    APN=CUSTOM_APN
    CUSTOM_APN="giffgaff.com"
    APN_USER="giffgaff"
    APN_PASS="password"
  3. Close and save the configuration file.

Connect:

Now there is a config file with the custom APN details, there is no need to specify them on the command line.

sudo ./sakis3g connect

Disconnect:

sudo ./sakis3g disconnect

 

The latest Sakis3G tool can be found at http://www.sakis3g.org/.

 

Enjoy!

 

Jon.

Comments (0)

You don't have permission to comment on this page.