Creating AltBeacon with Raspberry Pi using BlueZ Example Code (updated)

This post shows steps to create an AltBeacon [1] with Raspberry Pi, by modifying BlueZ BLE Advertisement example code (i.e. “example-advertisement“). *If you want to create Apple’s iBeacon [2], please see this post.   Prerequisites (parentheses indicate my environment) Raspberry Pi (Raspberry Pi4 B with Raspbian Buster 2019-06-20) Internet access To download BlueZ example code. Here… Continue reading “Creating AltBeacon with Raspberry Pi using BlueZ Example Code (updated)”

Controlling Bluetooth Audio on Raspberry Pi

Update (April 21, 2020): Volume control support added. This post shows steps to control playback status of Bluetooth audio which is streamed from a connected phone (or any Bluetooth capable media player). The goal is to enable below. Playback control (play, pause, next/previous song, and volume control) Music information display in real time (song title, artist… Continue reading “Controlling Bluetooth Audio on Raspberry Pi”

Setting Up Bluetooth Serial Port Profile on Raspberry Pi using D-Bus API

This post shows steps to set up Bluetooth Serial Port Profile[1] (or SPP) on Raspberry Pi. The goal is to establish an SPP connection between Raspberry Pi 3 and Android phone, then send and receive texts using serial terminal applications on both ends. SPP is not available by default. There are two options to enable… Continue reading “Setting Up Bluetooth Serial Port Profile on Raspberry Pi using D-Bus API”

Setting Up Bluetooth Serial Port Profile on Raspberry Pi using sdptool

This post shows steps to set up Bluetooth Serial Port Profile (or SPP)[1] on Raspberry Pi. The goal is to establish SPP connection between Raspberry Pi 3 and Android phone, then send/receive text using serial terminal applications on both ends. SPP is not available by default. There are two options to enable it in BlueZ… Continue reading “Setting Up Bluetooth Serial Port Profile on Raspberry Pi using sdptool”

Creating BLE GATT Server (UART Service) on Raspberry Pi

In this post, I will create BLE GATT server on Raspberry Pi 3 using BlueZ dbus interface with Python. I will reuse BlueZ example code as much as possible. As an example of GATT service, I’ll create UART service (a.k.a. Nordic UART Service/NUS [1] ), so that I can test it with Nordic’s smartphone app… Continue reading “Creating BLE GATT Server (UART Service) on Raspberry Pi”