View Single Post
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#56
Originally Posted by nicolai View Post
I can not upload simple shell scripts.
I had to compress it with gz.
Upload the file to your device and in
xterm enter
gzip -d change_brightness.sh.gz
dear nicolai first i want to thank you for your help.
i want the same script .sh but with bluetooth, i did create this command but when i press it the bluetooth turn on, but when i press it again it dont turn off.

Code:
#!/bin/sh
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" "'/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:true | echo "" ]; then
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" "'/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:false | echo ""
else
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" "'/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:true | echo ""
fi

Last edited by moudy91; 2012-02-07 at 07:33.