Editing Phone control
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
Warning: This page is 40 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 468: | Line 468: | ||
or | or | ||
dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}' | dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}' | ||
- | |||
- | |||
- | |||
- | |||
====Enable==== | ====Enable==== | ||
- | Using the adapter path value returned with | + | Using the adapter path value returned with previous command, for example ''/org/bluez/906/hci0''. |
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true | dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true | ||
Line 481: | Line 477: | ||
This one automatically inserts adapter path: | This one automatically inserts adapter path: | ||
- | dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager. | + | dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.SetProperty string:Powered variant:boolean:true |
====Disable==== | ====Disable==== | ||
Line 489: | Line 485: | ||
With auto-discovery of adapter path: | With auto-discovery of adapter path: | ||
- | dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager. | + | dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.SetProperty string:Powered variant:boolean:false |
====Connect to specific device==== | ====Connect to specific device==== | ||
Line 496: | Line 492: | ||
service=AudioSink | service=AudioSink | ||
- | adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager. | + | adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F'"' '/at/ {print $2}') |
- | device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | | + | device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | sed -ne 's/^.*object path //p' -e 's/"//g') |
dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect | dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect | ||
Learn more about Contributing to the wiki.