Skip to content

Instantly share code, notes, and snippets.

@egorf
egorf / bluetoothctl.py
Created March 22, 2016 10:30
Bluetoothctl wrapper in Python
# ReachView code is placed under the GPL license.
# Written by Egor Fedorov (egor.fedorov@emlid.com)
# Copyright (c) 2015, Emlid Limited
# All rights reserved.
# If you are interested in using ReachView code as a part of a
# closed source project, please contact Emlid Limited (info@emlid.com).
# This file is part of ReachView.
@marcust
marcust / start-ueboom.sh
Created March 14, 2016 19:40
Power on a UE Boom via LE Blootooth commands using gatttool
#!/bin/sh
set -ue
HANDLE=0x0003
VALUE=4480ebedc17401
MAC=88:C6:26:1E:F5:38
gatttool -b $MAC --char-write-req --handle=$HANDLE --value=$VALUE
@ragusa87
ragusa87 / bluetooth-a2dp
Last active January 30, 2020 19:08
Enable bluetooth A2DP on Raspberry-PI via pulseaudio. To install, edit /etc/udev/rules.d/99-input.rules and add the line: SUBSYSTEM=="bluetooth", RUN+="/usr/lib/udev/bluetooth" Then save this script as /usr/lib/udev/bluetooth and set it executable. Bluetooth devices must be linked first.
#!/bin/bash
# This script is called by udev when you link a bluetooth device with your computer
# It's called to add or remove the device from pulseaudio
#
#
# Output to this file
LOGFILE="/var/log/bluetooth_dev"
# Name of the local sink in this computer