Tag: Bluetooth

Internet via Bluetooth in Linux: how to set up and why the speed is slow

In this tutorial, you will learn how to set up an Internet connection via Bluetooth in Linux, as well as why the Internet speed via Bluetooth is slow.

How to connect my computer to the Internet through my phone via Bluetooth

Internet via Bluetooth is one of the options for using a mobile phone to access the Internet from a computer. Looking ahead, we note that this is not the best option because:

1) the connection speed will be quite slow,

2) the setup, although generally simple, is slightly more complicated than other connection options

As alternative methods for accessing the Internet from a computer via a mobile phone, the following are recommended:

If your computer does not have Wi-Fi and you do not have a USB data cable for connecting your phone by wire, then the method described in this article is suitable for you – accessing the Internet via the mobile phone's Bluetooth tethering.

The connection algorithm is as follows:

  1. Pairing your phone and computer via Bluetooth
  2. Turning on the Bluetooth tethering on the phone
  3. Setting up a computer, which consists in connecting to the phone's Bluetooth tethering (selecting Bluetooth as the Access point)

So, let's look at how to connect a computer to the Internet through Bluetooth and your mobile phone in Linux.

Checking and starting the Bluetooth service

Connecting a mobile phone to a computer via Bluetooth is called pairing.

Check if the Bluetooth service is running on your computer – to do this, connect your Bluetooth device (if it is disconnected) and look for the Bluetooth icon next to the clock:

The Bluetooth service status can be checked on the command line:

systemctl status bluetooth

If the status of the service is other than “active (running)” and you do not see the Bluetooth tray icon, then you need to execute the following commands from this section. If the service is running, skip the following commands and skip directly to the next section to pair your phone with your computer.

Install required packages in Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives:

sudo apt install bluez blueman

Install required packages in Arch Linux, Manjaro, BlackArch and their derivatives:

sudo pacman -S bluez bluez-utils pulseaudio-bluetooth blueman

The following commands are the same for all distributions.

Start bluetooth service:

sudo systemctl start bluetooth

Adding it to startup:

sudo systemctl enable bluetooth

Connecting a mobile phone to a computer via Bluetooth (phone pairing)

Turn on Bluetooth on your mobile phone.

Both a mobile phone and a computer can initiate pairing.

On your mobile phone or computer, search for Bluetooth devices.

If the devices do not see each other, then start searching for devices at the same time on the computer and mobile phone.

When the desired device is found, click on it to start pairing.

A prompt will appear on your mobile phone to establish pairing – agree to this proposal.

   

After that, on the computer it will be proposed to pair with the phone – agree (“Confirm”). If you are prompted to connect by someone else's device, then reject the request (“Deny”).

Immediately after pairing, or at the next connection, an authentication request will be made – the options are “Always accept” and “Accept”. The “Deny” button means rejecting the request.

After pairing, and also if you have selected the “Always accept authentication” option, the devices will connect to each other automatically as soon as Bluetooth is enabled on them.

Turning on the Bluetooth tethering

Go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “Bluetooth tethering”.

   

Connect to a Bluetooth tethering on a computer

Your computer's network settings should now show an option for Bluetooth, Mobile broadband, or similar.

Activate this connection so that the computer starts using the Internet via Bluetooth.

You can turn on the Bluetooth connection directly on the computer, bypassing the steps to turn on the Bluetooth tethering on the phone as shown above – in this case, the phone will prompt you to Allow Bluetooth tethering.

Why is the Internet speed slow over Bluetooth

When successfully connecting to the Internet via Bluetooth, the first thing you may notice is the speed of the connection. On the most modern Bluetooth 5.* protocols, it is up to 1.4 megabits per second (2 megabits per second at the moment). As you can see from the screenshot, the speedtest.net Internet connection speed test showed a speed of 1.66 megabits per second.

This is 210-220 kilobytes per second, if these units are more familiar to you. This is very slow, and on Bluetooth versions 4.* the speed is only 800 kilobits per second, that is, 2 times slower.

See also: How to find out the Bluetooth version for the adapter and peripherals in Linux

Thus, if the speed of the Internet via Bluetooth is too slow for you, all you can do to increase the speed of the Internet via Bluetooth is to switch to the Bluetooth 5.* protocol (both devices – the phone and the computer – must support this protocol). If this speed is not enough for you, then use Wi-Fi or data transfer via USB:

How to connect a computer to the Internet via Bluetooth in Windows

Table of contents

1. How to connect my computer to the Internet through my phone via Bluetooth

2. Connecting a mobile phone to a computer via Bluetooth (phone pairing)

3. Turning on the Bluetooth tethering

4. Connect to a Bluetooth tethering on a computer

5. How to Disconnect from a Bluetooth Connection

5.1 To turn off Bluetooth Internet on a computer

5.2 To turn off Bluetooth Internet on your mobile phone

6. “The connection with the Bluetooth network device failed” error

7. Why is the Internet speed slow over Bluetooth


In this tutorial, you will learn how to set up an Internet connection via Bluetooth in Windows, as well as why the Internet speed via Bluetooth is slow.

1. How to connect my computer to the Internet through my phone via Bluetooth

Internet via Bluetooth is one of the options for using a mobile phone to access the Internet from a computer. Looking ahead, we note that this is not the best option because:

1) the connection speed will be quite slow,

2) the setup, although generally simple, is slightly more complicated than other connection options

As alternative methods for accessing the Internet from a computer via a mobile phone, the following are recommended:

If your computer does not have Wi-Fi and you do not have a USB data cable for connecting your phone by wire, then the method described in this article is suitable for you – accessing the Internet via the mobile phone's Bluetooth tethering.

The connection algorithm is as follows:

  1. Pairing your phone and computer via Bluetooth
  2. Turning on the Bluetooth tethering on the phone
  3. Setting up a computer, which consists in connecting to the phone's Bluetooth tethering (selecting Bluetooth as the Access point)

So, let's look at how to connect a computer to the Internet through Bluetooth and your mobile phone in Windows.

2. Connecting a mobile phone to a computer via Bluetooth (phone pairing)

Turn on Bluetooth in Windows if you haven't already. This can be done by clicking on the network connection button next to the clock.

In Windows, right-click on the Bluetooth icon and select “Go to Settings” from the context menu that opens.

Click the “Add device” button.

In the window that opens, select “Bluetooth”.

Turn on Bluetooth on your mobile phone.

Start Scan for Bluetooth devices.

If the devices do not see each other, then start searching for devices at the same time on the computer and mobile phone. If you don't succeed the first time, try again.

When the desired device is found, click on it to start pairing.

Do the same on the computer.

A prompt will appear on your mobile phone to establish pairing – agree to this proposal.

Do the same on the computer – click the “Yes” button.

Make sure the connection was successful.

If the connection fails, try again.

3. Turning on the Bluetooth tethering

Go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “Bluetooth tethering”.

   

4. Connect to a Bluetooth tethering on a computer

Right-click on the “Network” icon and select “Network and Internet settings” in the context menu that opens.

In the window that opens, select “Advanced network settings”.

Then select “More network adapter options”.

In the Network Connections window, find Bluetooth Network Connection, right-click it and select View Bluetooth Network Devices.

In the “Devices and Printers” window that opens, find the phone, right-click on it. In the context menu, select “Connect using” and select “Access point” in the list that opens.

After that, the computer will be connected to the Internet via the Bluetooth of the mobile phone.

5. How to Disconnect from a Bluetooth Connection

To turn off Bluetooth Internet on a computer

Right-click on the “Network” icon (next to the clock) → Advanced network settings → More network adapter options → Right-click on “Bluetooth Network Connection” → select “View Bluetooth Network Devices” from the context menu.

In the “Devices and Printers” window that opens, find the phone, right-click on it. Select “Disconnect from device network” from the context menu.

To turn off Bluetooth Internet on your mobile phone

Go to Settings → Connections → Bluetooth.

Click on the gear of the connection you are using.

Turn off “Internet connection sharing”.

6. “The connection with the Bluetooth network device failed” error

At the stage “4. Connect to a Bluetooth tethering on a computer” you may encounter an error:

The connection with the Bluetooth network device failed. The device may already be connected to another computer, or it may need to be configured to accept connections from this computer. Consult your device documentation for further information.

It usually means that you did not follow the steps described in step “3. Turning on the Bluetooth tethering”.

On the phone, you will be prompted to “Allow Bluetooth tethering”, if you select “Allow”, then the reconnection will be successful.

7. Why is the Internet speed slow over Bluetooth

When successfully connecting to the Internet via Bluetooth, the first thing you may notice is the speed of the connection. On the most modern Bluetooth 5.* protocols, it is up to 1.4 megabits per second (2 megabits per second at the moment). As you can see from the screenshot, the speedtest.net Internet connection speed test showed a speed of 1.66 megabits per second.

This is 210-220 kilobytes per second, if these units are more familiar to you. This is very slow, and on Bluetooth versions 4.* the speed is only 800 kilobits per second, that is, 2 times slower.

See also: How to check Bluetooth version in Windows

Thus, if the speed of the Internet via Bluetooth is too slow for you, all you can do to increase the speed of the Internet via Bluetooth is to switch to the Bluetooth 5.* protocol (both devices – the phone and the computer – must support this protocol). If this speed is not enough for you, then use Wi-Fi or data transfer via USB:

How to connect your phone to the Internet using another phone’s Bluetooth

How to share mobile Internet for another phone via Wi-Fi and Bluetooth

Using Bluetooth, a mobile phone can share the Internet (share an Internet connection) with another phone or computer. The speed of Bluetooth is quite slow, so it is recommended to create a mobile Wi-Fi hotspot on your phone and distribute the Internet through it, see how to do this in the article “How to share mobile Internet with other phones and computers”.

If Wi-Fi for some reason does not suit you, then you can distribute the Internet via Bluetooth. Scenario example: An Internet donor phone is connected via Wi-Fi to an Access Point. You need to connect a second phone to the Internet, but you can't or don't want to do it over Wi-Fi. In this case, as a temporary connection, you can distribute the Internet via Bluetooth.

How to share the Internet via Bluetooth

Start by pairing phones via Bluetooth.

To do this, turn on Bluetooth on both phones and click the “Search” button.

To go to the Bluetooth settings, press and hold the Bluetooth icon that you previously used to turn on Bluetooth.

In the Available devices list, select the phone you want to pair with.

On both phones, tap “Pair”.

After that, on the phone that you want to connect via Bluetooth to the Internet, click the gear icon opposite the donor phone that will distribute the Internet.

In the window that opens, activate “Internet access”.

Then return to the donar phone – on the screen of which a request will appear to allow the Bluetooth tethering mode, click the “Allow” button.

If you get confused as to which phone has a Bluetooth tethering enabled and which one is using the Internet via Bluetooth, then the Bluetooth connection setting for the donor phone will say “Internet connection sharing”.

And on a phone that uses the Internet via Bluetooth, it will say “Internet access”.

How to check Bluetooth version in Windows

To determine the Bluetooth version on a Windows computer, you need to open Device Manager.

This can be done in several ways at once:

1) Click on the start menu and start typing ‘Device Manager’, click on the suggested match.

2) OR open the ‘Power User Menu’ using the Win+x keyboard shortcuts and select ‘Device Manager’ there

3) OR press Win+r and type to execute:

devmgmt.msc

In Device Manager, find Bluetooth and expand the list:

Locate the Bluetooth adapter. Its name will vary depending on your specific hardware, but you should usually look for something like ‘Intel Wireless Bluetooth’ or ‘Bluetooth Adapter’.

The name itself may already indicate the version of the supported Bluetooth standard (as in the screenshot below). If so, you can ignore the next step since you have the answer!

If you're having trouble finding the right item in the list, one thing's for sure; the element you need to find in the list will not contain the word ‘Enumerator’, so ignore all such entries.

Double-click on the device name to open the properties of the device that you consider to be the primary Bluetooth adapter. You'll know right away if you're in the right element as you should see an ‘Advanced’ tab with content similar to the one shown below.

On this screen, you need to find the ‘Firmware Version’, i.e. HCI and LMP (Link Manager Protocol).

For example, on the screen you can see the version ‘10.256’. Now we need to convert the LMP version of the Bluetooth adapter to the actual supported Bluetooth version. Please note that your LMP version may be a decimal number. As you can see from the LMP table, any LMP number starting with 10 means that your adapter supports version 5.1 inclusive of the Bluetooth standard.

Link Manager Protocol Version (LMP)

Bluetooth Core Specification 

LMP 0

Bluetooth Core Specification 1.0b (withdrawn)

LMP 1

Bluetooth Core Specification 1.1 (withdrawn)

LMP 2

Bluetooth Core Specification 1.2 (withdrawn)

LMP 3

Bluetooth Core Specification 2.0 + EDR (withdrawn)

LMP 4

Bluetooth Core Specification 2.1 + EDR (deprecated, to be withdrawn)

LMP 5

Bluetooth Core Specification 3.0 + HS (deprecated, to be withdrawn)

LMP 6

Bluetooth Core Specification 4.0

LMP 7

Bluetooth Core Specification 4.1

LMP 8

Bluetooth Core Specification 4.2

LMP 9

Bluetooth Core Specification 5.0

LMP 10

Bluetooth Core Specification 5.1

LMP 11

Bluetooth Core Specification 5.2

The latest Bluetooth versions at the moment are 5.2 and 5.3. Still current specs 4.0/4.1 and later. If your adapter is older, using a new Bluetooth adapter on your computer may help improve the quality of your Bluetooth connection. If you are using devices that send a lot of data, such as constantly streaming audio or video, you really need to make sure that both the adapter and the device are compatible with at least Bluetooth version 3.0 + HS, and preferably 4.0 and later.

For reference: in version 5.*, the data transfer rate is doubled compared to 4.*.

How to turn off Bluetooth to disable pairing and any connections

How to permanently disable Bluetooth on Linux

This note shows how to remove the bluetooth completely, as well as exclude any possibility of connecting it.

Start by deactivating and uninstalling the bluetooth service.

Remove from startup and stop the bluetooth service:

sudo systemctl disable bluetooth
sudo systemctl stop bluetooth

Remove the bluez package.

On Debian and derivatives:

sudo apt remove bluez

On Arch Linux and derivatives:

sudo pacman -R bluez

The bluetooth kernel module is included in the kernel, so removing packages like bluez and blueman may not completely solve the problem of disabling Bluetooth – if you remove these packages, you will not have tools and graphical applets for monitoring Bluetooth, but this does not mean that at the kernel level Bluetooth devices (such as a Bluetooth USB dongle) will not connect, or peripherals will not pair.

To disable Bluetooth, we will use disabling the kernel module, which is described in the section “Modules blacklisting”.

See also: Linux kernel modules

As you can see, the blueman applet, and therefore Bluetooth, is working.

To disable bluetooth module create /etc/modprobe.d/blacklist.conf file:

sudo gedit /etc/modprobe.d/blacklist.conf

and copy the following into it:

blacklist bluetooth
install bluetooth /bin/true

Restart your computer for the changes to take effect.

As you can see, Bluetooth is no longer working:

How to turn off Bluetooth until next reboot

To temporarily unload (turn off) the module, run the command:

sudo modprobe -r bluetooth

You may encounter an error:

modprobe: FATAL: Module bluetooth is in use.

If the previous command fails, then try the following alternative:

sudo rmmod bluetooth

Output example:

rmmod: ERROR: Module bluetooth is in use by: btrtl btintel btbcm bnep btusb rfcomm

As you can see, the program failed again, but displayed a list of modules that use the bluetooth kernel module and, therefore, which make it impossible to disable bluetooth.

Let's try to unload all these modules:

sudo rmmod bluetooth btrtl btintel btbcm bnep btusb rfcomm

In my case, executing the command several times in a row unloaded almost all modules and Bluetooth was turned off.

Bluetooth disconnected in this way will work again after reboot.

How to find out the Bluetooth version for the adapter and peripherals in Linux

Bluetooth management in Linux

Linux uses utilities to control Bluetooth from a package called bluez in Debian and derivatives, and bluez-utils in Arch Linux and derivatives. But some time ago, a number of Bluetooth management tools were declared deprecated, although no alternative was proposed to them. Different distributions solve this problem in different ways. On Debian and derivatives, the bluez package is compiled with a flag to enable deprecated tools. And on Arch Linux and derivatives the bluez-utils-compat package is mantained by the community in the AUR, which is also compiled with a flag to enable legacy tools.

For the purposes of this article, you will need the hciconfig and hcitool tools, which are “deprecated”.

On Debian and derivatives, to install all tools, including those deprecated, for managing Bluetooth, run the command:

sudo apt install bluez

On Arch Linux and derivatives, start by installing pikaur as shown in the “Automatic installation and update of AUR packages” article and then run the following commands:

sudo pacman -R bluez-hciconfig # if you run BlackArch
pikaur -S bluez-utils-compat

You will see the following warning:

looking for conflicting AUR packages...
:: bluez-utils-compat and bluez-utils are in conflict. Remove bluez-utils? [y/N] y

you need to agree to replace the bluez-utils package with bluez-utils-compat, that is, enter “y”.

Further steps are identical in all distributions.

How to find out the Bluetooth version of my computer

Run the command

hciconfig -a

Notice the line containing the “HCI Version”:

This line contains the Bluetooth version number, in the screenshot it is 5.1.

The current version is Bluetooth 4.* and later. At the time of writing, the most recent Bluetooth version is 5.2. The 5.3 standard has already been developed, but devices with its support are not yet released.

If on your distribution you encounter an error that the hciconfig command was not found, then use the following command:

btmgmt info | awk 'BEGIN{split("1.0b 1.1 1.2 2.0 2.1 3.0 4.0 4.1 4.2 5.0 5.1 5.2 5.3",i," ")}$1=="addr"{print $2"\tBluetooth: V"i[$4+1]}'

The previous command displays the MAC address of your Bluetooth adapter and its version. If you only need the protocol version that your computer's Bluetooth supports, then use the command:

btmgmt info | awk 'BEGIN{split("1.0b 1.1 1.2 2.0 2.1 3.0 4.0 4.1 4.2 5.0 5.1 5.2 5.3",i," ")}$1=="addr"{print "Bluetooth: V"i[$4+1]}'

How to find out the Bluetooth version of the connected devices

Start by listing the available Bluetooth connections and MAC addresses of the devices:

bluetoothctl devices

Then run a command like:

sudo hcitool info MAC_ADDRESS

Suppose I want to know the Bluetooth version that “Alexey's S21 Ultra” has with MAC address AC:6C:90:6E:53:EE, then the command is as follows:

sudo hcitool info AC:6C:90:6E:53:EE

Pay attention to the line “LMP Version:”, it contains the Bluetooth version number, in this case it is 5.2.

If the hcitool command didn't work and you get an error

Requesting information ...
Can't create connection: Input/output error

then before executing this command, first pair the Bluetooth device whose version you want to check.

How to remove Mobile broadband and Bluetooth connection in NetworkManager

NetworkManager is a universal application for managing all kinds of network connections:

  • wired connections
  • wireless connections
  • USB modem
  • Bluetooth modem

Wired and wireless connections can be deleted in the Network Settings and Network Connections interfaces.

With Mobile broadband connections (using a mobile phone as a USB modem) and Bluetooth connections, the situation is somewhat different.

In Network Settings, when you select a Bluetooth connection, the button (minus sign, “-”) to delete this connection is inactive.

In Network Connections, it seems like you can delete Bluetooth connections – the delete button is active, but actually they are not deleted.

You can look for these connections in the /etc/NetworkManager/conf.d and /usr/lib/NetworkManager/conf.d direcotories – they are actually present in them, you can even delete the files of these connections. But this does not solve the problem – these files reappear.

See Also: Where NetworkManager stores settings

The crux of the problem is that Bluetooth connections are controlled by another service, and NetworkManager only receives information from it about available connections, so you need to delete Bluetooth connections using utilities responsible for Bluetooth.

In the command line, an unnecessary connection can be removed using the following algorithm.

1. The following command displays a list of available Bluetooth connections:

bluetoothctl devices

2. To remove an unnecessary connection, enter a command of the form:

bluetoothctl remove MAC_ADDRESS

For instance:

bluetoothctl remove C8:38:70:AD:BB:47

As you can see, the specified Bluetooth connection has disappeared from the list of network connections in NetworkManager.

You can also see the MAC_ADDRESS in Network Settings by going to the Bluetooth tab.

To copy the MAC_ADDRESS, click the gear icon.

The MAC_ADDRESS value can also be viewed in the Blueman applet.

Loading...
X