Wireless Stereo Switch (or other solution) - General Topics

Once my Bluetooth Headset is connected to my Prophet, all my notification sounds come through my Bluetooth Headset instead of the phone speaker.
The sound for normal incoming call works as it should though (through the speaker).
The only way i've found how to solve this problem, is to uncheck the "Wireless Stereo" option under:
Settings > Connections > Bluetooth > i.Tech Clip R35 > Partnership Settings
And then when I want to listen to music through the Windows Media Player, I have to do the opposit.
So, my two questions...
1. Is there a way to map notification sounds to always use the phone's speaker? (or)
2. Is there a small shortcut / Today-plugin that can switch "Wireless Stereo" on/off in one click?
Cheers!
Eric

Mortscript could be used for to create a script that would toggle Wireless Stereo" & then a shortcut to this script could be put on the today screen or mapped to a button.
Do a search on scripts for wifi as many people have done this type of thing already.
Also have a look at this link, might be of some use.
http://www.vijay555.com/?Releases:VJVolubilis

Mister B said:
Mortscript could be used for to create a script that would toggle Wireless Stereo" & then a shortcut to this script could be put on the today screen or mapped to a button.
Do a search on scripts for wifi as many people have done this type of thing already.
Also have a look at this link, might be of some use.
http://www.vijay555.com/?Releases:VJVolubilis
Click to expand...
Click to collapse
Thanks Mr. B.
Interesting idea.
But it seems like the VJVolubilis only supports BlueTooth on/off at this stage, and not switching a BlueTooth service on/off.
And from what I understand the "agon" command passes the audio through the "Headset" service of a BlueTooth device.

Well, I solved it by creating a Mortscript...
It's not beautiful, but it works!

overone said:
Well, I solved it by creating a Mortscript...
It's not beautiful, but it works!
Click to expand...
Click to collapse
It may look ugly in notepad but the beauty is watching it work.
Have fun with your scripts, its a useful tool.

@overone, can u share the script???

shantzg001 said:
@overone, can u share the script???
Click to expand...
Click to collapse
Yes, sure! If you promise not to laugh?
I'm sure there's tons of ways to make this better, but I never used this script language before, and I didn't want to waste an eternity fixing my problem.
Removing the sleeps would be the first things on my mind for an improvement.
As for the shortcut "BluetoothSettings.lnk"; it just a simple shortcut that opens the bluetooth setting panel.
And YES, it's hardcoded to be located in Program Files...
Code:
# Open Bluetooth Settings
Run("\Program Files\BluetoothSettings.lnk")
WaitForActive("Settings",5)
# Go to i.Tech Clip R35
SendDown
SendCR
Sleep(1000)
# Mark/Un-Mark Wireless Stereo
SendDown
SendDown
SendCR
Sleep(1000)
# Exit and Save
SendRightSoft
Sleep(2500)
SendOK

That worked wonderfully for me, and is the only solution I have found so far to automatically turn on my BT Stereo Audio headset.
Download Mortscript from http://www.sto-helit.de
Create a new file ToggleBTStereoAudio.mscr in any folder on your PPC with the following text in it
Code:
# Open Bluetooth Settings
Run("\Program Files\BluetoothSettings.lnk")
WaitForActive("Settings",5)
# Go to i.Tech Clip R35
SendDown
SendCR
Sleep(1000)
# Mark/Un-Mark Wireless Stereo
SendDown
SendDown
SendCR
Sleep(1000)
# Exit and Save
SendRightSoft
Sleep(2500)
SendOK
Create a new file "\Program Files\BluetoothSettings.lnk" with the following in it
Code:
23#ctlpnl cplmain.cpl,23,1
To toggle your BT Stereo simply click on the ToggleBTStereoAudio.mscr file. You will be able to see the mortscript run and toggle the stereo audio for the device.

There's a program called A2DPToggle - freeware
Just came across it myself and it does the job very well - has a Today plugin that can even start A2DP then launch your media player as well as other BT management and speakerphone toggle, or an app that just toggles Wireless Stereo when run
The homepage for it is at http://www.teksoftco.com/index.php?section=freeware

Related

Quickly activate Bluetooth Stereo Mode?

Now I`m activating my Stereo Bluetooth headset in 6 taps. start/settings/connections/bluetooth/devices/long tap on device and select "stereo hesadset"
Is there any way to make this procedure shorter?
vandal_ said:
Now I`m activating my Stereo Bluetooth headset in 6 taps. start/settings/connections/bluetooth/devices/long tap on device and select "stereo hesadset"
Is there any way to make this procedure shorter?
Click to expand...
Click to collapse
I'm still looking for a piece of software that will activate it, but :
. You can make a shortcut to your BT devices tab : check http://msdn2.microsoft.com/en-us/library/ms838639.aspx and http://forum.xda-developers.com/showthread.php?t=289005
. You can use BatteryStatus (search on xda-dev), it has BT tray icon with links to that page too, plus other features. If you can find anyone that has manage to activate Bluetooth Stereo with an app, please let us know
vandal_ said:
Is there any way to make this procedure shorter?
Click to expand...
Click to collapse
Use BTHtools 1.0.1.2.
Mine gets connected automatically as soon as I press the connect button on my stereo headset whilst using Media Player.
Sascha

Bluetooth A2DP

Hi there,
I don't know where to ask this, so it went to "General".
I've got a JasJar running WM6 and it happily runs stereo music on my Motorola HT820 bluetooth headset. I also have Sony BT2500 car stereo system which supports bluetooth phone as well as A2DP. with my HT820, I just turn the headset on and jasjar sees the headset and connects to it, but with the BT2500 only the phone part is automatically connected. if I want to listen to music I have to (on my jasjar) go to settings/connections/bluetooth and tap and hold on my xplod (my sony BT2500) and set it as wireless stereo.
is there any way to avoid this step (as I'm usually driving when i have to do this)? if not, is there an easy way to do it with one hand and no tap and hold ?
Cheers,
Shafa
Hey Shafa,
I've got the same problem with my Prophet and a Pioneer BTB200. So far i found no solution, so i most likely will have to write a program to connect to a BTdevice as wireless stereo, if it autoconnects as a handsfree device and is a2dp capable.
hey Lemmz,
I'm very interested to know what API you have to call to do this...
Cheers,
Shafa
HTC Faraday
Hello all,
Are there any resources here for the Cingular 2125 , I would like to port linux on the 2125. sorry if i have mis-posted.
thanks,
rvb
@shafa:
there is a Bt_api.h in the wm5 SDK which defines a function called RequestBluetoothNotifications; so far i found
RequestBluetoothNotifications
Handling Events from the Bluetooth Stack
Retrieving AVDTP Connection State
My idea would be to monitor all bluetooth connection events (most likely via a service), see which device (auto)connects and if it is a handsfree-device and supports wireless-stereo, initiate pairing for the latter.
i will try to do some coding later today. i'll keep you informed.
Cheers,
lemmz
Ok, so far i can recieve bt-related events. unfortunately i've found no info on how to initiate an a2dp connection microsoft-style. There's tons of code for AudioGateway stuff, but imho thats pretty useless.
Looking at the registry i found in HKLM\Software\Microsoft\Bluetooth\Services\0000110B-(...) reference to "Wireless Stereo" and bthutil.dll. looking at the WM6 SDK, bthutil.h, there are just two functions, BthGetMode and BthSetMode, for turning BT on and off.
I'm also looking at the sources for the (settings->connections->bluetooth)-Dialog, btenum.cxx and btmgmtui.cpp, maybe there is some info on this.
Edit:
btw, this 0000110B thing is referred to as AudioSinkServiceClass_UUID. But no luck on that either.
Soo, i think i'm quite close now...
DRVM_MAPPER_PREFERRED_SET -- with waveOutMessage you can switch soundoutput to different devices, unfortunately for a2dp it returns NOTSUPPORTED.
But within the a2dp driver i found some messages:
WODM_BT_SCO_AUDIO_CONTROL, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP
they seem to initiate a connection and set the preferred output device, just like the DRVM_MAPPER_PREFERRED_SET should. Tonight i'll experiment with it.
SUCCESS!!
It worked just as i though: a single command does all the work.
waveOutMessage((HWAVEOUT)devId, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP, NULL)
The device to connect to has to be paired and, of course, in range. I'm now going to clean up the code and build a litte configuration-tool.
Freeware tool
EDIT: Version 1.0.rc-2 uploaded . Find the download link below:
http://teksoftco.com/index.php?section=freeware
I've just uploaded version 1.0.rc-1 of the A2DP plugin. It can be downloaded and used as freeware (0 cost) from http://teksoftco.com/index.php?section=freeware , or find it below attached to this message, including a short usage guide.
New in this release (as many users requested):
-signal indicator
-3 modes for headset: OK, Off, Err
-settings panel added
-Handle Bluetooth option
-Execute File after start option
-applet added in start->settings->system to start settings
-a2dp.exe included in the package, that with parameters: a2dp.exe -bluetoothn|off -a2dpn|off or a2dp.exe -bluetooth:1|0 -a2dp:1|0
------------------
Actually devices that support A2DP (most wm6.0 bluetooth devices), come with 2 audio drivers installed:
1) The "Audio Output" Driver (supported since ppc 2002)
2) The "Bluetooth Advanced Audio Output" Driver, that is responsible of sending audio data over a L2CAP Bluetooth connection, as per A2DP protocol
When the user connects a Stereo A2DP headset, and selects the "Wireless Stereo" profile, the Bluetooth Adv. Audio Output becomes the nr. 1 audio output route, and is indexed as the First audio driver. Any application will output sound by using that driver.
The problem is that sometimes we are already listening to audio in the device's speaker's, and then suddenly we want to switch the output to our a2dp headsets - this is sometimes problematic, as the First audio driver changes from "Audio Output" to "Bluetooth Adv. Audio Output" and the applications currently playing audio need to be restarted.
For such issues, I have provided a tool, as freeware, that will install as a today plugin and provide the user with the possibility of instantly switching the audio between Device Speaker and A2DP Stereo Headset.
It is designed for WM6.0, Microsoft Bluetooth stack, please download it and let me know how it works for you. There are some more modifications that will be done, so this is only Beta-1
The CAB installer and instructions are in the ZIP attached.
(tested on ultimate 8150/wm6.0 and eten m600+/wm5.0, the gfx was made for vga but works on qvga too)
Hello Radhoo,
first times thank you, after such a thing I searched for a long time in vain.
tool functions on the Artemis with WM6 perfectly.
If the Tool were still developed further, I would be pleased genuinly, and would like to call hereby gladly my desires:
1. Bluetooth automatically switch on and off
2. Komandozeilensteuerung
3. Traybuttons without Todayplugin
4. Automatic start of a desired program after activation of A2DP (Mortplayer)
thanks Menkul
Hello menkul, Thanks for the feedback.
What is Komandozeilensteuerung?
Sorry Komandozeilensteuerung ist german.
I mean a Funktion a2pd.exe blueon A2DPon
a2dp.exe blueoff
or so.
Also a exe with startparameter
Menkul
Great idea
Any way to indicate bluetooth 1.2 or 2.0 status/line speed, signal strength, bandwidth?
bjrmd said:
Great idea
Any way to indicate bluetooth 1.2 or 2.0 status/line speed, signal strength, bandwidth?
Click to expand...
Click to collapse
Will try to
I have two spare days for research (wow!) so I'll try to come up with something.
lemmz
lemmz said:
SUCCESS!!
It worked just as i though: a single command does all the work.
waveOutMessage((HWAVEOUT)devId, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP, NULL)
The device to connect to has to be paired and, of course, in range. I'm now going to clean up the code and build a litte configuration-tool.
Click to expand...
Click to collapse
I am sorry I've "invaded" this thread, without first saying thanks to lemmz for his work, as I very well understand the effort needed to perform this kind of research.
While I wasn't aware of his findings (which are available in AK :
bt_ddi.h, WM520\PUBLIC\COMMON\OAK\INC\ ) I just wanted to give another free tool to the community, so I posted this in a few threads where users where requesting A2DP tools. I hope this is ok.
Dear Lemmz,
thanks a lot, i will take a look asap.
thanks again
Shafa
Hey Lemmz,
where do you get the devId from?
I'm thinking about writing the application, but I'm not a C++ guy (anymore atleast) I need to write it in C#...
Cheers,
Shafa
me again. should i use WAVE_MAPPER for device ID? if so, what is the value for it or even better, where can i find the whatever.h that has the value? is there an SDK i should download?
Cheers,
Shafa
menkul said:
Sorry Komandozeilensteuerung ist german.
I mean a Funktion a2pd.exe blueon A2DPon
a2dp.exe blueoff
or so.
Also a exe with startparameter
Menkul
Click to expand...
Click to collapse
Done, original post updated, download 1.0.rc-1
Signal indicator also added: it shows the bluetooth connection strength!
shafa said:
me again. should i use WAVE_MAPPER for device ID? if so, what is the value for it or even better, where can i find the whatever.h that has the value? is there an SDK i should download?
Cheers,
Shafa
Click to expand...
Click to collapse
You should use waveOutGetNumDevs() to get the number of wave devices.
Then you can use their index directly: 0 , 1 , eg.:
int idWAVE_BTAudio = 0; // or 1
waveOutMessage((HWAVEOUT)idWAVE_BTAudio ...
Where:
Code:
0. Audio Output
1. Bluetooth Advanced Audio Output
Be careful, the index changes when one device is selected, so you should check the WAVE devices each time you want to switch the audio.
Personally I've used waveOutGetNumDevs() then waveOutGetDevCaps to see what kind of device is each of the enumerated ones.
Hope this helps.

A2DP Freeware tool

New version available!
See: http://forum.xda-developers.com/showthread.php?t=437726
Please comment there.
Older version:
EDIT: RC-2 is available
I've just uploaded version 1.0.rc-1 of the A2DP plugin. It can be downloaded and used as freeware (0 cost) from http://teksoftco.com/index.php?section=freeware , or find it below attached to this message, including a short usage guide.
New in this release (as many users requested):
-signal indicator
-3 modes for headset: OK, Off, Err
-settings panel added
-Handle Bluetooth option
-Execute File after start option
-applet added in start->settings->system to start settings
-a2dp.exe included in the package, that with parameters: a2dp.exe -bluetoothn|off -a2dpn|off or a2dp.exe -bluetooth:1|0 -a2dp:1|0
--------------------------
The devices that support A2DP (most wm6.0 bluetooth devices), come with 2 audio drivers installed:
1) The "Audio Output" Driver (supported since ppc 2002)
2) The "Bluetooth Advanced Audio Output" Driver, that is responsible of sending audio data over a L2CAP Bluetooth connection, as per A2DP protocol
When the user connects a Stereo A2DP headset, and selects the "Wireless Stereo" profile, the Bluetooth Adv. Audio Output becomes the nr. 1 audio output route, and is indexed as the First audio driver. Any application will output sound by using that driver.
The problem is that sometimes we are already listening to audio in the device's speakers, and then suddenly we want to switch the output to our a2dp headsets - this is sometimes problematic, as the First audio driver changes from "Audio Output" to "Bluetooth Adv. Audio Output" and the applications currently playing audio need to be restarted.
For such issues, I have provided a tool, as freeware, that will install as a today plugin and offer the user the possibility of instantly switching the audio between Device Speaker and A2DP Stereo Headset.
It is designed for WM6.0, Microsoft Bluetooth stack, please download it and let me know how it works for you. There are some more modifications that will be done, so this is only Beta-1
The CAB installer and instructions are in the ZIP attached.
(tested on ultimate 8150/wm6.0 and eten m600+/wm5.0, the gfx was made for vga but works on qvga too)
Feel free to post feedback here, or on the windows mobile development forum, address below.
great plugin! i wish there was a smartphone version for this too
oldsap said:
great plugin! i wish there was a smartphone version for this too
Click to expand...
Click to collapse
Will try to provide one these days. If only time was a disposable resource
Than you very much sir. will be looking forward to it
Thank you. Works ok with Wizard (WM6) and Siemens HHB 750.
This is the App that i am looking for, but for some reason i can't see the icon, since my HTC home doesn't show it.
Any clue?
hi
just installed the version on the teksoftco site.
first impressions -huge thank you; just what i've been looking for.
however i do have a wish and an observation
1. wish: when you tap on the bt symbol, can it turn on/off the bluetooth like on the commanger.
2 headset symbol seems to be always reading ok, even if headset off or bt turned off.
thanks
R.
another thought
any chance you can speak to Sleuth255
http://forum.xda-developers.com/showthread.php?t=284974&highlight=a2dp+cutting
he has a fix for the skipping when using a2dp.
this could be an option to enable/disable the fix when selecting the connect/stop on the today screen.
the advantage being when you disconnect you reduce the power drain.
(the fix uses a contiual loop which means the processor is working all the time)
thanks
1.0.RC-1 version added, first post edited, and new files uploaded
@tiga69 , will try to do that.
There was a little problem in identifying an A2DP device among other BT devices.
The previous post is updated with the new RC-2 version. Please re-download the CABs and reinstall this new version.
hi,
great tool ! thx
1 prob i have: when select "handle bluethooth automatically" and select a prog to start i.e mortplayer then at the first tap on "play" BT switchs on and mortplayer start. but the headphones are not set to wireless!
i have to minimize the mortplaye and click "play" again to set the headphone to wireless.
maybe a delay would help a little ???
cu
inteks

Orbit 2 and Gear4 stereo bluetooth headset

Hi,
When I switch on both devices they connect fine, and I'm able to make calls etc, but the stereo connection doesn't appear to be established. I then have to go to Comm manager>Settings>Bluetooth, tap and hold my bluetooth headphone in the list, then choose 'Set as Wireless Stereo' from the list that appears.
As soon as I do this, the stereo connection is achieved and indicated by the headphone icon appearing in the top bar.
Is anybody else having this issue with stereo bluetooth headphones?
Is there a solution to this?
Aleemz,
I've just bumped in to this post - I have solved this on mine by writing a mortscript to automate the manual steps above.
It works pretty well, switching on the BT, waiting for the headset to connect, and then switching off the BT when the headset disconnects.
Here's the script (with thanks to another poster who gave me the starting block for this):
#power up bluetooth
Run ("\program files\vijay555\vjvolubilis\vjvolubilis.exe","-blueon")
#wait for something to connect, but only for 30 secs
SleepMessage( 30,"Connect Headset", "waiting for headset" , True ,RegRead("HKLM", "System\State\Hardware", "Handsfree") = 1 )
If (RegRead("HKLM", "System\State\Hardware", "Handsfree") = 0 )
#headset isn't connected, so switch off bt & give up
Run ("\program files\vijay555\vjvolubilis\vjvolubilis.exe","-blueoff")
exit
endif
#if we get here, then bt is on & the headset (or something) is connected
#may want to add logic here to decide what to do based on what device has connected
#run up the settings page
Run "\Program Files\MortScript\bluetoothcpl.lnk"
#wait for the settings page to load
WaitForActive ( "Settings",20 )
If (WndActive("Settings"))
#Great - it opened
#set the device
#may well have to add some logic here later to detect which BT device has connected
#This works if the BLuPhones are the 1st in the list
MouseDown Settings,60,125
Sleep 1000
MouseUp Settings,60,125
Sleep 500
SendDown
SendDown
SendDown
SendCR
Close "Settings"
#now we're all set up
#Now just wait for it to disconnect
#loop watching for bt headset disconnect for 4 hours, checking every minute
timcount = 0
while (timcount < 60*4)
timcount = timcount + 1
If (RegRead("HKLM", "System\State\Hardware", "Handsfree") = 0 )
#headset has dis-connected, so switch off bt & exit the apps
Call CloseAppsAndExit
Exit
endif
sleep 60000
EndWhile
#timeout after 4 hours of waiting, and shutdown media player & bt anyway
#do this in case it's been left on accidentally
Endif
Message("Closing down bluetooth now","Bye")
Call CloseAppsAndExit
Sleep 2000
Exit
Sub CloseAppsAndExit
#Close all apps we ran & exit
#close BT
Run ("\program files\vijay555\vjvolubilis\vjvolubilis.exe","-blueoff")
#close all apps -
Call ("CloseApp","GSPlayer")
Call ("CloseApp","Windows Media")
#this is the name of AVRCP I think
Call ("CloseApp","TCPMP")
Call ("CloseApp","S2P")
#and this is my guess at S2P
EndSub
Sub CloseApp
if (WndExists(argv[1]))
close(argv[1])
Endif
EndSub

Automating bluetooth

Is there any way to automate the steps to go into the Bluetooth control panel and activating one of my Bluetooth devices to use for wireless stereo?
I have a Scosche BT box in my car so I can play audio through the car stereo. But every time I want to use it I have to switch to the BT panel, use the stylus to press and hold on the Scosche BT icon until the menu pops up then select Set as wireless stereo.
I believe the reason this does not work automatically is that I have multiple BT devices and only one of them will ever work automatically otherwise all your devices would be trying to get hold of the phones output.
Anyone have ideas on how to make this an easier process? Preferably one that would allow me to use Voice Command to activate it? An app specifically for this purpose or perhaps a macro recording app that hopefully would allow an icon for a specific set of commands to run rather than having to open the app then execute the macro?
TIA.
You can start with AutoA2DP, A2DP Toggle, several custom scripts on the MortScripts thread, but Auto ActiveSync will do this as well...
Friendly reminder... please use the Q&A forum for questions.

Categories

Resources