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”

Updating BlueZ on Raspberry Pi (from 5.43 to 5.50)

This post shows how to update BlueZ on Raspberry Pi from 5.43 (the default version comes with Raspbian Stretch) to 5.50 (released notes [1]). In this post, I assume that you already have a Raspberry Pi 3, Pi 3+, or Raspberry Pi Zero W running Raspbian Stretch.   Steps [2] 1. Check Current BlueZ Version 1-1. Before starting, let’s check… Continue reading “Updating BlueZ on Raspberry Pi (from 5.43 to 5.50)”

Streaming Bluetooth Audio from Phone to Raspberry Pi using ALSA

This post shows steps to setup Bluetooth audio sink on Raspberry Pi using bluez-alsa. Bluetooth audio sink (A2DP sink) enables Raspberry Pi to receive audio from other Bluetooth devices (e.g. smartphone) and play it through the connected speaker. Below are my setup. Raspberry Pi3 B+ with Raspbian Stretch (2018 April version) 3.5 mm plug Speaker Smartphone   Contents… Continue reading “Streaming Bluetooth Audio from Phone to Raspberry Pi using ALSA”