<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>3G Internet on Raspberry Pi &#8211; Success! &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sun, 13 Jul 2025 08:45:40 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>3G Internet on Raspberry Pi &#8211; Success! &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[3G Internet on Raspberry Pi - Success!]]></title>
		<link>https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/</link>
					<comments>https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 13 Jul 2012 12:22:16 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[3g]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=6029</guid>

					<description><![CDATA[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&#039;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&#039;s USB sockets can supply.    In the above…]]></description>
										<content:encoded><![CDATA[<p>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 <a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-python-and-3g-dongles-oh-my/">Raspberry Pi to send SMS</a>.</p>

<h2 id="thats-the-power-of-love"><a href="https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/#thats-the-power-of-love">That's The Power Of Love</a></h2>

<p>The first thing to say is <strong>use a powered USB hub!</strong>  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.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/07/3G-Raspberry-Pi.jpg" alt="3G Raspberry Pi" title="3G Raspberry Pi" width="600" height="473" class="aligncenter size-full wp-image-6077">

<p>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).</p>

<p>I used a USB Y Cable to supply power and data.
<a href="http://www.amazon.co.uk/gp/product/B001U3ZP1K/ref=as_li_ss_il?ie=UTF8&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B001U3ZP1K&amp;linkCode=as2&amp;tag=shkspr-21"><img border="0" src="https://images-eu.ssl-images-amazon.com/images/I/51ixvkiidOL._SL160_.jpg"></a></p>

<p>I also tried plugging both plugs into the Pi - that didn't work either. You need a separate powered hub.</p>

<p>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.
<a href="http://www.amazon.co.uk/gp/product/B0073JB4QU/ref=as_li_ss_il?ie=UTF8&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B0073JB4QU&amp;linkCode=as2&amp;tag=shkspr-21"><img border="0" src="https://images-eu.ssl-images-amazon.com/images/I/41NchTALabL._SL160_.jpg"></a></p>

<p>Or, you can use a cable like this.
<a href="http://www.amazon.co.uk/gp/product/B00188E2QQ/ref=as_li_ss_il?ie=UTF8&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B00188E2QQ&amp;linkCode=as2&amp;tag=shkspr-21"><img border="0" src="https://images-eu.ssl-images-amazon.com/images/I/41t9LApCNvL._SL160_.jpg"></a></p>

<p>Put one male USB plug into the PI and the other into a power supply.  The dongle fits into the female USB socket.</p>

<h2 id="p-p-p-p-pick-up-a-pppd"><a href="https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/#p-p-p-p-pick-up-a-pppd">P-p-p-p-pick Up A PPPD</a></h2>

<p>In order to get our network connected, we need to install the ppp package.</p>

<pre>sudo apt-get install ppp</pre>

<h2 id="if-you-think-im-sakis-and-you-want-my-body"><a href="https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/#if-you-think-im-sakis-and-you-want-my-body">If You Think I'm Sakis, And You Want My Body...</a></h2>

<p>I tried using wvdial and numerous other ways to connect to 3G. None of them worked reliably.  In the end, I turned to <a href="https://web.archive.org/web/20120718050935/http://www.sakis3g.org/">sakis</a> - the All-In-One script for connecting 3G modem.</p>

<p>Sakis says it is:</p>

<blockquote>"The easiest way to have your 3G/UMTS/GRPS connection up and running." </blockquote>

<p>I can't argue with that!</p>

<p>Installation is very simple:</p>

<p>First, download the latest version.  The Raspberry Pi runs on an ARM processor, so this is the version we download.</p>

<pre>wget "http://www.sakis3g.org/versions/latest/armv4t/sakis3g.gz"</pre>

<p>The script is compressed.  Unzip it.</p>

<pre>gunzip sakis3g.gz</pre>

<p>Finally, we want to make the file executable so that we can run it.</p>

<pre>chmod +x sakis3g</pre>

<p>Running sakis is quite straightforward.  It has a basic GUI which will work even if you're just using the command line.</p>

<pre>sudo ./sakis3g --interactive</pre>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/07/sakis3g-interface.gif" alt="sakis3g interface" title="sakis3g interface" width="600" height="331" class="aligncenter size-full wp-image-6085">

<p>Sakis has a fairly comprehensive list of connection details - it should find yours automatically and present you with this screen.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/07/sakis3g-interface-APN.gif" alt="sakis3g interface APN" title="sakis3g interface APN" width="600" height="329" class="aligncenter size-full wp-image-6084"></p>

<p>If it doesn't know your connection settings (if you're on GiffGaff for example) you can manually enter them.</p>

<p>All being well, after a few seconds, you should see this screen.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/07/sakis3g-interface-connected.gif" alt="sakis3g interface connected" title="sakis3g interface connected" width="600" height="328" class="aligncenter size-full wp-image-6083"></p>

<p>You can now exit sakis.  You will stay connected.</p>

<p>To check the details of your connection, run the following command:</p>

<pre>sudo ./sakis3g connect info</pre>

<p>You'll get back something like this:</p>

<pre>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
</pre>

<p>That's it! You can now access the Internet via your 3G modem.</p>

<h2 id="surfin-safari"><a href="https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/#surfin-safari">Surfin' Safari</a></h2>

<p>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 <a href="http://lynx.isc.org/">Lynx</a>.</p>

<p>You install it by typing:</p>

<pre>sudo apt-get install lynx</pre>

<p>You run it by typing:</p>

<pre>lynx http://www.bbc.co.uk/news</pre>

<p>(or whatever website you want to visit).
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/07/lynx.gif" alt="lynx on the Raspberry Pi" title="lynx" width="600" height="364" class="aligncenter size-full wp-image-6086"></p>

<p>So, that should be everything you need to get the Raspberry Pi connected over a USB 3G dongle.  Have fun!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=6029&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/feed/</wfw:commentRss>
			<slash:comments>142</slash:comments>
		
		
			</item>
	</channel>
</rss>
