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.
Anyone have SAP working on the tornado?
I've found this package in a PPC discussion and it seems to run smoothly on my Tornado, but I do not have a SAP device to test. Could you test it? (Install, enable and reboot)
NiTroGenious said:
I've found this package in a PPC discussion and it seems to run smoothly on my Tornado, but I do not have a SAP device to test. Could you test it? (Install, enable and reboot)
Click to expand...
Click to collapse
I installed but what does it do??
Sorry! too lazy to search for info.... probably you can brief me on this.
Thanks
SIM Access Profile (SAP)
SAP allows devices such as car phones with built in GSM transceivers to connect to a SIM card in a Bluetooth enabled phone. Therefore the car phone itself does not require a separate SIM card. (Bluetooth Glossary)
NiTroGenious said:
SIM Access Profile (SAP)
SAP allows devices such as car phones with built in GSM transceivers to connect to a SIM card in a Bluetooth enabled phone. Therefore the car phone itself does not require a separate SIM card. (Bluetooth Glossary)
Click to expand...
Click to collapse
Thanks Buddy. Am very grateful to your quick answer.
Take care
Chicken and egg...
NiTroGenious said:
I've found this package in a PPC discussion and it seems to run smoothly on my Tornado, but I do not have a SAP device to test. Could you test it? (Install, enable and reboot)
Click to expand...
Click to collapse
Unfortunately my car manufacturer is not as effecient as you NiTroGenious. I will be looking to test this on a friend's car which may take some time. If it works I will buy the parts to enable SAP on my car.
Thank you for your work on this.
Could you please try to test it in the next 2 weeks, so that I know the results before releasing my new ROM?
Thank you!
How can I tell if it is using SAP?
NiTroGenious said:
Could you please try to test it in the next 2 weeks, so that I know the results before releasing my new ROM?
Click to expand...
Click to collapse
How can I tell if it is using SAP? It works in my friend's SAP compatible car but maybe it just is using the handsfree profile. I assume that the handsfree profile will lookup phonebook entries and display the number called.
If the phone displays the connection to the car as having the SAP profile than it definately didn't work as the only profile shown was the handsfree.
I'm sorry, but I have no idea. Perhaps you should try a known SAP-enabled phone and compare with Tornado.
Hi! I have a brand new Jabra 620s bluetooth-headset. When I turn the headset on and search for bluetooth devices on my computer I can see it, but I cant see it when I search for it on my touch pro.
What could be the problem here?
I had a similar problem last night (and have it quite often when i need to pair). It doesn't detect it until the 3rd or 4th time in which last night it didn't even detect it either. I power cycled the headset and my phone found it the first time.
Yeah, I tried rebooting my headset and my phone several times, but I still can't get it to work...
Figured it out... Had to hold in a button on the headsett to make it avaliable for new devices...
But new problem:
I don't get sound in the headsett when I play music. But when I make a call the sound is in the headsett. What could be the problem here?
Maybe its the settings in your a2dp profile?
I read this "Set-up of the 620's was simple enough, the headset unit is paired with the device that is streaming the music and / or a mobile phone. A smart move from Jabra allows the 620s to be connected to both a mobile phone and an audio device simultaneously. However our set-up was rather more straight forward than most as we used Jabra's own Bluetooth dongle that supports the all important A2DP (Advanced Audio Distribution Profile) profile. Real life for most users is a different kettle of fish with support for A2DP being quite sparse, most music gateways and servers and even music ready mobiles rarely support the required profile." source: http://www.lordpercy.com/jabra_bt620s_review.htm
Maybe some tweaking in hklm\\software\microsoft\bluetooth\a2dp\Settings
I believe this headset also supports AVRCP profile. In any case, make note of your original configuration prior to making any changes.
nyckid211 said:
Maybe its the settings in your a2dp profile?
I read this "Set-up of the 620's was simple enough, the headset unit is paired with the device that is streaming the music and / or a mobile phone. A smart move from Jabra allows the 620s to be connected to both a mobile phone and an audio device simultaneously. However our set-up was rather more straight forward than most as we used Jabra's own Bluetooth dongle that supports the all important A2DP (Advanced Audio Distribution Profile) profile. Real life for most users is a different kettle of fish with support for A2DP being quite sparse, most music gateways and servers and even music ready mobiles rarely support the required profile." source: http://www.lordpercy.com/jabra_bt620s_review.htm
Maybe some tweaking in hklm\\software\microsoft\bluetooth\a2dp\Settings
I believe this headset also supports AVRCP profile. In any case, make note of your original configuration prior to making any changes.
Click to expand...
Click to collapse
I tried to install btAudio. Now I have sound in my headset, but det sound-quality is CRAPPY! Are there any other software avaliable that can fix this? Dont know if I want to edit the registry.... There must be a solution?
slogum said:
I tried to install btAudio. Now I have sound in my headset, but det sound-quality is CRAPPY! Are there any other software avaliable that can fix this? Dont know if I want to edit the registry.... There must be a solution?
Click to expand...
Click to collapse
You can use Advanced Config to enlarge the bluetooth bitpool under the bluetooth tweaks. Set it to "very high" for best sound quality (uses more system resources tough).
HTH
Maximum bit-pool setting is 1561. I dont think it solves the problem, cause the quality is still really bad.
Any other tips? Or do I have to return the headset cause a brand new ~1000$ phone cant play on a wireless bluetooth headset?!
Bump.. Are there really no solutions?
An amazing One click - Connect 2 Specific Bluetooth device for A2DP and Phone app:
Bluetooth Pair
https://play.google.com/store/apps/details?id=com.gnssoftworks.bluetoothpair
found it very useful for swapping bluetooth headphones between devices WITHOUT turning off Bluetooth entirely or going into the settings menu.
Example Use Case:
I have one Stereo Bluetooth headset with mic (two profiles - phone and A2DP audio)
I have one Android Phone and one Android Tablet.
Phone Profile is always connected to the Android Phone, but the A2DP audio changes depending on which device you want to listen to music from.
Normally, if you want to listen to audio from the Tablet when your headset's A2DP profile is connected to the phone, you'd have to first go to the settings menu of the phone, and disconnect the A2DP, leaving Phone Profile connected. Then go to the settings menu on your tablet and connect the A2DP only.
Then you'd have to do the opposite if you want to listen to audio from the Phone again.
Takes a long time.
With Bluetooth Pair, you can specifically connect or disconnect to a specific device and specific profile (phone / a2dp) by widgets.
So you won't have to turn off the bluetooth completely on one device just to allow your headset to connect another device. Nor do you need to go into settings anymore.
1.) Just tap on the A2DP device specific widget on the phone to disconnect, the A2DP Profile from the phone
2.) go to the Tablet, and tap on the A2DP device specific widget to connect the A2DP profile of the headset to the Tablet
Two taps!
Would you mind sharing a code snippet on how you achieve this? I've been working on a little program that I intend to use around the house and this is the missing piece that I can't figure out. Basically, I have some NFC tags spread around the house and a receiver app that triggers various actions. One of them enables bluetooth on my device (if off), turns on my home audio receiver (over telnet), connects to the receiver's A2DP device (this is the missing piece), and launches a music app.
I've seen examples where this works using an AIDL method, but from what I've gathered this no longer works under Android 4.2. Does your app work on 4.2? Any hints you can provide?
Thanks!
Brian
I'm not the writer of this app.
You could try contacting them via the email listed on Google Play.
BTW, while you're making your app, please dedicate a thread to it on XDA so we can all beta test and buy it later!
klau1 said:
I'm not the writer of this app.
You could try contacting them via the email listed on Google Play.
BTW, while you're making your app, please dedicate a thread to it on XDA so we can all beta test and buy it later!
Click to expand...
Click to collapse
Oh, OK. I just assumed this was your app.
After reading the Play Store description more carefully, I don't think this app actually does what I'm trying to do (programmatically establish an A2DP connection). It appears this app enables / disables certain profiles but the actual connection is still handled by the OS.
As far as the app I'm making, I was intending it to just be something for personal use. I'm planning on keeping it very lightweight and tailored specifically to my needs. For it to be used by anyone else they would have to have the same brand of A/V receiver as me (Pioneer) that supports the same telnet commands. Most of the rest of the functionality of the app can be duplicated by using some of the existing NFC apps like NFC Task Launcher. If I ever develop it into something interesting that could be used by a wider audience I probably will post it on XDA for feedback though.