{"id":613,"date":"2013-10-28T17:29:27","date_gmt":"2013-10-28T17:29:27","guid":{"rendered":"http:\/\/www.scaine.net\/site\/?p=613"},"modified":"2017-02-24T17:23:44","modified_gmt":"2017-02-24T17:23:44","slug":"ubuntu-to-android-tethering-over-bluetooth","status":"publish","type":"post","link":"https:\/\/www.scaine.net\/site\/2013\/10\/ubuntu-to-android-tethering-over-bluetooth\/","title":{"rendered":"Ubuntu to Android Tethering over Bluetooth"},"content":{"rendered":"<p>I&#8217;ve been using my Galaxy Nexus device as a bluetooth internet gateway for my Nexus 7 for a few months now. While Android to Android tethering should rightly be <a href=\"https:\/\/www.scaine.net\/site\/2013\/01\/android-to-android-tethering-over-bluetooth\/\" target=\"_blank\">quite straightforward<\/a>, it may be surprising to learn that the same device can be used as an internet gateway for Ubuntu using much the same technique.<\/p>\n<p>Using these simple steps, you can take your Ubuntu laptop to the local coffee shop, pub or library and use your Android phone as a tether. Sure, you could also use the local WIFI in those establishments, but putting aside the hassle of connecting to a new hotspot each time, do you actually trust them in the first place? <a href=\"http:\/\/en.wikipedia.org\/wiki\/Firesheep\" target=\"_blank\">Firesheep<\/a> was an eye opener and if you think it&#8217;s never been repeated less publicly, then you&#8217;re more trusting than I.<\/p>\n<p>And besides, this technique will work in places you can&#8217;t get free WIFI, or indeed any WIFI at all, such as your hotel room, the airport, train, or even your local park. As long as your phone can get signal, you can use it to get an internet connection to your laptop.<\/p>\n<h2><!--more-->Caveat Emptor<\/h2>\n<p>NOTE : Tethering is the act of using your phone&#8217;s internet connection for another device. This means that you need to have a reasonably priced data plan on your phone, or you&nbsp;<em>will<\/em> incur large charges from your mobile operator. It&#8217;s also worth noting that laptops could well use more data than your phone &#8211; it will synchronise with Dropbox, check for O\/S updates, show you the full, desktop based websites instead of the mobile version and generally gobble up data in various other probably unforseen ways, so tread carefully. If you&#8217;re in any doubt how much data you&#8217;re contracted for, contact your mobile operator and confirm it before going wild with tethering!<\/p>\n<h2>Checklist<\/h2>\n<p>So first things first. Here&#8217;s the config and devices I&#8217;m using :<\/p>\n<ul>\n<li>Galaxy Nexus, running Android 4.3<\/li>\n<li>Samsung Chronos 7 laptop running Ubuntu 13.04.<\/li>\n<\/ul>\n<p>But I&#8217;ve confirmed that this works on Ubuntu 12.04 also.<\/p>\n<h2>Pair the Galaxy Nexus and your Ubuntu Laptop<\/h2>\n<p>On the Galaxy Nexus, make sure the BT setting is on, and ideally set it to &#8220;visible&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-472\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-270x480.png\" alt=\"NetworkSettings\" width=\"270\" height=\"480\" srcset=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-270x480.png 270w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-360x640.png 360w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings.png 720w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/p>\n<p>Then on Ubuntu, make sure that Bluetooth is on and set to &#8220;visible&#8221; too:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-622\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/BT-Ubuntu.png\" alt=\"BT-Ubuntu\" width=\"435\" height=\"209\"><\/p>\n<p>And now it should be fairly simple to pair the devices together. On your laptop, choose <strong>Set-up New Device<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-623\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_022-480x335.png\" alt=\"Bluetooth New Device Setup_022\" width=\"480\" height=\"335\" srcset=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_022-480x335.png 480w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_022-640x447.png 640w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_022.png 671w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>Leave your <strong>PIN options<\/strong> set to <strong>automatic<\/strong>. Now, <em>before you click continue<\/em>, unlock your Android device, because you only have about 20 seconds to complete this next step or it fails.&nbsp;Once your Android is unlocked, click&nbsp;<strong>continue<\/strong>, then look for a notification on your Android and select it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-624\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_023-480x307.png\" alt=\"Bluetooth New Device Setup_023\" width=\"480\" height=\"307\"><\/p>\n<p>Assuming the PIN matches what you see on your Ubuntu desktop, click&nbsp;<strong>Pair<\/strong>&nbsp;on your phone, then click&nbsp;<strong>Matches<\/strong>&nbsp;on Ubuntu.<\/p>\n<p>Finally, just tick the box to use your phone as a gateway, and you&#8217;re nearly ready to try out your new connection.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-627\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth-New-Device-Setup_026-480x307.png\" alt=\"Bluetooth New Device Setup_026\" width=\"480\" height=\"307\"><\/p>\n<p>If you forget to tick this box, it&#8217;s easily remedied. Just click on your Bluetooth icon again, choose&nbsp;<strong>Bluetooth settings&#8230;<\/strong> and then click on your phone. The tick should be obvious.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-630\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Bluetooth_025-480x237.png\" alt=\"Bluetooth_025\" width=\"480\" height=\"237\"><\/p>\n<p>Now the foundation is in place, it&#8217;s time to make sure that Android is set to be a gateway.<\/p>\n<h2>Ensure Bluetooth tethering is active<\/h2>\n<p>As I mentioned in <a href=\"https:\/\/www.scaine.net\/site\/2013\/01\/android-to-android-tethering-over-bluetooth\/\" target=\"_blank\">my previous article on Bluetooth tethering<\/a>, Android&#8217;s security model is such that bluetooth tethering is disabled by default. So we need to turn this on.<\/p>\n<p>On Android, go to&nbsp;<strong>Settings<\/strong>, choose&nbsp;<strong>More\u2026<\/strong>&nbsp;then choose&nbsp;<strong>Tethering<\/strong><strong>&nbsp;&amp; Portable Hotspot<\/strong>. In there, you have tick&nbsp;<strong>Bluetoot<\/strong><strong>h tethering<\/strong>. If you don\u2019t, the tether will (silently!) fail to work. Additionally, you&#8217;ll have to complete this step every time your phone reboots AND you&#8217;ll have to repeat this step any time your phone gets very low on charge, as it will turn the option off to conserve power.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-472\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-270x480.png\" alt=\"NetworkSettings\" width=\"270\" height=\"480\" srcset=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-270x480.png 270w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings-360x640.png 360w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/NetworkSettings.png 720w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-471\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/Tethering-PortableHotspot-270x480.png\" alt=\"Tethering-PortableHotspot\" width=\"270\" height=\"480\" srcset=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/Tethering-PortableHotspot-270x480.png 270w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/Tethering-PortableHotspot-360x640.png 360w, https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/01\/Tethering-PortableHotspot.png 720w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/p>\n<p>One neat trick here is to add a shortcut to this setting screen to your Home screen. Just open your app drawer, click on <strong>WIDGETS<\/strong>, then find the <strong>Settings shortcut<\/strong> and drag it to your Home. When it asks what setting you want, choose <strong>Tethering &amp; Portable Hotspot<\/strong>.<\/p>\n<p>That&#8217;s it! Now all you have to do is tell your Ubuntu laptop to use the phone as it&#8217;s network connection.<\/p>\n<h2>Find your device in Network Manager<\/h2>\n<p>This is the easy bit. Now that you&#8217;ve paired a phone, enabled its gateway and told Ubuntu that it is a gateway, it simply shows up in your Network Manager as a wireless network! Here&#8217;s mine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-632\" src=\"https:\/\/www.scaine.net\/site\/wp-content\/uploads\/2013\/10\/Selection_027.png\" alt=\"Network Options\" width=\"350\" height=\"366\"><\/p>\n<p>So all I have to do to connect to the internet through my phone, is to choose &#8220;AndreTheGiant Network&#8221; on my laptop. Your entry will reflect the name of your Android phone, of course.<\/p>\n<p>Once you choose the connection, you&#8217;ll have a five or six second wait as the connection is established and you should have a notification on your Android saying <strong>Tethering or Hotspot Active<\/strong>.<\/p>\n<p>To disconnect, just click on your Network Manager again and choose the&nbsp;<strong>Disconnect<\/strong> option. Simple as that.<\/p>\n<h2>Issues<\/h2>\n<p>On Ubuntu 13.04, you will sometimes see your connection disappear when you disconnect from a bluetooth tether. This makes starting it back up again impossible! You can&#8217;t click on what&#8217;s not there!<\/p>\n<p>One workaround is to restart your laptop. But if you feel like something a bit geekier, there&#8217;s a quicker way. Simply press ALT-F2 to bring up a command bar. Then type&nbsp;<em>killall nm-applet.&nbsp;<\/em>That will stop the &#8220;failed&#8221; instance of your network manager. Now press ALT-F2 again, and type <em>nm-applet<\/em>. All done. You should see your bluetooth connection again.<\/p>\n<p>Hopefully this bug will be fixed in time for the April 2014 release of Ubuntu, but if you want to track its updates, it&#8217;s listed here : <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/network-manager-applet\/+bug\/1180368\">https:\/\/bugs.launchpad.net\/ubuntu\/+source\/network-manager-applet\/+bug\/1180368<\/a>.<em><br \/>\n<\/em><\/p>\n<h2>Summary<\/h2>\n<p>This was a long article because of the foundations you lay during pairing, and the screenshots I&#8217;ve included to make it as clear as possible. But in fact, using your phone in this way for Ubuntu is pretty straightforward, and once you&#8217;ve set it all up, repeat use is an absolute cinch. I hope you found the article useful. If you need more help, I suggest you start with&nbsp;<a href=\"http:\/\/askubuntu.com\/\">http:\/\/askubuntu.com\/<\/a>, but if all else fails, you can always try to comment below.<\/p>\n<p>Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using my Galaxy Nexus device as a bluetooth internet gateway for my Nexus 7 for a few months now. While Android to Android tethering should rightly be quite straightforward, it may be surprising to learn that the same device can be used as an internet gateway for Ubuntu using much the same technique. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":801,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3,4],"tags":[135,136,87,139,138,137,88,134],"class_list":["post-613","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-technical","category-ubuntu","tag-12-04","tag-13-10","tag-bluetooth","tag-firesheep","tag-network","tag-nm-applet","tag-tether","tag-tethering"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/comments?post=613"}],"version-history":[{"count":14,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/posts\/613\/revisions\/802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/media\/801"}],"wp:attachment":[{"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/media?parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/categories?post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scaine.net\/site\/wp-json\/wp\/v2\/tags?post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}