[FiX] Bluetooth turning off with MortScript - XPERIA X1 General

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

Related

Is there any program to run Bluetooth Activesync easily?

Hi,
Does anyone know if such program exist?
Or, any know how to run Activesync via bluettoth in easier way than tap on Start>Activesync>Tools>Connect via bluetooth (that's 4 taps).
Regards,
Arto.
Artosoft said:
Hi,
Does anyone know if such program exist?
Or, any know how to run Activesync via bluettoth in easier way than tap on Start>Activesync>Tools>Connect via bluetooth (that's 4 taps).
Click to expand...
Click to collapse
You can use Mortscript to whip up a little cute script that does the 4 taps for you with a single tap. Google for Mortscript (or Mortscripts) and download it, it is freeware and well documented.
I was also looking for something that will make this quicker. Thanks psych0t1c.
Thanks psych0t1c.
I try using Mortscript, follow instruction, put the .mrsc on \windows folder, put a link on \windows\start up folder, but without success.
Here is the .mrcs text:
Run "\windows\sync"
MouseClick "ActiveSync", 10, 300
MouseClick "ActiveSync", 10, 285
Close "ActiveSync"
Exit
Please Mortscript expert give me advise...
Thx.
Regards,
Arto.
Artosoft said:
I try using Mortscript, follow instruction, put the .mrsc on \windows folder, put a link on \windows\start up folder, but without success.
Here is the .mrcs text:
Run "\windows\sync"
MouseClick "ActiveSync", 10, 300
MouseClick "ActiveSync", 10, 285
Close "ActiveSync"
Exit
Please Mortscript expert give me advise...
Click to expand...
Click to collapse
What is going wrong? Does nothing happen at all? Some thoughts on the fly:
-Extension should be mscr not mrcs, but maybe that's a typo.
-There should be a extension to sync. Use "sync.lnk"
-Give a little time to start the program (use "sleep 500")
-Give a slight time to rollout the menu after first tap ("sleep 100")
-Minimize instead of close. Don't know how MortScript actually works - if it is a real "close" or not.
-Maybe it is also a bad idea to put it in autorun before you tested it. Could be that during boot sequence the Script is the first to execute while most of the system is still in a less than ready state. Might be better to start it by hand when using it or to measure your booting time. So if the entire device takes 18seconds from the disappearing of the splash screen to full service (you see your today screen and no "waiting" symbol) you could just go and give the script an initial delay (sleep 25000) to wait 25 seconds before it starts out.
Test it out and lemme know what exactly is going wrong.
Still didn't work overhere, but her's something better :
AutSyncME :
AutoSyncME is a FREE software which connects your device automaticly to your computer via bluetooth connection with a click of a button.
Why do I need AutoSyncME?
Until now, in order to sync your device with the computer via BT, you needed to do the following: 1. Press on start.
2. Press on ActiveSync.
3. Press on tools.
4. Press on "connect via bluetooth"
Quite a hassle...Isnt it?
What does ActiveSyncME does?
Just download the file (cab) attached below, transfer it to your device, and double click it to install the software.
The software will be installed in the start menu - programs folder.
Want to make it a lot easier?
Go to "settings" on your device - "buttons" and assign a hardware button to this file.
Now, every time you want sync your device with your computer, just press the hardware key.
Click to expand...
Click to collapse
http://www.mesoftware.biz/as.htm
jpiek said:
Still didn't work overhere, but her's something better :
AutSyncME :
AutoSyncME is a FREE software which connects your device automaticly to your computer via bluetooth connection with a click of a button.
Why do I need AutoSyncME?
Until now, in order to sync your device with the computer via BT, you needed to do the following: 1. Press on start.
2. Press on ActiveSync.
3. Press on tools.
4. Press on "connect via bluetooth"
Quite a hassle...Isnt it?
What does ActiveSyncME does?
Just download the file (cab) attached below, transfer it to your device, and double click it to install the software.
The software will be installed in the start menu - programs folder.
Want to make it a lot easier?
Go to "settings" on your device - "buttons" and assign a hardware button to this file.
Now, every time you want sync your device with your computer, just press the hardware key.
Click to expand...
Click to collapse
http://www.mesoftware.biz/as.htm
Click to expand...
Click to collapse
Thanks!
But it is not working.
Regards,
Arto.
:?
Is there a big need for such an app? Why doesn't the other one posted above work?
V
jpiek said:
:?
Click to expand...
Click to collapse
Jpiek,
My bad, my bad....
I did tried several times again, and sometimes it is work.
If not work, I did 4 times tap Bluetooth Activesync to get connected.
Works but not always...
Regards,
Arto
vijay555 said:
Is there a big need for such an app? Why doesn't the other one posted above work?
V
Click to expand...
Click to collapse
We need program that can make our life easier.
Hopefully you can write a program to do bluetooth (or any kind of connection) activesync in predefined period time (or in interval time). But most important is reliability.
Thanks!
Regards,
Arto.

Quick app request: Enabling BT Voice Command for all

I'm familiar with developing Windows apps (Win32/MFC) but I haven't worked with that stuff for years and I also am not familiar with Windows CE.
I'm looking for someone to help try and put together an app to do the following:
* Call the app BTAudioOff.exe
* Call the app BTAudioOn.exe
* Call the app VoiceCmd.exe
The BTAudio apps are the ones posted by someone on here and VoiceCMD is the executable from Microsoft's VC.
I did some testing and if I run these apps in this order Voice Command over BT works every single time with no issues and with excellent clarity since you are manually opening the BT audio gateway and calling VC.
I was looking to create a batch or script file but couldn't find if Windows CE supports it. By having one .exe or script that runs them in this order, we can have the BT button launch that app (registry change) which in turn would allow MS VC to be used over BT on all BT headsets repeatedly.
I'm doing this for myself and others in the community who are looking for this solution. I'd really appreciate any help people could provide on this.
Thanks.
Check out VJVolubilis.
It will be updated to script in the Voice Command registry hack, but if you do the voice command registry hack yourself, just opening the Audio gateway (-AGon) works for most of us.
V
vijay555 said:
Check out VJVolubilis.
It will be updated to script in the Voice Command registry hack, but if you do the voice command registry hack yourself, just opening the Audio gateway (-AGon) works for most of us.
V
Click to expand...
Click to collapse
Hey Vijay, nice website and tools. Looks nice.
AGON would work but how do I execute VoiceCMD.exe from the same line.
i.e. I want to have a single executable or command that will both turn on the audio gateway AND run Voicecommand.
Can your application accept a parameter for an executable to run???
i.e.
vjvolubilis.exe -agon voicecmd.exe
This would turn on the audio gateway and then execute voicecommand.
Not sure if it's coming across clearly what I want to do.
hopfully someone will know how to get this idea rolling.
- Jason
I'm pledged to a round of new updates to VJVolubilis that will hopefully address some of the VC stuff; if you read through the VJVolubilis thread you'll see what they're on about.
However, for now, use MortScript. It's excellent for scripting anything.
V
AWESOME. I have a solution working using MortScript. Need to test it a little bit and then I'll post it..as easy as pie!!
Crap...ran across a problem. When I run the MortScript manually through either Resco Explorer/File Manager it opens the BT audio and brings up VoiceCommand every single time.
However when I changed the registery so that instead of pointing to voicecmd.exe it points to my .mscr script it doesn't seem to work and I can't understand why.
I think it probably has to do with the Cyberon software opening closing the BT channel before launching the exe.
Hmmmmm....working on it still...any tips would be appreciated.
Well I give up for now. It seems hitting the BT headset button launches a mini Cyberon invisible app that sets up the BT audio gateway and then launches what's referred to in the registry
For whatever reason no matter what I tried, I couldn't get it to run a .mscr script either by directly pointing to the script or pointing to MortScript.exe and passing the script as a command line parameter.
All in all, it works 100% when you run the .mscr manually but getting it to execute through the BT headset button thing is much more difficult than I had anticipated.
Hopefully somoene can help resolve this on here and/or this will be resolved with MS Voice Command 2.0 if it ever comes out.
mobilehavoc said:
However when I changed the registery so that instead of pointing to voicecmd.exe it points to my .mscr script it doesn't seem to work and I can't understand why.
Click to expand...
Click to collapse
The Registry might not point to something except an ".exe"...
You may use the "autorun" function of MortScript
(copy "Autorun.exe" from the "Windows" folder to the folder where your script is located and rename it the same as the script, e.c. "myscript.mscr" and "myscript.exe")
Thanks Vlad! It worked...need to do some more testing with a BT headset that was having trouble with it tonight.
Thanks though.
Where there is a will there is a way!!!
Can't wait to see if you can fix this mobilehavoc!
See you on the forums!
This will make lives easier, guranteed!
Cheers! If you were closer I'd buy you a beer, heck a case!
Where there is a will there is a way!!!
Can't wait to see if you can fix this mobilehavoc!
See you on the forums!
This will make lives easier, guranteed!
Cheers! If you were closer I'd buy you a beer, heck a case!
this sounds promising.
I do not have any issues with triggering VC via my BT headset
I DO have issues with triggering VC via my Nokia BT carkit (after a while VC just does not react anymore)
Well after much testing and whatnot, it is not currently possible to do...it's a problem with voice command as everyone knows...specifically that since it wasn't designed for BT, it does NOT close the audio gateway so the next time you press the button on your BT headset, it does not respond.
This works with certain headsets like the HS850 because for whatever reason, a subsequent press of the BT headset button turns the audio gateway off and then the next one turns it on. This is why certain headsets work but require 2 presses to work.
The ONLY way to get this to work currently is to have an app (MortScript almost did it) that can wait until VoiceCmd has executed and completed, then close the audio gateway. Problem with that is VoiceCmd may lead to a phone call or god knows what else so it's tricky.
I'm sure there's a way to do it...in the end, again...ALL THAT IS NEEDED is for some way to close the BT audio gateway once VoiceCmd finishes...then all will be right with the world. I give up because I don't have the expertise or time and my HS850 works fine with it...
Hopefully someone else can give it a shot sometime.

Bluetooth Name Change Software

Here you will find a little tool to change your Device's Bluetooth name without going to the registry yourself.
http://gbit.ath.cx
It's free and more apps will be released.
Thanks. This is exactly the type of thing I could use.
Would it be possible to make a program to toggle on/off the "Wireless Stereo" and/or "Hands Free" services for a particular Bluetooth device automatically.
I created the attached Mortscript file to do it, but it is very slow and cumbersome. I use this to allow me to switch from my Plantronics headset to my JVC radio when I am in my car. The SendKeys("Settings","2") line in the mortscript code is used to pick the headset named 260Plantronics in my bluetooth devices list. I thought you could make it use a parameter to pass the device name to the program, so any device may be chosen. I use the registry reading part of Battery Status to show me if the headset service is enabled or not.
The registry keys for the devices is under HKLM\Software\Microsoft\Bluetooth\Device\???????????\Services\????????\enabled, where the first set of ?s is the device and the second set of ?s is the service. I tried changing the registry keys with mortscript but it doesn't affect the actual settings in the setting menu and the Plantronics is still connected. Even after a soft reset the Plantronics will still be connected even though the registry keys show 0 and the settings items are unchecked.
Code:
iscar=RegRead("HKLM","\Software\Microsoft\Bluetooth\Device\000389c44266\Services\0000111e-0000-1000-8000-00805f9b34fb\","enabled")
Run("\Windows\Start Menu\Programs\Tools\BlueSet.lnk")
WaitFor("Settings",10)
SendKeys("Settings","2")
Sleep(500)
SendCR("Settings")
Sleep(500)
MouseClick("Settings",17,109)
MouseClick("Settings",17,127)
Sleep(500)
MouseClick("Settings",195,308)
Sleep(500)
Close("Settings")
Exit
installation folder
i have eten glofiish m700 with WM6.1
i installed the CAB & it created a new folder on the main memory called \pogram files%provider% with the BlueName folder inside it
i believe it should have created the BlueName folder inside the original main program files folder, so i did a copy & paste of the BlueName there
It works fine & nice & light software..does exactly what it should do ... but i wanted to mention the "folder" destination error to you
Thanks again for the nice cab
ok, thanks i will check the installation and upp a correct one.
elkneo said:
ok, thanks i will check the installation and upp a correct one.
Click to expand...
Click to collapse
great
please update us here & post something to let us know that the new one is there so we go get it
again good work
corrected version is online now. visit my page for more software...
Thanks for the update.
Hi ,
URL http://gbit.ath.cx is not working . I was looking for the solution to change the bluetooth radio name . any ideas ?
anil_k_22 said:
Hi ,
URL http://gbit.ath.cx is not working . I was looking for the solution to change the bluetooth radio name . any ideas ?
Click to expand...
Click to collapse
Here you go.
I hope he doesn't mind me posting his cab here since his site seems to be down.

[APP] new free utility: BlueStarter

Check out Smart Mobile Tools for a free tool to automatically start an application when a configured bluetooth device is discovered.
Features:
Starts an application on bluetooth device discovery
Easy Bluetooth device selection
Optional application start arguments
Low power consumption (no background service running)
Test option using the test button
2 search modes; on a timed event or on wake up (power button pressed)
Usage examples:
Start you GPS navigaton software when GPS mouse is switched on
Start Activesync when PC bluetooth device is discovered
Start your own application at Bluetooth device discovery
22/2/09: version 1.0.1 released solving issue with program arguments
23/8/11: version 2.0.0 released (finally), change list:
Widcomm Bluetooth stack support!
Support for up to 5 different profiles; check for different devices
Improved UI
Interval config issue fixed
please let me now your feedback or make a small donation via
Smart Mobile Tools kind regards,
Paul
Mod Edit : 2nd Post Deleted, please keep the discussion in a single Post
This is a nice app. I have one key idea for you to add to this that would make a bunch of users very happy:
The issue is that when using a stereo blue tooth device, one has to always manually activate it to make the stereo connection work.
All that is needed is to detect that the device being connect has stereo capability and force that connection to activate correctly. I have to do this manually either via A2DP toggle or HTC BT Quicklink - a royal pain.
Thanks,
Barry
Bluetooth Stereo Connection
bsw11 said:
This is a nice app. I have one key idea for you to add to this that would make a bunch of users very happy:
The issue is that when using a stereo blue tooth device, one has to always manually activate it to make the stereo connection work.
All that is needed is to detect that the device being connect has stereo capability and force that connection to activate correctly. I have to do this manually either via A2DP toggle or HTC BT Quicklink - a royal pain.
Thanks,
Barry
Click to expand...
Click to collapse
Phone: HTC Touch Elfin
Headset: Motorola S9 HD
MP3 Player: S2P by A_C
Whenever i turn on my headset, it automatically fires up my mp3 player in stereo mode. And when i turn off my headset, the player also quits.
Never had a problem with it,
I suggest you check your settings.
You could use this app to run teksoft's A2DP toggle.
Surur
All I'm getting is:
BlueStarter.exe
ArgumentNullException
An error message cannot be displayed because an optional resource assembly containing it cannot be found
at ObjectCollection.Add()
at BlueStarter.BlueStarter..ctor()
at BlueStarter.Program.Main()
justDave said:
All I'm getting is:
BlueStarter.exe
ArgumentNullException
An error message cannot be displayed because an optional resource assembly containing it cannot be found
at ObjectCollection.Add()
at BlueStarter.BlueStarter..ctor()
at BlueStarter.Program.Main()
Click to expand...
Click to collapse
Looks like the 'settings.ini' configuration file is corrupt try to delete this file.
www.smartmobiletools.com
paulwal said:
Looks like the 'settings.ini' configuration file is corrupt try to delete this file.
www.smartmobiletools.com
Click to expand...
Click to collapse
Where would I find this settings.ini? It's not in the program directory.
justDave said:
Where would I find this settings.ini? It's not in the program directory.
Click to expand...
Click to collapse
It should be located in the root of your device
bsw11 said:
This is a nice app. I have one key idea for you to add to this that would make a bunch of users very happy:
The issue is that when using a stereo blue tooth device, one has to always manually activate it to make the stereo connection work.
All that is needed is to detect that the device being connect has stereo capability and force that connection to activate correctly. I have to do this manually either via A2DP toggle or HTC BT Quicklink - a royal pain.
Thanks,
Barry
Click to expand...
Click to collapse
+1, would like this as well. had to press a button on my o2 a2dp to have it stereo
paulwal said:
It should be located in the root of your device
Click to expand...
Click to collapse
Nothing there, so I tried putting an empty file there. I got a different error so you could be on the right track. Or maybe it just errored out earlier.
Any other ideas?
BTW, putting a file called settings.ini in the root directory isn't a great idea anyway.
Touch Pro
Anyone know what the command line is to Toggle Bluetooth on or off in the presence of a know BT device? Right now I run the phone with BT turned off and have to remember to turn it on when I get in my car.
justDave said:
Nothing there, so I tried putting an empty file there. I got a different error so you could be on the right track. Or maybe it just errored out earlier.
Any other ideas?
BTW, putting a file called settings.ini in the root directory isn't a great idea anyway.
Click to expand...
Click to collapse
An settings.ini should be created when you start BlueStarter, press Save and then Exit, the file should then look like:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--ini file-->
<AppSettings>
<add Name="Program" Value="" />
<add Name="DeviceName" Value="empty" />
<add Name="ProgramArgument" Value="" />
</AppSettings>
You are right for version 1.1 this settings.ini file would be moved.
paulwal said:
An settings.ini should be created when you start BlueStarter, press Save and then Exit, the file should then look like:
...
You are right for version 1.1 this settings.ini file would be moved.
Click to expand...
Click to collapse
I just tried creating that file with the contents you suggested and I'm back to the original error. It looks like the error happens after the settings file is read.
How do I set this up to automatically sync via bluetooth once in range of my PC?
How do i get this to automatically connect with bluetooth over activesync to a device?
also
How do I get this to auto connect as a hand free head set for headset?
smotrs said:
Anyone know what the command line is to Toggle Bluetooth on or off in the presence of a know BT device? Right now I run the phone with BT turned off and have to remember to turn it on when I get in my car.
Click to expand...
Click to collapse
How is your phone supposed to know it's in the presence of a known BT device if bluetooth is turned off ?!? DOH!
NRGZ28 said:
How is your phone supposed to know it's in the presence of a known BT device if bluetooth is turned off ?!? DOH!
Click to expand...
Click to collapse
Beats me, that's why I was asking, the description sounded vague so I wasn't entirely sure what it could or couldn't do.
Hi!
Take a look at WifiLocations at http://forum.xda-developers.com/showthread.php?t=448783&page=2.
It is able to switch on/off different things depending on the radio broadcasting cell you are in. So you could switch on Wifi when arriving at home or switch Bluetooth on when leavin home ....
This one in combination with Blustarter should do the trick ....
Greetz Bax
PS: haven't tried WifiLocation up to now, so don't beat me if it doesn't work...
.HaVoC. said:
How do I set this up to automatically sync via bluetooth once in range of my PC?
Click to expand...
Click to collapse
the activesync application you should configure is \\windows\\repllog.exe
I found the following parameters:
/remote which appears just to start the Activesync application and
brings it to the foreground
/remote /all which starts the Activesync application, brings it to the
foreground and starts synchronising
/remote /all /h which starts the Activesync application and starts
synchronising without bringing it to the foreground
www.smartmobiletools.com

New audio switch program for skype and others.

This program is an evolution of the first I made. It will route the audio to the earpiece when an certain program is running.
I put the program here because I have test it in wizard, if people test this in others phones and it works, please post here and maybe move this this thread to an more "generic" forum.
the program MUST be under "\($program files)\audioswitch" folder, you must unzip the contents to this folder.
the configuration file (command.txt) is under this format:
1000
skype
fring
etc
the first line is the delay(in miliseconds) in witch the program will "look" if a program in the list is in the top level window, faster phone, smaller delays, I recommend 1000 ms.
the next 20 lines are the programs you want the audio to be routed to the earpiece(max 20 lines for now).
Again the program is under the "do it on your own risk" and "I am not responsible for anything" licence. And,of course, it is free!! Do not sell it!
It is manly intended for little expert users, as it is still in "beta" fase, hehehe.
How it works:
the program runs in an eternal loop and look for the title of the current window that is displayed for the user in a time interval.
When the program mach the title window with one of the names user configured it it will switch the audio, when the program is not running anymore, the audio will swich back.
Do not launch two or more instances of the program at the same time, could really mess things up. -- se the forum (thanks tucahara)
To stop the program, u must use a process manager.
it would be good if someone could make a cab to install it. -- done see the forum (thanks tucahara)
this is still a beta, I intend to make ajustments as people give feedback.
Thanks,
hope u like.
-----first update---
now, an file called "audioswitch_error.txt" in the root directory will hold the error messages.
------------ List - Working ------------
wizard - I tested
P3301 or P3300 - I tested
att tilt - I tested
touch 3452 and 3450
touch dual
touch cruise
touch HD
Sony Ericsson Xperia X1
BenQ E72
Titan --> see the forum
------------ List - NOT working ------------
T-Mobile Diamond
HTC Touch by Sprint
Samsung SGH-i780
------------------------------------------------------------------------------------
check the new thread at:
http://forum.xda-developers.com/showthread.php?t=502361
new aproach to do the switch and now open source, even with an class that others can improve and put in other apps...
Some people complain about me not openning the source of the app, I have just made this way because there was proprietary code inside and I had no time to rewrite it without the proprietary code.
I have made the best I could, and now I had some time and rewrite the app in open source, to those who only complain about it, get the code and make it better instead of complaining!
Thanks for all that encourage me to continue the work and helped the development.
will retire this project for while...
thanks u all.
Audioswitch for Skype
On HTC Touch by Sprint (CDMA, also known as Vogue), audioswitch does switch the audio in the Skype 2.5 windows mobile PPC from external speaker to handset. Unfortunately, the microphone is then also disabled. I hope you'll be able to tweak your audioswitch to resolve this.
Thank you so much for developing this wonderful applet. I'm sure you will have the gratitude of many frustrated Skype windows mobile users.
What really happens is that when the sound output is switched in some phones, the microphone gain changes too. This happens because the phone thinks it is a "normal call".
Most of the times the mic gain increases, but in your phone it must be decreasing. Try to figure out in registry where the mic gain controls are recorded and chage all of then to the same value. I had this issue with my P3301 and solved this way, but there is quite a time now and I do not remenber where are the reg keys to change, but I have found the information here in the forum.
I will try to figure out for other "hack" to solve this issue... thanks for reply.
doesn't work at T-Mobile Compact IV (aka Diamond)
Sound went to loudspeaker....
PS: fring last version working fine with sound at mine phone (without any additional programms). Sound is going to correct destination automatically
I just tried the latest version of Fring, which automatically switches audio to earpiece when call is connected.
The same issue occurs with the new Fring as I described above with your audioswitch program: I can hear audio through earpiece, but microphone doesn't work (or is inaudible).
I couldn't find a tweak or registry hack to correct this. Any help would be greatly appreciated.
MarceloFB said:
This program is an evolution of the first I made. It will route the audio to the earpiece when an certain program is running.
I put the program here because I have test it in wizard, if people test this in others phones and it works, please post here and maybe move this this thread to an more "generic" forum.
the program MUST be under "\($program files)\audioswitch" folder, you must unzip the contents to this folder.
the configuration file (command.txt) is under this format:
1000
skype
fring
etc
the first line is the delay(in miliseconds) in witch the program will "look" if a program in the list is in the top level window, faster phone, smaller delays, I recommend 1000 ms.
the next 20 lines are the programs you want the audio to be routed to the earpiece(max 20 lines for now).
Again the program is under the "do it on your own risk" and "I am not responsible for anything" licence. And,of course, it is free!! Do not sell it!
It is manly intended for little expert users, as it is still in "beta" fase, hehehe.
How it works:
the program runs in an eternal loop and look for the title of the current window that is displayed for the user in a time interval.
When the program mach the title window with one of the names user configured it it will switch the audio, when the program is not running anymore, the audio will swich back.
it would be good if someone could make a cab to install it.
this is still a beta, I intend to make ajustments as people give feedback.
If someone like this program and wants to make an donation...
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4WLQVA6LTKWSL&lc=GB&item_name=marcelofb&item_number=marcelofbxdadonations&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
Thanks,
hope u like.
Click to expand...
Click to collapse
I have an idea. Rather than regularly polling to see what the current windows is, why not use a windows hook to monitor windows messages. When you see a message indicating a window has come to the foreground test it against your list of windows and enable/disable audio switch as necessary. Use SetWindowsHookEx and hook for WH_CBT messages. If you are unfamiliar with using SetWindowsHookEx I could supply you with the hooking code and all you would need to do is insert the code to check the window names, enable the audio switch, and disable the audio switch. Or you could send me the enable/disable routines.
Another tip, I noticed that skype places an icon in the notification area during a call. If there is someway of detecting the notification icon that could be another great way to trigger the switch.
Great program though. Works beautifully.
OOOH
If this program works on the new BenQ E72 I'm getting in a couple of days I'll certainly donate!
THANKYOUTHANKYOUTHANKYOU
hello,
it does not work on hermes (tytn).
by the way "troca2" does work on hermes! - maybe you guys want to work together?
baal_zebub said:
hello,
it does not work on hermes (tytn).
by the way "troca2" does work on hermes! - maybe you guys want to work together?
Click to expand...
Click to collapse
hehhehe, I made troca2, I will see if the switch code is the same or if I have made some mistake...
are u sure you have put the program in the correct directory?? I will make some modifications to have an error feedback. So u can see if something is wrong...
JKingDev said:
I have an idea. Rather than regularly polling to see what the current windows is, why not use a windows hook to monitor windows messages. When you see a message indicating a window has come to the foreground test it against your list of windows and enable/disable audio switch as necessary. Use SetWindowsHookEx and hook for WH_CBT messages. If you are unfamiliar with using SetWindowsHookEx I could supply you with the hooking code and all you would need to do is insert the code to check the window names, enable the audio switch, and disable the audio switch. Or you could send me the enable/disable routines.
Another tip, I noticed that skype places an icon in the notification area during a call. If there is someway of detecting the notification icon that could be another great way to trigger the switch.
Great program though. Works beautifully.
Click to expand...
Click to collapse
It is a good idea to use hook, I have not think of it!
I use a proprietary code included in a lib at the company I work for to make the "switch" but it is not different of what u find here in the forum.
Maybe we can make an effort to re-make it with hooks...
so this program must run all the time? after every softreset you have to start it?
is it not easier with mortscript (for example) to make an shortcut that opens skype as well as the audioswitch program? and closes the audioswithc program when you close skype?
I am using it right now and it seems to work perfect:
i used this script after installing mortscript (http://www.sto-helit.de/):
run( "\Windows\SkypeSoundSwitch.exe" )
runwait( "\Program Files\Skype\Skype.exe" )
close( "troca2" )
(see that in my case i downloaded your original program and renamed it to skypesoundswitch.exe and put it in the windows map)
I renamed it so i could remember what the purpose the file had.. changed nothing but the name!
Thanks for the program by the way! it always worked perfect!!
so to sum up the way i have it now (most files included) on my xperia x1:
1) installed skype
2) installed mortscript
3) add skypesoundswitch to \windows\....
3) add skype.mscr to \.... (root)
4) overwrite skype.lnk with the new skype.lnk in \windows\start menu\programs\..
in the way whenever i open skype(.lnk), it opens skype.mscr, this opens skypesoundswitch.exe and than skype.exe... when you close skype.exe it closes skypesoundswitch.exe...
it seems to work perfect.. but hey maybe i am doing something totally wrong here.. than just shout!
by the way, the .mscr and the .lnk files are offcourse edit-able .. so you can put the files everywhere you like..
madhijs said:
so this program must run all the time? after every softreset you have to start it?
is it not easier with mortscript (for example) to make an shortcut that opens skype as well as the audioswitch program? and closes the audioswithc program when you close skype?
I am using it right now and it seems to work perfect:
i used this script after installing mortscript (http://www.sto-helit.de/):
run( "\Windows\SkypeSoundSwitch.exe" )
runwait( "\Program Files\Skype\Skype.exe" )
close( "troca2" )
(see that in my case i downloaded your original program and renamed it to skypesoundswitch.exe and put it in the windows map)
I renamed it so i could remember what the purpose the file had.. changed nothing but the name!
Thanks for the program by the way! it always worked perfect!!
Click to expand...
Click to collapse
That works great too. The advantage of this new program is that it will only reroute the audio when skype is in the foreground. You could minimize skype and leave it running, and audioswitch will automatically restore your sound. Get a call and open up skype and your sound goes back to the earpiece.
I will create the code to do it with a windows hook when I get a chance MarceloFB. Please pm me your email address. All you will have to do is insert the code to read the config file, check the window names, and when necessary enable or disable the switch. Or please show me where to find details on how to code this myself. Thanks!
Hat off to both of you and really glad that we will have a much improved solution.
JKingDev said:
That works great too. The advantage of this new program is that it will only reroute the audio when skype is in the foreground. You could minimize skype and leave it running, and audioswitch will automatically restore your sound. Get a call and open up skype and your sound goes back to the earpiece.
I will create the code to do it with a windows hook when I get a chance MarceloFB. Please pm me your email address. All you have to do is insert the code to read the config file, check the window names, and when necessary enable or disable the switch.
Click to expand...
Click to collapse
okay! I only used skype to make calls and than get offline so this way did the trick for me! but i have to admit it would be much better when i can keep skype online!
this new program does the trick indeed! it changes the output back when i minimize skype!
But still my question above, you have to start this program on every startup isn't it? what does it do with the battery?
madhijs said:
okay! I only used skype to make calls and than get offline so this way did the trick for me! but i have to admit it would be much better when i can keep skype online!
this new program does the trick indeed! it changes the output back when i minimize skype!
But still my question above, you have to start this program on every startup isn't it? what does it do with the battery?
Click to expand...
Click to collapse
Yes it must be run at startup but placing a link in your startup folder will make everything transparent to the user. I don't think there will be an effect at startup. In it's current form it must check every second (or whatever you set the timeout to), but its only a little bit of code. I am not really sure if that will really have an effect. The more often it checks the faster it will switch when you open skype, but also the more processor use. Check less often and it uses less processor, but there might be a delay in switching the audio. I proposed doing it by hooks though because this would use even less processor. The app will only check when a new window takes focus, rather than just periodically checking. This way it only checks when it needs to and will always switch instantly.
I am glad u liked the program.
I will try to answer most of the questions...
1- JKingDev:
I have though in your idea of using hooks, but if I use a hook, the program will have a loop anyway to check for the messages(hidden loop ;-) ), and it would have to have an "fake window" or something to process the messages. This way we have only one loop, in a very simple command line program with high optimization, so we have to think what is really the best way of doing it... I will pm u as soon I have any time to "program" again. hehe
2- people that uses mortscript with the old "troca2"
I will try to make a way to make this program work the same way as troca2, maybe with an "argc argv", wait the next update.
3- the battery life??
if u notice any battery life decreasing with the usage of the program, configure a bigger delay, maybe 5000ms, it is a matter of adjust the "timming" for each processor. Post your results here so others can find the optimum value for the delay in their phones.
4- have to start the program every reset?
yes, just put it in the startup folder.
maybe someone can make an cab that put the program in the right place and a link in the startup, it would be cool! I dont have an easy program to deal with cabs, and the vs projects for cabs.... I really cant make that thing work!!
well it is only the batterylife i was worried about. but i'll try running the phone this weekend with the program running and doing some skype.. lets see how it turns out!
For folks who have issues of mic on using this program, there is a quick solution for this problem. You can try sjphone. It provides a internal mic volume control. However, the major setback is that it's only working in wm5.
my 2 cents
weekendli said:
For folks who have issues of mic on using this program, there is a quick solution for this problem. You can try sjphone. It provides a internal mic volume control. However, the major setback is that it's only working in wm5.
my 2 cents
Click to expand...
Click to collapse
will check this, but people reported that worked in xperia... and it is running in my P3301... anyway, will check and post an wm6 build if it is the case... check the error file and see if it tells anything.
Other thing, this program uses low level api`s, so your windows MUST be fully unlocked for it to work in wm6.

Categories

Resources