How to activate bluetooth when a call is incoming?
Anybody has an idea how to activate bluetooth automatically when calls are incoming. I would like to have bluetooth only activated during calls to work with headset. This is for security and battery power reasons.
How can I do this? Is there an event triggered in the system, so I can write a simple activation script? I am quite new to this device hacking, so sorry for a probably dummy question. A simple pointer would be helpful as well of course. ;-) Have a nice day Thomas |
Re: How to activate bluetooth when a call is incoming?
To switch bluetooth on
Code:
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 Code:
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 Code:
dbus-monitor --help Code:
dbus-monitor --monitor --system type='signal',interface='org.freedesktop.Hal.Device',path='/org/freedesktop/Hal/devices/platform_slide',member='Condition'|while read LINE |
Re: How to activate bluetooth when a call is incoming?
Quote:
Thanks for you suggestion - will test it soon... Thomas |
Re: How to activate bluetooth when a call is incoming?
Here is also dbus-script event that will switch on/off bluetooth during call:
Code:
asN900:~# cat /etc/dbus-scripts.d/bluetooth-during-call |
Re: How to activate bluetooth when a call is incoming?
I wanted to have this:
* bluetooth to be on only during a call * when switch on, force connect to my BT handsfree if available * when call is over, switch off bluetooth only if bluetooth is not started manually These are the scripts to achieve it: /etc/dbus-scripts.d/bluetooth-during-call Code:
/home/user/bin/bton.sh * * com.nokia.policy.telephony call_request Code:
#!/bin/sh /home/user/bin/btoff.sh Code:
#!/bin/sh TODO: * disable WLAN during calls, as there are sound distortions while both BT and WLAN are enabled. Do not happen always, but I could not determine the pattern when/what is causing it. |
Re: How to activate bluetooth when a call is incoming?
Quote:
Quote:
And lets continue in your thread, you where first :D |
Re: How to activate bluetooth when a call is incoming?
what means 10secs away.
it disconnects almost immediatly. infact this is not my thread, it is started by thhart. |
Re: How to activate bluetooth when a call is incoming?
@dr_frost_dk
I am not sure the answer to your issue, but I can provide one datapoint. When my n900 is connected to the Sony bluetooth headunit in my car it switches automatically between playing audio with A2DP/AVRCP to HSP/HFP at the start and end of a call. I have not modified n900 stock settings in this regard, so perhaps keeping a BT headset around may be a crude solution. |
Re: How to activate bluetooth when a call is incoming?
you should:
* install dbus-script * create file /etc/dbus-scripts.d/no-a2dp-during-call Code:
/home/user/bin/a2dpoff.sh * * com.nokia.policy.telephony call_request /home/user/bin/a2dpoff.sh Code:
#!/bin/sh Code:
#!/bin/sh |
Re: How to activate bluetooth when a call is incoming?
Quote:
|
All times are GMT. The time now is 07:25. |
vBulletin® Version 3.8.8