Raspberry Pi & Bluetooth LE part 1 with Tony D! @adafruit #LIVE

Adafruit Industries · 62K views · 2016 · 1:27:33

Open on YouTube

Embedded systems & DIY electronicsLinux & open-source ecosystemsNetworking & internet infrastructuretutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about BlueZ, bluetoothctl and reading data from BLE devices on a Raspberry Pi, as a walkthrough for building and using the Linux Bluetooth stack.

Recommended by 2 people across 2 different months, 2016 to 2018.

What it is

A live-streamed workshop from Adafruit in which Tony D introduces Bluetooth Low Energy and shows how to compile and use BlueZ on a Raspberry Pi. It is part 1 of a series and covers BLE basics, tools like bluetoothctl, and reverse engineering a BLE smart bulb.

What people said

Recommends ZX9 · 2016-11 · Stack Overflow · on “hcitool lescan shows I/O error”

Upgrading to bluez v5.43 fixed this for me. To upgrade to the newest bluez, you need to do a "manual" installation ( not apt-get), downloading from the bluez website [LINK] . I recommend this video walkthrough [this video] if you are new installing packages or need help. After installing the latest bluez, I had to run a couple commands before it worked. systemctl daemon-reload : Restarts the system daemon. sudo service bluetooth restart : Restarts the Bluetooth service. sudo hciconfig hci0 up : This was needed for my Raspberry Pi 3, with the built-in BT found at hci0 . After these commands, sudo hcitool lescan and its variants all seem to work.

Recommends VeRo · 2018-10 · Stack Overflow · on “Check battery level of connected Bluetooth device on Linux”

This is such a great question, ahead of development and tools that are available at the moment. The short answer (in October 2018) you have to write it yourself! It won't be a one liner in the terminal. I am going to write this for myself in Python, but C has a little more documentation, so if you are skilled with C go for it. The long answer , but it's more a recommended starting point: Tony D: Raspberry Pi and Bluetooth LE, part 1 with Tony D [this video] (1 h 17 min 24 secs) managed to use bluetoothctl to read attributes and send data to a Bluetooth device. Definitely check the video information; you will find great links and references in Introduction to Bluetooth Low Energy [LINK] . Szymon J

Cites Valentin D. · 2018-11 · Stack Overflow · on “[RPi3][Bluez] Managed to connect to a BLE device but can't list GATT attributes”

I am doing a project where I need to create communication between two Raspberry Pi 3 on stretch (RPi) wirelessly with callback functionalities using C++ code. The first is supposed to send data to the second one. I decided to create a bluetooth connexion between the two using the on-board bluetooth-chips. So first I decided to compile Linux Bluetooth Stack: Bluez on both RPi from source, version 5.50. Following this tutorial : [LINK] on Adafruit. I managed to send a message from one pi to another using these codes : [LINK] . But to read a message sent by the client, I have to call the function "read(client, buf, sizeof(buf))" as shown in the server code which is a bit restrictive. I want to