Skip to content

Instantly share code, notes, and snippets.

@studiofuga
Created October 14, 2015 20:43
Show Gist options
  • Save studiofuga/5262efb95968b02a365d to your computer and use it in GitHub Desktop.
Save studiofuga/5262efb95968b02a365d to your computer and use it in GitHub Desktop.
Bluez5 recipes with dbus-send
* Making an adapter discoverable (check that rfkill is enabled, otherwise /org/bluez/hci0 will not be available)
dbus-send --system --dest=org.bluez --print-reply /org/bluez/hci0 \
org.freedesktop.DBus.Properties.Set \
string:org.bluez.Adapter1 string:Discoverable variant:boolean:true
* Changing the discoverable timeout. Default is 180s.
dbus-send --system --dest=org.bluez --print-reply /org/bluez/hci0 \
org.freedesktop.DBus.Properties.Set \
string:org.bluez.Adapter1 string:DiscoverableTimeout variant:uint32:0
@whoo
Copy link

whoo commented Jun 30, 2019

dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Discoverable variant:boolean:true

@whoo
Copy link

whoo commented Nov 30, 2019

dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_80_0C_67_7C_79_8E --type=method_call org.bluez.Device1.Connect
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_80_0C_67_7C_79_8E --type=method_call org.bluez.Device1.Disconnect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment