11

I'm trying to setup a NAT on a Raspberry Pi using a WiFi and Bluetooth dongle. The idea would be to access my WiFi (obviously I've got that part working) and make this connection available to devices that have Bluetooth, but no WiFi.

Bluetooth seems to be a complete mess, at least when it comes to coherent documentation.

Obviously I've Googled the problem. The most recent posts (typically 5-6 years old) are typically referring to config files that don't exist in current distributions.

I'm trying to set it up on Debian 8, or for testing on a VM, Ubuntu 16.04.

3
  • by "raspberry" I assume you mean a Raspberry Pi? also, I don't know offhand the exact steps to do this, but I'm betting that the easiest solution will be to just install NetworkManager.
    – strugee
    Nov 1, 2016 at 23:11
  • Sorry, yes. By raspberry I mean a Raspberry Pi in any of it's versions and forms. It was only mentioned to motivate the problem. The NetworkManager, as far as I understood so far, does not connect the bits and bolts of the bluetooth stack. It might somehow help creating bridge devices. My point is rather the complete lag of up-to-date documentation on the entire process
    – Mulle
    Nov 1, 2016 at 23:27
  • NetworkManager cannot do the server-side of Bluetooth (at least, it cannot create such a setup, you might be able to use NetworkManager to configure IP and NAT on top of the devices you created). I suspect the way to do that is using bluez...
    – thaller
    Nov 2, 2016 at 7:18

1 Answer 1

12

I'm not sure why this answer was voted down, since - I think - it answered the question. In a very simple way, I know. Anyway here goes my answer, which is basically an expanded version of the linked answer:

In order to share a wifi connection over bluetooth so that other devices can access the internet through this wifi connection, this worked for me:

  1. Install blueman package.

    $ sudo apt install blueman

  2. From a terminal window, open Blueman Local Services:

    $ blueman-services

Blueman Local Services window

  1. Just fill the above window as specified and click "Apply" (if it is grayed, just change anything and revert).

  2. Open Blueman Manager to make it easier to connect devices.

    $ blueman-manager

Blue Manager window

Then, to use this connection from my Android phone:

  1. Pair Android 6.0.1 phone and computer

1.1 Enable bluetooth

1.2 Enter bluetooth settings and make device discoverable

1.3 On PC, click "Search", find your phone and click the Keys button on the toolbar.

1.4 Confirm pairing both on your phone AND on PC.

1.5 Optionally you can mark this connection as "Trusted" by clicking the Star button on the Blueman Manager window.

  1. Enable network connection from Android phone

2.1 Enter bluetooth settings and click the area pointed by the following image.

Bluetooth settings

2.2 From the screen that will open, turn on the "Internet access" option.

Bluetooth device configuration

That's it. Within a few seconds, I had internet.

The procedure is very similar if you want to connect another device to the internet, such as a Windows PC. Just pair and enable internet through the connection.

My OS:

$ cat /etc/issue
Ubuntu 17.10 \n \l

Bottom note: I know the OP asked for the procedure for a Raspberry Pi, but, as it is Debian-based, everything I wrote applies.

2
  • Your solution is good. But I want my phone to see the ubuntu device (from which I want to give internet access via bluetooth) as a mobile phone and not a PC, because my phone only shows "Internet Access" option (along with "Media Audio") as a connecting option if the device is a phone and does not show this option if device is PC. Is it possible? May 22, 2021 at 19:45
  • Yeah this doesn't work.
    – Ken Sharp
    Aug 31, 2021 at 23:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .