Raspberry Pi 3 - Connect Bluetooth

Raspberry Pi 3 – Connect Bluetooth

Select language: Deutsch English

The Raspberry Pi 3 comes with WLAN and Bluetooth. The integrated Bluetooth module saves the purchase of an additional Bluetooth USB stick. In the following I explain the individual steps how to establish a Bluetooth connection on the console.

 


Difficulty level:


 

Setting up the Bluetooth connection

To use the integrated Bluetooth module of Raspberry Pi 3, either the latest Raspbian image is required or an upgrade should be performed first:

$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ reboot

 

Pairing

In order to bind two devices together, they must first be made known to each other. For newly configured Bluetooth devices, the pairing button (e.g. for keyboard / mouse / etc.) must be pressed. This means that the device is ready to establish a connection and often signals this state with a flashing LED.

Pairing with other Bluetooth devices is done with the command bluetoothctl. After the start we enter the command mode:

$ sudo bluetoothctl

First, we activate a Bluetooth agent that takes care of the authorization of new devices. With the command scan on all Bluetooth devices within range can now be displayed:

[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on

raspberry_bluetooth_scan

With the command pair, followed by the MAC address of the device, the connection can now be initiated. At the device to be connected we are now asked to enter the displayed PIN code:

[bluetooth]# pair xx:xx:xx:xx:xx:xx

raspberry_bluetooth_pairing

 

Trust the device

After successful pairing, we should still mark the device as trustworthy. This means that the connection does not have to be made manually each time (e.g. after a restart). Then we can leave the Bluetooth tool:

[bluetooth]# trust xx:xx:xx:xx:xx:xx
[bluetooth]# exit

This article was helpful for you?
Please support Datenreise.de – Thank you!

Donate

Rate this Post:
1 Star2 Stars3 Stars4 Stars5 Stars
5.00/5 (1 votes)

Raspberry Pi 3 – Connect Bluetooth, 5.00 out of 5 based on 1 ratings
Loading...