[email protected]
is there any way to automatically turn on Bluetooth while the power cable is connected to the phone? Maybe with mortscript?
This would be a reaaly great enchancment.
It could automaticaly turn on Bluetooth when you connect the phone to the charging cable in the car. (For Communication with radio or headset)
-----------------------------------------------------------------------
I will attach the newest Version of my Script in this post....
from: 12-07-07
I found out that we can check if the device is charging at the moment in mortscript with :
x = ExternalPowered()
but what about turning on bluetooth?
u can call the bluetoothtoggle program on checking externalpowered...u can easily find this prog on xda-developers...
otherwise writing one urself shudnt take more than a few minutes...
I'm very Proud of me =).....
i got it workin.... this is my script...
Code:
y = 1
While( y = 1 )
x = ExternalPowered()
if (x = 1)
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-bluediscoveron" )
EndIf
if (x = 0)
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-blueoff" )
EndIf
Sleep (5000)
EndWhile
If anyone nows how to do it better... let me know
Damn.... theres a ****ing bug =)...
if i enable bluetooth without charging cable... its automatically disabled =)
have to think about it =)
ok i've got it now
Code:
y = 1
While( y = 1 )
x = ExternalPowered()
if (x = 1)
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-bluediscoveron" )
While( x = 1)
x = ExternalPowered()
sleep(5000)
EndWhile
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-blueoff" )
EndIf
Sleep(5000)
EndWhile
Fracoon said:
I'm very Proud of me =).....
i got it workin.... this is my script...
Code:
y = 1
While( y = 1 )
x = ExternalPowered()
if (x = 1)
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-bluediscoveron" )
EndIf
if (x = 0)
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-blueoff" )
EndIf
Sleep (5000)
EndWhile
If anyone nows how to do it better... let me know
Click to expand...
Click to collapse
try this.. have been a long time since i coded but i think this should work
do{
if(ExternalPowered())
Run("\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-bluediscoveron" )
Run( "\Programme\vijay555\VJVolubilis\VJVolubilis.exe", "-blueoff" )
Sleep(5000)
}while(1);
hmmmm....
It themes like nobody is interested in this... but it would be real great if someone could give feedback about this script... i want to know if anything in there could be better... feedback pls
Thanks for this Fracoon, it's much appreciated. gonna start using it over the next few days on my hermes.
If you know...Whats the difference in battery life while having this poll to see if the power is connected? have you noticed anything?
Cheers again.
Rochey
... Works EXTREMELY well ...
Fracoon:
AWESOME!
This works REALLY well, hats off to you!
Thanks.
Two ideas: (Note, I have not used the script, as I'm between phones at the moment. My Kaiser is on order... )
One: Rather than looping in between turn-on and turn-off, each time you go through the loop save the current power state. On the next time through the loop, check if the state did an off-on or on-off change. Only take action during a state change.
Two: A second feature some may want is to keep Bluetooth on after power disconnect if it was on before power connection. Similar to the last solution - Have a state variable that remembers whether BT was on prior to power connection, and don't turn it off if it was. Not sure how one would check the BT state though.
Hi Fracoon,
I have made a mod to your code to only enable bluetooth on AC power if Bluetooth isn't on. It also won't turn bluetooth off when you disconnect AC power if it was already on before.
You just need to change the paths to Blue.exe.
cheers
Rochey
Code:
y = 1
While( y = 1 )
Bluetooth = RegRead("HKLM", "System\State\Hardware", "Bluetooth")
if (ExternalPowered() = 1 && Bluetooth = 8)
Run( "\storage card\my documents\personal\autoblue\blue.exe", "-bluediscoveron" )
While(ExternalPowered() = 1)
sleep(5000)
EndWhile
Run( "\storage card\my documents\personal\autoblue\blue.exe", "-blueoff" )
EndIf
Sleep(5000)
EndWhile
Hi,
Does anyone have a compiled version of this, or can you tell me how I would go about implementing it on my ipaq? This is something I'd really like to have working!
Thanks
Download MortScript from http://www.sto-helit.de/.
Install the correct cab file on your device, for me this was "MortScript-4.1-PPC.cab".
Download VJVolubilis from http://www.vijay555.com/?Releases:VJVolubilis
Install the cab file on your device
Save the script from Rochey13 as a MortScript file, for example bluecharge.mscr and put this file on your device.
Modify the script to point to \Program Files\vijay555\VJVolubilis\VJVolubilis.exe.
Test the script by tapping it, it will be started by mortscript.exe.
If it is OK, you might want a shortcut in \Windows\Startup.
Thanks a lot for bringing the script so my headset will now automatically connected to my phone.
Thats great thanks!
Excellent stuff this worked really well for me 1st time. Please is there a method of enabling A2DP at the same time? I have a new Kaiser and I want to script it to enable BT and A2DP. Any ideas?
wensing said:
Download MortScript from http://www.sto-helit.de/.
Install the correct cab file on your device, for me this was "MortScript-4.1-PPC.cab".
Download VJVolubilis from http://www.vijay555.com/?Releases:VJVolubilis
Install the cab file on your device
Save the script from Rochey13 as a MortScript file, for example bluecharge.mscr and put this file on your device.
Modify the script to point to \Program Files\vijay555\VJVolubilis\VJVolubilis.exe.
Test the script by tapping it, it will be started by mortscript.exe.
If it is OK, you might want a shortcut in \Windows\Startup.
Click to expand...
Click to collapse
You could also just very easily configure PhoneAlarm to switch to your desired profile, ones you come into your car, or in a specific region or at a specific time. Then, you can let PhoneAlarm turn on your bluetooth/application/sound settings etc. Very usefull, and very easy. I think it will also be much more performant than running such a looping script all the time.
good luck!
VOODOOS!L said:
You could also just very easily configure PhoneAlarm to switch to your desired profile, one you come into your car, or in a specific region or at a specific time. Then, you can let PhoneAlarm turn on your bluetooth/application/sound settings etc. Very usefull, and very easy. I think it will also much more performant than running such a looping script all the time.
good luck!
Click to expand...
Click to collapse
PhoneAlarm is a nice tool, but isn't free.
And IMO performance isn't needed when powering on the phone when it is in craddle in my car
The script does the job within a couple of seconds. I even added a rotate and question to start TomTom to it.
slarty01 said:
Excellent stuff this worked really well for me 1st time. Please is there a method of enabling A2DP at the same time? I have a new Kaiser and I want to script it to enable BT and A2DP. Any ideas?
Click to expand...
Click to collapse
Maybe you can use A2DPToggle to start ad2p.exe with the proper parameter.
http://teksoftco.com/forum/viewtopic.php?t=1626
VOODOOS!L said:
You could also just very easily configure PhoneAlarm to switch to your desired profile, one you come into your car, or in a specific region or at a specific time. Then, you can let PhoneAlarm turn on your bluetooth/application/sound settings etc. Very usefull, and very easy. I think it will also much more performant than running such a looping script all the time.
good luck!
Click to expand...
Click to collapse
Is it possible using PhoneAlarm to switch automatically to car profile once we get into our car?
Related
I just figure out a way to listen to music via an BT earphone, no need to use BTAudioToggle or what so ever:
HKEY_LOCAL_MACHINE\SOFTWARE\OEM\VoiceCommand
--> Path = erase everthing
VoiceCmdDuration = 86400 (DEC) = 24 hours
Now, open your WMP, play the music and click the Answer Button on the BT and enjoy .
WARNING, this way will disable the voice dial via BT , so it's up to you to decide
c'mon guys, give some feedback, does this work for everybody?
I like voice dial AND my podcasts via BT on my 8525 and earpiece.
Hey guys, just wanted to give a post here. This setup works fine for me. I use both BlueMusic 2.0 and Cyberon Voice command with no problems. I used to do this with WM5, since I upgraded to WM6 I've had to make a couple of reg tweaks to get things to work properly but they work fine now. (I had to change the VoiceCmdDuration to 86400, and I also had to add in VCdialer.exe (or whatever its called) to the HKLM\Software\OEM\VoiceCommand settings ...)
To enable the sound I just hit the BlueMusic play button, and then hit the button on my headset. If I hit the button again, the sound comes out of the phone speaker, and if I turn BlueMusic off (stop button) I can use Cyberon Voice Dialer ... Perfect for me!
How do you access the registry on the 8525 to do this?
You get a registry editor... Such as total commandor (you can google it)
darkgemini said:
HKEY_LOCAL_MACHINE\SOFTWARE\OEM\VoiceCommand
--> Path = erase everthing
VoiceCmdDuration = 86400 (DEC) = 24 hours
Click to expand...
Click to collapse
I followed your directions but you're not completely clear on the second part of your instructions.
Do we create a new registry entry? If so what type? There's a bunch different options. Since we're messing with the registry, I really don't want to mess it up.
this is how i got mine to work.
this works awesome
darkgemini said:
c'mon guys, give some feedback, does this work for everybody?
Click to expand...
Click to collapse
this works great on my Hermes /att 8525 running att rom 3.62.502.3
Here's my deal... If I make the registry edit, will the bluetooth continue to run, or toggle automatically? I'm thinking that if it's ALWAYS on, the battery would run down fairly quickly.
I'll not be using it for music (at least not most of the time), but for turn-by-turn directions with my GPS program.
I would love for the same ability as MS Voice Command (turn the device ON when it's ready to deliver information, then OFF again.)
Any help?
question
just want to say that this works fine and tranfers the music to the bt earpiece fine but after a few seconds it goes back to the phone. i think the problem is the VoiceCmdDuration entry. I assume this is a DWORD value?? do i put it in the same folder as the path entry that was deleted? would love for this to work properly so i dont hav eot buy a big headset to listen to music..
PLEASE POST BACK
darkgemini said:
HKEY_LOCAL_MACHINE\SOFTWARE\OEM\VoiceCommand
--> Path = erase everthing
VoiceCmdDuration = 86400 (DEC) = 24 hours
Click to expand...
Click to collapse
what does the bolded section mean??
I navigate to the HKLM\software\oem\voicecommand folder
What is "-->" am I adding a new path??
Cheers,
I Tried on HTC Diamond Touch
I have a HTC Diamond Touch. Very happy with it.
-I downloaded the "Total Commander" cab file for "Pocket PC" to my PC.
http://www.ghisler.com/pocketpc.htm
(Select the CAB for arm/xscale/pxa)
-I installed Total Commander ( "TC" ) on the HTC Touch Diamond ;
Copied the cab file to HTC'sdirectory "My Documents" using the explorer in Active Sync,
then moving over to the HTC and started HTC's explorer,and finding the cab file,
and tapping on it...then its installed)
-Started "Total Commander" ("TC") on the HTC.
Yes, looks a bit like Norton Commander for Windows...
Then navigating in the TC address bar as follows;
-\\Plugins
then
\\registry
then the rest looks like folders, but is actually registry "levels" or "subkeys" (Scopes in xml ??) ;
->HKLM ( I guess this is short for HKEY Local Machine....????)
->Software
->OEM
Path = erase everthing
VoiceCmdDuration = 86400
(Path and VoiceCmdDuration was already there....just had to change the values)
Then I exited and Power Off->Power On
Then start Media Player
Tried to click on the buuton on the earpiece.
I have a "Plantronics Voyager 510S BlueTooth EarPiece".
But the music comes out on the HTC speaker....WAIT; Look at next post!
WAIT: HTC Touch Diamond WORKS!!!!
It works!!! I am now playing Audiobooks on mediaplayer, sound comes out
on Bluetooth EarPiece!!!!
I had turned off bluetooth......turned it on...all ok!!!!!:
Thank you! This means I dont need to buy an "A2D" earpiece....
Hi all,
Guys, any tweak/app can turn off BT automatic in Mobile when I turn off the BT Headset????????
Thanx
Same here... onoly different
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.
this site can actually provide 2390473296295825 skins for ****ty apps, 340567345034785 3d ****ty 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.
...???
nothin said:
this site can actually provide 2390473296295825 skins for ****ty apps, 340567345034785 3d ****ty 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.
Click to expand...
Click to collapse
... The ****?!?
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
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:
Code:
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:
Code:
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:
Code:
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.
nothin said:
this site can actually provide 2390473296295825 skins for ****ty apps, 340567345034785 3d ****ty 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.
Click to expand...
Click to collapse
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.
Sean D. said:
... The ****?!?
Click to expand...
Click to collapse
hahahha, thats exactly wut i said out loud. then i saw u posted wut i just said
mr_deimos said:
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:
Code:
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:
Code:
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:
Code:
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.
Click to expand...
Click to collapse
Thank you mr_deimos, appreciate yr tweak n will give it a try
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..
I recently bought MN7. Happy with the new features proposed by the version 7, I was really excited to try the new soft.
Unfortunetly, impossible to get a fix with the satellites...
I called the support today, and unfortunetly, our loved diamond isn't compatible with the new soft of navigon !!!!
If anyone has news about that, please let us know...
Actually, I found a solution !!!!
The com port used by mn7 don't stay open during the application's running.
It is necessary to get a program such as Gps Test, or Poi Observer.
The program will keep the com used by the internal gps open.
It would be then possible to have mn7 working perfectly !!!
(Add manual port 4)
Input Port com4; baud 57600, Output com6 (push on add button). Button start splitter and OK
MN7 GPS settings : port com6: portsplitter (baud 56700).
Source: Pocketinfo
mn7 solution
i write a simple script to run mn7. it works perfect. and you don't need to run another programm bevor mn7.
but you have to install mortscript (http://mort.sto-helit.de/index.php?module=page&entry=ms_overview&action=view&menu=29)
please check the path to your mn7 installation:
Run("/internal memory/NAVIGON/MobileNavigator.exe")
the script deactivate tf3d (if it is running) and rotate the screen. after quitting mn7 it do some other nice things ;-)
here ist the script. enjoy:
# Toggle TF3D and run Navigator
manilastate=ProcExists("manila.exe")
If (manilastate)
RegWriteDword ("HKLM","Software\Microsoft\Today\Items\TouchFLO 3D","Enabled",0)
RedrawToday
endif
Rotate(90)
Run("/internal memory/NAVIGON/MobileNavigator.exe")
Sleep(5000)
Setcominfo( "COM4:", 6000, 4800, "none", 8,1 , "none" )
While ( ProcExists("MobileNavigator.exe") )
d = readfile("COM4:",128)
IdleTimerReset
Sleep(500)
EndWhile
Kill("ReplLog.exe")
Rotate(0)
if (ProcExists("iLock2.exe"))
Run("/Programme/s2u2/iLock2.exe","-refresh")
endif
If (manilastate)
RegWriteDword ("HKLM","Software\Microsoft\Today\Items\TouchFLO 3D","Enabled",1)
RedrawToday
endif
desow said:
i write a simple script to run mn7. it works perfect. and you don't need to run another programm bevor mn7.
but you have to install mortscript (http://mort.sto-helit.de/index.php?module=page&entry=ms_overview&action=view&menu=29)
please check the path to your mn7 installation:
Run("/internal memory/NAVIGON/MobileNavigator.exe")
the script deactivate tf3d (if it is running) and rotate the screen. after quitting mn7 it do some other nice things ;-)
here ist the script. enjoy:
# Toggle TF3D and run Navigator
manilastate=ProcExists("manila.exe")
If (manilastate)
RegWriteDword ("HKLM","Software\Microsoft\Today\Items\TouchFLO 3D","Enabled",0)
RedrawToday
endif
Rotate(90)
Run("/internal memory/NAVIGON/MobileNavigator.exe")
Sleep(5000)
Setcominfo( "COM4:", 6000, 4800, "none", 8,1 , "none" )
While ( ProcExists("MobileNavigator.exe") )
d = readfile("COM4:",128)
IdleTimerReset
Sleep(500)
EndWhile
Kill("ReplLog.exe")
Rotate(0)
if (ProcExists("iLock2.exe"))
Run("/Programme/s2u2/iLock2.exe","-refresh")
endif
If (manilastate)
RegWriteDword ("HKLM","Software\Microsoft\Today\Items\TouchFLO 3D","Enabled",1)
RedrawToday
endif
Click to expand...
Click to collapse
I don't get it! What do i have to do witch the script. I dowloaded the program but now what?
Hi, try to change the registry as follow
HKLM/SYSTEM/Currentcontrolset/GPSIntermediateDriver/Drivers/GPSoneDevice/pollintervall=3000
To change the registry you will need a software that can edit the registry.
Then in MN7, when you configure your GPS it's COM4 and 4800 bauds
This is my configuration and it work perfectly on my diamond since 2 months now (realityview included).
solidpowder said:
Hi, try to change the registry as follow
HKLM/SYSTEM/Currentcontrolset/GPSIntermediateDriver/Drivers/GPSoneDevice/pollintervall=3000
To change the registry you will need a software that can edit the registry.
Then in MN7, when you configure your GPS it's COM4 and 4800 bauds
This is my configuration and it work perfectly on my diamond since 2 months now (realityview included).
Click to expand...
Click to collapse
Indeed, works for me too.
Update
or you download the most current version from the navigon homepage. don't ask me why, but they put the update under tryAndBuy.
here is the german link:
http://www.navigon.com/site/de/de/products/navigation_software/windowsmobile_pda#tryAndBuy
it works with the diamond and hast bigger icons.
solidpowder said:
This is my configuration and it work perfectly on my diamond since 2 months now (realityview included).
Click to expand...
Click to collapse
Does anyone have any idea what makes MN7 work perfectly in landscape with realityview? Because I've downloaded the trial and it works fine in portrait. But when I tilt the screen to landscape, before or after starting MN7, it shows a cut off version of the portrait interface..
Edit: it works fine in landscape. I just had to rotate the screen and wait a bit longer before starting MN7. When I have the chance to testdrive some more I'll see if and how Realityview works..
Oh, and another question.. The Windows application on XP can't install the MN7 navigation software on my Diamond. It gives an error saying I should insert an empty 2 GB memory card in the PC card reader and it notes that I should connect my PDA directly to the PC, so it can detect it as a removable disc.
ActiveSync is connected through USB to the Diamond, but that error keeps popping up. In the end I just copied everything that seemed relevant from the PC to the Diamond and ran the install05.CAB from ..\inst\software\2577. MN7 now works in portrait, but I'm wondering if there is a 'correct' install procedure for the Diamond? I'll contact Navigon support as well.
Mandragore said:
When I have the chance to testdrive some more I'll see if and how Realityview works..
Click to expand...
Click to collapse
Realityview works great if you start MN7 in landscape! It's been a real help to choose lanes in time.
But I still have problems getting Fresh to recognize my Diamond. Maybe because it isn´t in the list of HTC devices during registration. I had to chose a Pro to complete registration and get my activation code. Now I can´t update my software and maps with Fresh.
Does anyone have Fresh recognize and connect to their device. If so, how? Navigon support has a hard time understanding the problem.. Thanks!
Always edit your posts. Double posting will get you banned.
CraZyLiLbOy said:
Always edit your posts. Double posting will get you banned.
Click to expand...
Click to collapse
Thanks! Wouldn't want that, would we..
Hey guys,
* UPDATE * - I now realize that the first version of this script did not work. Problem should be solved as I've updated it to use VJVolubilis to send the Bluetooth ON command, rather than change the one registry entry.
Click to expand...
Click to collapse
I write this as a newbie who's just written his, well, 2nd MortScript. I was fed up with the very common problem that everyone is experiencing, which is their Bluetooth being randomly shut off on the X1.
What I did to resolve the problem (temporarily, until SE provides a proper fix), is to write this MortScript that will run resident in memory (uses only about 90kb, a non-issue with our massive X1 RAM) and poll the status of Bluetooth every "X" (user-defined) minutes. It will then send a command to VJVolubilis turning BT on. If it's already on still, then nothing happens. Note that when it 'turns on' Bluetooth, it will put it into the normal status of Connectible, but not Discoverable, or any other state for that matter. It should only really be reset to "On (Connectible)" from Off because if you were currently using your BT (for ActiveSync, A2DP) then it should not turn itself off in the first place. I think this was the safest bet since there are MANY 'states' for BT to be in.
You will need a copy of MortScript installed in order for this script to work. You can get MortScript at the following link:
http://sto-helit.de/index.php?module=download&entry=ms_program&action=list
Once you've installed MortScript (or if you already had it installed), simply place the "X1FixBluetoothPower.mscr" file in your \Windows\StartUp folder so it will be run upon every boot up, and stay running.
For people who prefer to look at the script contents, then create their own, below is what's contained within my "X1FixBluetoothPower.mscr" file:
Code:
# Xperia X1 Bluetooth Always ON Script
#
# NOTE that you will NEED a copy of VJVolubilis which is a tiny .exe and can be found here by the great Vijay555:
# http://www.vijay555.com/vj/releases/vjvolubilis/vjvolubilis.cab
#Define the interval (in minutes) that BT State will be checked
#Edit "checkmins" number below:
checkmins = 5
#Begin an endless loop that checks vijay555's app every X mins
While( ProcExists( "device.exe") )
Run("\program files\vijay555\vjvolubilis\vjvolubilis.exe"," -blueon")
Sleep(checkmins*60000)
EndWhile
Note that I use a default time of 5 minutes, however on my own device I actually use 1 minute. I have a hard time believing that this will be any sort of 'performance' limiter when it's run, so every 1-2 mins shouldn't be a problem. If you want to edit the minutes, simply open the .mscr file up in Notepad before you dump it on your device (or alternatively, edit it on your X1 with something like Total Commander).
Anyways, this is one of my first scripts written in MortScript, so I hope you guys enjoy it. If anyone else can suggest any optimizations to my 'code', then by all means, please post in this thread.
Below you should find the attachment to the actual .mscr file. Please leave your feedback as to how well the script works for you.
Thanks guys, trying to give back to this amazing community whenever I can!
Well done. Mortscript is the future!
is it possible to add an entry in your skrip, that a stereoheadset connected in the A2DP mode automaticly?
Download A2DP Toggle: http://www.teksoftco.com/index.php?section=freeware
Install and disable the Today-plugin.
Then add a line to the mortscript:
Code:
Run( "\Program Files\Teksoft\A2DPToggle\a2dp.exe", "-a2dp:on" )
scar45 said:
Hey guys,
I write this as a newbie who's just written his, well, 2nd MortScript. I was fed up with the very common problem that everyone is experiencing, which is their Bluetooth being randomly shut off on the X1.
What I did to resolve the problem (temporarily, until SE provides a proper fix), is to write this MortScript that will run resident in memory (uses only about 90kb, a non-issue with our massive X1 RAM) and poll the status of Bluetooth every "X" (user-defined) minutes. If it discovers that BT is off, it will turn it on. If it's already on, then nothing happens. Note that when it 'turns on' Bluetooth, it will put it into the normal status of Connectible, but not Discoverable, or any other state for that matter. It should only really be reset to "On (Connectible)" from Off because if you were currently using your BT (for ActiveSync, A2DP) then it should not turn itself off in the first place. I think this was the safest bet since there are MANY 'states' for BT to be in.
You will need a copy of MortScript installed in order for this script to work. You can get MortScript at the following link:
http://sto-helit.de/index.php?module=download&entry=ms_program&action=list
Once you've installed MortScript (or if you already had it installed), simply place the "X1FixBluetoothPower.mscr" file in your \Windows\StartUp folder so it will be run upon every boot up, and stay running.
For people who prefer to look at the script contents, then create their own, below is what's contained within my "X1FixBluetoothPower.mscr" file:
Code:
# Xperia X1 Bluetooth Always ON Script
# by George Merlocco of protogenlabs.com
#Define the interval (in minutes) that BT State will be checked
#Edit "checkmins" number below:
checkmins = 5
#Begin an endless loop that queries the BT registry entry every X mins
While( ProcExists( "device.exe") )
#Define variable to check status of Bluetooth via registry
BluetoothStatus = RegRead( "HKLM","System\State\Hardware","Bluetooth" )
#if Bluetooth DWORD = 8, BT is OFF so turn it on (set to 9)
If ( BluetoothStatus = 8 )
RegWriteDWord( "HKLM","System\State\Hardware","Bluetooth", "9" )
EndIf
Sleep(checkmins*60000)
EndWhile
Note that I use a default time of 5 minutes, however on my own device I actually use 1 minute. I have a hard time believing that this will be any sort of 'performance' limiter when it's run, so every 1-2 mins shouldn't be a problem.
Anyways, this is one of my first scripts written in MortScript, so I hope you guys enjoy it. If anyone else can suggest any optimizations to my 'code', then by all means, please post in this thread.
Below you should find the attachment to the actual .mscr file. Please leave your feedback as to how well the script works for you.
Thanks guys, trying to give back to this amazing community whenever I can!
Click to expand...
Click to collapse
Brother, I install the script installed in phone but when phone boot up, the bluetooth is not turn on? Anything I missed out?
Hi,
I notice that you have added another VJVolubilis and X1FixBluetoothFinal-MSCR-v2.zip, do we need to uninstall the MortScript we installed earlier?
Do advise us accordingly, thanks.
chongbh said:
Hi,
I notice that you have added another VJVolubilis and X1FixBluetoothFinal-MSCR-v2.zip, do we need to uninstall the MortScript we installed earlier?
Do advise us accordingly, thanks.
Click to expand...
Click to collapse
yes chongbh, you can remove the other (v1) script completely by simply deleting the file. Next, grab the .cab installer for Vijay's app, install it to the PHONE memory (only like 15kb), and unzip the X1FixBluetoothFinal-MSCR-v2.zip into your \WINDOWS\STARTUP folder. Simple as that.
Further to this, you can customize how frequently you want the script to run which will in turn run VJVolubilis + the argument to turn BT on.
On a side note, I'm not quite sure why the previous script didn't work. I do have a feeling that it's because SE uses a proprietary Bluetooth stack which ignores that change to the single registry entry. I would love to find out how VJVolubilis and Wisbar Advance Desktop trigger Bluetooth states, because they still do work with the X1.
Anyways, this patchwork shouldn't have to last very long (not too bad still as MortScript.exe uses peak 100kb memory while running), and we see an official CAB update from Sony Ericsson addressing the well-known issue. Hope this helps some of you hold over till then!
Guess for some newbie might be in the lost as in what are the proper procedures :
1) Download and install the MortScript.cab into PHONE Memory :
http://sto-helit.de/index.php?module...am&action=list
2) Download and install the Vjvolubilis.cab into PHONE Memory :
http://www.vijay555.com/vj/releases/vjvolubilis/vjvolubilis.cab
3) Download the X1FixBluetoothFinal-MSCR-v2.zip from the 1st post of this thread
4) Unzip the X1FixBluetoothFinal-MSCR-v2.zip into your X1's phone memory location : \WINDOWS\STARTUP folder
5) Reboot your phone and your Bluetooth should stay ON forever
I have tested on my X1 and it works great! Thanks to Scar45 for your effort and guidance.
Hi,
the \Windows\Startup folder mentioned - is that the same as \Windows\Autostart ? Or should I create a \Windows\Startup, because there is no such folder at the moment in my X1...
Thanks for enlighten me on why my X1 keeps shuting off the Bluetooth all the time...
/Stefan
Thanks a lot
I contacted Sony Ericsson because my Bluetooth headset was "detecting" the bluetooth dropped and when I looked on the X1i the Bluetooth was turned off.
They told me to buy another BT headset, nice to see I wasn't crazy
brago said:
Hi,
the \Windows\Startup folder mentioned - is that the same as \Windows\Autostart ? Or should I create a \Windows\Startup, because there is no such folder at the moment in my X1...
Thanks for enlighten me on why my X1 keeps shuting off the Bluetooth all the time...
/Stefan
Click to expand...
Click to collapse
Not a problem Stefan, and yes, you can create the \Windows\StartUp folder if it isn't there already. I would test it by copying ANY shortcut in there and seeing if it runs that program after a soft-reset. If that's all good, put the .mscr script in the \Windows\StartUp folder and you'll be good to go.
lmame said:
Thanks a lot
I contacted Sony Ericsson because my Bluetooth headset was "detecting" the bluetooth dropped and when I looked on the X1i the Bluetooth was turned off.
They told me to buy another BT headset, nice to see I wasn't crazy
Click to expand...
Click to collapse
Apparently they are aware of the issue, but I'm sure that knowledge doesn't trickle down to the Customer Service Reps until a proper fix has been released.
Glad this script fix could help a lot of ppl out...thanks again to Vijay and Mirko for the tools needed!!
Yes definitly those tools sound fun ^_^
Edit:
Btw, I saw something weird.
When the BT is dropping, if I delete my BT headset and do the pairing again (resetting the pairing also headset side), it seems the BT doesn't drop until next soft reset or until next time the headset is shut down.
Is Sony even aware of this issue? I called my local Sony X1 support and they were not aware this was even an issue. I think more people need to complain about randomly dropped bluetooth connections!
Yeah!
Thx a lot - my bluetooth-music-streaming works now!
But is it right - I have to choose every time when I connect to the radio in my car - "use as stereo-headset" in the settings?
GREAT JOB! THANK YOU!!!
A2DP Toggle
Epidemie said:
I have to choose every time when I connect to the radio in my car - "use as stereo-headset" in the settings?
Click to expand...
Click to collapse
See A2DP Toggle in post #4.
You can use it together with Mortscript to create a "connect A2DP now" button, instead of going to the bluetooth settings.
wensing said:
Then add a line to the mortscript:
Code:
Run( "\Program Files\Teksoft\A2DPToggle\a2dp.exe", "-a2dp:on" )
Click to expand...
Click to collapse
Thx 4 your help - one last question, i´m sorry ...:
How can I add a line to mortscript???
help needed ...
Still need help - does no one knows the answer, pls?
Thx,
Epi
this works great. thanks.
Epidemie said:
Still need help - does no one knows the answer, pls?
Thx,
Epi
Click to expand...
Click to collapse
Hey Epi,
Sorry no one got back to you, but it's easy to add a line to the MortScript file. Just open the .mscr file in any text editor (I use the built-in one in Total Commander) and add the line in exactly as wensing has described.
Save the file, do a soft-reset, and you should be good to go!
Epidemie said:
Still need help - does no one knows the answer, pls?
Thx,
Epi
Click to expand...
Click to collapse
The script in post #1 is to restart bluetooth if it is (accidently) stopped.
You can add a line to that script to reconnect "bluetooth stereo".
But then it tries to reconnect each 1 minute.
You can also install A2DPToggle and create a shortcut to the exe:
\Program Files\Teksoft\A2DPToggle\A2DP.exe
Then you can put that program on your today screen easily.
And if you want a nice icon with that shortcut, you can change the shortcut file to:
53#"\Program Files\Teksoft\A2DPToggle\A2DP.exe" "-a2dp:1"?\Program Files\Teksoft\A2DPToggle\settings.exe,-0
I was fiddling around with the programs that I already had installed (SKTools, Mortscript and ToggleBTH.exe, 3 great program btw). What I wanted to achieve is that when I put my Diamond in the car charger, bluetooth is activated (if it was off) and when I removed it from the cradle it was returned to the last state. Reason is that I want my car kit to be able to connect to my Diamond and disable bluetooth when I am not in my car, to save battery power.
What I also wanted is that the program wouldn't be running all the time when my Diamond wasn't externally powered.
This what I did.
I wrote the following script:
If (ExternalPowered())
ToggleDisplay(ON)
BTState = RegRead("HKLM","System\State\Hardware","Bluetooth")
If (BTState <= 8)
BTWasOff = TRUE
Run("\Windows\ToggleBTH.exe")
Else
BTWasOff = FALSE
EndIf
While(ExternalPowered())
Sleep(5000)
EndWhile
If (BTWasOff)
Run("\Windows\ToggleBTH.exe")
EndIf
EndIf
I save the script "PowerBT.mscr" to some place. In SKTools I go to "Notifications queue" and add a new event of the type "wakeup". Then I select to execute the file "PowerBT.mscr".
So far I am very happy with this solution.
Any comments are welcome!
I'm definitely going to try this, seems really handy. Already found another program, BluePower, which would do the same except it'll always run in the background I think.
wouldn`t g-profile do the trick?