PDA

View Full Version : Any tweak, can turn off BT automatic when I switch of BT Headset??


kslakhani
31st August 2008, 09:47 PM
Hi all,

Guys, any tweak/app can turn off BT automatic in Mobile when I turn off the BT Headset????????:D

Thanx

Sean D.
31st August 2008, 10:12 PM
I was looking for an app that will turn on my headset when I turn on my devices BT.

But either one will work for me. :D

nothin
31st August 2008, 10:24 PM
this site can actually provide 2390473296295825 skins for shitty apps, 340567345034785 3d shitty moronisms, but no solutions, probably, for now.

shameful decadence for 600+$ machines users.

and no, i am not moron, i learnt everything i know form this site...

long live HTC, ffs, long live, kill ppc's, yeah.

Sean D.
31st August 2008, 11:33 PM
this site can actually provide 2390473296295825 skins for shitty apps, 340567345034785 3d shitty moronisms, but no solutions, probably, for now.

shameful decadence for 600+$ machines users.

and no, i am not moron, i learnt everything i know form this site...

long live HTC, ffs, long live, kill ppc's, yeah.

... The fuck?!? :confused:

smirgeli
31st August 2008, 11:35 PM
I haven't tried this particular feature on "Auto Lock (CSDEVCTRL)" app, but it seems to have automatic BT switch off when headset not connected.

http://forum.xda-developers.com/showthread.php?t=386451

mr_deimos
31st August 2008, 11:49 PM
It can be done with mortscript plus an external program to turn off bluetooth (i don't think mortscript can do it all by itself).
Try running this mortscript:

handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
lastHfState = 0

While (1)
bluetoothState = RegRead("HKLM", "System\CurrentControlSet\Control\Power\State" , "Bluetooth" )
if(bluetoothState = 1)
lastHfState = handsfreeState
handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
if(lastHfState = 1 && handsFreeState = 0)
Message("Bt should be turned off now")
endif
endif
Sleep (2000)
EndWhile

Once run, the script will run in background and every two seconds (of course you can change this value) will check if BT is on. If it is, it will check if the handsfree has been disconnected (more precisely, if it was connected during previous pass, AND if it's disconnected now). If it has, the script will display a message box. Of course you need to replace the line:

Message("Bt should be turned off now")

With code actually launching a program that will turn off BT. The only program capable of this that crosses my mind now is VJVolubilis (www.vijay555.com). A mortscript using it will look like this:

handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
lastHfState = 0

While (1)
bluetoothState = RegRead("HKLM", "System\CurrentControlSet\Control\Power\State" , "Bluetooth" )
if(bluetoothState = 1)
lastHfState = handsfreeState
handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
if(lastHfState = 1 && handsFreeState = 0)
Run("\Program Files\vijay555\VJVolubilis.exe", "-blueoff")
endif
endif
Sleep (1000)
EndWhile

I know that there are other, maybe smaller programs that can turn off BT, but i simply can't remember any of them now.

A note: the only way to stop this script is to kill mortscript.exe process with a taskmanager or soft-reseting your device. And if you want to play around with editing it, make sure to kill the one currently running before running another instance.

And if you're worried about how constantly running mortscript will affect your device's performance - it won't affect it at all ;) I use a similar script than monitors the headphones state and starts MortPlayer if i plug in the headphones. Never noticed any additional CPU load.

nir36
1st September 2008, 12:38 AM
this site can actually provide 2390473296295825 skins for shitty apps, 340567345034785 3d shitty moronisms, but no solutions, probably, for now.

shameful decadence for 600+$ machines users.

and no, i am not moron, i learnt everything i know form this site...

long live HTC, ffs, long live, kill ppc's, yeah.

this place provides TONS of solutions for TONS of stuff... and i too learnt everything i know from this website. considering what you said yourself, it's kind of dumb to say this place is useless.

Shifuej
1st September 2008, 12:45 AM
... The fuck?!? :confused:

hahahha, thats exactly wut i said out loud. then i saw u posted wut i just said

kslakhani
1st September 2008, 12:50 AM
It can be done with mortscript plus an external program to turn off bluetooth (i don't think mortscript can do it all by itself).
Try running this mortscript:

handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
lastHfState = 0

While (1)
bluetoothState = RegRead("HKLM", "System\CurrentControlSet\Control\Power\State" , "Bluetooth" )
if(bluetoothState = 1)
lastHfState = handsfreeState
handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
if(lastHfState = 1 && handsFreeState = 0)
Message("Bt should be turned off now")
endif
endif
Sleep (2000)
EndWhile

Once run, the script will run in background and every two seconds (of course you can change this value) will check if BT is on. If it is, it will check if the handsfree has been disconnected (more precisely, if it was connected during previous pass, AND if it's disconnected now). If it has, the script will display a message box. Of course you need to replace the line:

Message("Bt should be turned off now")

With code actually launching a program that will turn off BT. The only program capable of this that crosses my mind now is VJVolubilis (www.vijay555.com). A mortscript using it will look like this:

handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
lastHfState = 0

While (1)
bluetoothState = RegRead("HKLM", "System\CurrentControlSet\Control\Power\State" , "Bluetooth" )
if(bluetoothState = 1)
lastHfState = handsfreeState
handsFreeState = RegRead("HKLM", "System\State\Hardware", "Handsfree")
if(lastHfState = 1 && handsFreeState = 0)
Run("\Program Files\vijay555\VJVolubilis.exe", "-blueoff")
endif
endif
Sleep (1000)
EndWhile

I know that there are other, maybe smaller programs that can turn off BT, but i simply can't remember any of them now.

A note: the only way to stop this script is to kill mortscript.exe process with a taskmanager or soft-reseting your device. And if you want to play around with editing it, make sure to kill the one currently running before running another instance.

And if you're worried about how constantly running mortscript will affect your device's performance - it won't affect it at all ;) I use a similar script than monitors the headphones state and starts MortPlayer if i plug in the headphones. Never noticed any additional CPU load.

Thank you mr_deimos, appreciate yr tweak n will give it a try:)

nothin
1st September 2008, 11:33 PM
sorry guys, haven't you ever had bad, bad day...
so it was bad one for me..
sorry again.
so, you may remove whole thing related to my whining..