Pairing the Android smartphone and RPi via Bluetooth

In this section, we will use the Terminal window to pair the Android's Bluetooth with the RPi's Bluetooth. Before we start with the pairing process, we need to install a Bluetooth package inside our RPi and make modifications to certain files. To do this, take the following steps:

  1. First, to install the Bluetooth package, enter the following command in the Terminal window:
sudo apt-get install libbluetooth-dev

The output of the preceding command can be seen in the following screenshot:

  1. Next, we will open the bluetooth.service file and make some minor modifications. To open the file, enter ...

Get Hands-On Robotics Programming with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.