Skip to content

Instantly share code, notes, and snippets.

_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@borancar
borancar / speaker-agent.py
Last active August 15, 2024 06:46
Bluetooth speaker agent (A2DP, AVRCP, HFP, HSP), all your bluetooth devices streaming to Linux
#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1-or-later
import dbus
import dbus.service
import dbus.mainloop.glib
from gi.repository import GLib
BUS_NAME = 'org.bluez'
AGENT_INTERFACE = 'org.bluez.Agent1'