View Single Post
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#8
starting point
create a script bt.sh with this line Ex :
Code:
vi bt.sh
copy paste this

Code:
[ `hciconfig | awk '{if(match($0,"UP")}{print 1}}'` ] && echo bluetooth active || echo bluetooth down
exit & write with commands :
Code:
[ esc] :wq
add execute permission

Code:
chmod +x bt.sh
run

Code:
./bt.sh
if all is ok you must see "bluetooth active / down " function of bluetooth state

after that, echo commands must to be replaced with appropriate dbus-send message for any pattern you want activate / deactivate

Last edited by blue_led; 2010-11-26 at 13:52.