Thursday, June 21, 2007

Stereo Bluetooth Profile (A2DP) on Mac OS X Tiger with Jack Audio

The tutorial below is outdated and should not be attempted. 
If you want A2DP, upgrade to Leopard. 

Low latency Stereo Bluetooth Audio is now possible on tiger thanks to Tim Hewett's a2dpcast which uses Jack for recording from the system mixer or indeed any specific coreaudio application.

To use the new system:
  1. Download Jack for Mac OS X from here.
    Make sure to read the documentation on how to install properly on Intel Macs, especially making an Aggreagate Device with "Audio Midi Setup". For the exact proceedure watch the screencast at the bottom of this post.
  2. Download a2dpcast from Tim's website, here.
  3. Extract and copy to /usr/local/bin
  4. From a terminal run
    a2dpcast ADDR
As it's based on the bluetooth code in the previous instructions, please continue to post compatiblity experiences, here.

N.B. The old instructions posted on this blog are now obsolete!

Update: Improved compatibility with new version from Tim with special thanks to Paul Guyot.

203 comments:

1 – 200 of 203   Newer›   Newest»
Istvan said...

Thanks, works great on my Jabra BT8010. It was a bit tought to figure everything out though, especially since I have an Intel Mac, and tried to do it without understanding the documentation first...

periferral said...

can someone provide some more details on getting this working with intel macs and bluetooth headsets.
I read the Jack documentation, but the aggregate midi setup part is lacking in details. When I select an aggregate setup, what do i have to choose there. I select jabra in and out and started the server but that didnt seem to help.

Also how does ad2pcast tie in with this?

Zach said...

I'm getting a little hung up on the Intel details for Jack as well.

The documentation doesn't have any descriptions of what to do, just a few pictures.

David, could you post a little more detail on how to do this?

David Connolly said...

Hi Guys, I've posted a screencast of how to configure the aggregate audio device, hope it helps.

Anonymous said...

I must be retarded i can not get this to work i have the motorola s9 (ROKR) headset please help i have bluetooth phone, ipod and i jsut want seemless with my computer so i cant get rid of some headphones :D THANKS

David Connolly said...

Hi, the Motorola S9 is on the not working list...

Anonymous said...

:( ok well thanks for letting me know that now i can stop going insane hahaha
i guess ill just use it with the Q and the ipod when i get it

Anonymous said...

what does it mean to "extract and copy to usr/local/bin?"

Anonymous said...

I can't seem to make this work with my HT820 headphones and my MacBook Pro. What am I missing? How do I pair the computer and my headphones?

Anonymous said...

does anyone know WHY the moto S9's don't work? I just got a pair, they're on their way in the mail, and I REALLY want to use them with my MacBook. any help?

Tim Hewett said...

Re: "what does it mean to "extract and copy to usr/local/bin?" - just use the Unix cp command, e.g. "cp a2dpcast /usr/local/bin"

Re: "How do I pair the computer and my headphones?" - you pair them in the same way as any other Bluetooth device, checkout System Preferences Bluetooth pane...

Re: "does anyone know WHY the moto S9's don't work?" - posting up logs output by a2dpcast may shed some light on any problem.

Arius said...

te the logs for a2dpcast from the rest of the jabber that i found in the console.app. I just saw that the moto S9 were on the "don't work list" and wanted to know why they don't function properly.

Anonymous said...

I just saw that the moto S9's were on te "don't work" list and i wondered why they don't work, nostly because I have a pair. also, I can't seperate what came from a2dp fromt he rest of the jabber in console.app.

Anonymous said...

I just saw the the moto s9's were on the don't work list, and I want to know why they don't work, i/e what happens when you try. i can't sepperate out what a2dp generates from the rest of the stuff in console.app

Levarnu said...

Thanks for the great instructions. I am trying it with a GSH300 and almost thought I had it. After starting a2dpcast I get the sounds from the Mac's internal microphone through my headset but nothing else. So close but I must be doing something wrong unless this headset simply should be put on the "does not work" list.

David Connolly said...

Hi Levarnu, glad you got it partially working, try to use the Jack Router application to connect for example iTunes:out1 to a2dpcast:in1 and iTunes:out2 to a2dpcast:in2.

Actually its a step I've been doing myself oftentimes, I must add it to the post!

sobhan said...

hi im trying to use your instructions on a powerbook g4... i already installed the jackosX and extracted the a2dpcast files into a directory in my desktop .. but i cant copy all the directory files into /usr/local/bin i already tryed from terminal and i cant.. im not good in unix commands also.. please if possible send me the commando to copy the directory a2dpcast in to /bin .. i want to use your solution with the sony microsystem CMT U1BT.. i bought it without knowing that tiger doenst have A2DP profile in his bluetooth... i bought it far away from my home(brazil) .. and i cant return it!
THANKS

sobhan said...

sobhan-dalirys-powerbook-g4-12:~/desktop/a2dpcast sobhandaliry$ cp a2dpcast /usr/local/bin
cp: /usr/local/bin/a2dpcast: Permission denied


everytime i try to copy.. i see this message..HELP

Anonymous said...

Tim Hewett said, "just use the Unix cp command, e.g. "cp a2dpcast /usr/local/bin>" What are you talking about?

I'm running MasOS 10.4.10. The a2dpcast folder is on my desktop. If I open in and double click on a2dpcast the terminal program opens and runs. I get this message:"setting thread 0x1d13 to precedence policy
sample rate is 48000, channels is 2
Failed to open connection
connectBTdevice : ng"
Then I get and endless string of "sendbuf : ng"

What do I need to do to make this work?

sobhan said...

I am logged as admin in darwin and i dont have enough privileges to copy anything to /bin..
sobhan-dalirys-powerbook-g4-12:/bin sobhandaliry$ cp /a2dpcast /bin
cp: /bin/a2dpcast: Permission denied

HELP!

Levarnu said...

Thanks David, actually figured that part out shortly after I made my comment. It was just too late for me to voice success. I didn't test the mic functioning but otherwise the GSH 300 - badged by Kyocera as something but I can't remember at the moment (about $30 from their site) seems to work well. I'll try it some more. Thanks again.

Zac said...

I'm also getting permission denied when logged on as administrator. I'm trying to cp -r /(location of file) /usr/local/bin.

Tim Hewett said...

Re: Tim Hewett said, "just use the Unix cp command, e.g. "cp a2dpcast /usr/local/bin>" What are you talking about?

The original question was "what does it mean to "extract and copy to usr/local/bin?"", and this is the answer to that question. If you're not familiar with using Terminal commands then (for now) A2DP on OS 10.4 may not be for you - certain assumptions have been made that people trying out new things which require using Terminal have a certain level of understanding of how to use Terminal, and that those who don't know how to do that will not try. How to use Terminal is a big subject and it is impossible explain everything...

However here's the simplest way to have a chance of getting a2dpcast on the road - this doesn't replace all the other instructions, e.g. for installing Jack, it only explains how to run a2dpcast for Terminal newbies.

1. extract the zip file into your Desktop folder by downloading it in Safari (Safari may extract it for you, though it may do it in a different directory depending on how you have set its preferences). If Safari doesn't extract it, double-click on the zip file using Finder.

2. open Terminal from /Applications/Utilities.

3. in Terminal type "Desktop/a2dpcast/a2dpcast 11-22-33-44-55-66", replacing 11-22-33-44-55-66 with your headset's Bluetooth address as listed in the device list in the System Preferences Bluetooth pane.

You don't have to copy a2dpcast to /usr/local/bin, that is just a good (and conventional) place to keep it for the long term. If the cp command generates a "permission denied" error then do "sudo cp a2dpcast /usr/local/bin" instead, entering your admin password when asked.

Zac said...

Thank you very much for the newbie instructions. I've had a mac for about a week.
I was wondering about this error when I run the a2dpcast 00-17-... command

frm_len = 2
6000 bytes/sec, hdr.sampling_frequency is 0
Transmitting A2DP, press RETURN to stop.
Bus error

The headset is still faint and poor quality.
TIA

Zac said...

This is the total message

(location)/a2dpcast/a2dpcast 00-...
setting thread 0x1d0f to precedence policy
sample rate is 8000, channels is 2
discover : received
SEID = 1
Sent set configurations command
set_config : accepted
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 2
6000 bytes/sec, hdr.sampling_frequency is 0
Transmitting A2DP, press RETURN to stop.
Bus error

Tim Hewett said...

Re: 6000 bytes/sec, hdr.sampling_frequency is 0
Transmitting A2DP, press RETURN to stop.
Bus error

This (and the previous log line saying "sample rate is 8000, channels is 2") suggests that your selected audio input is the headset. This operates at a sample rate of 8000Hz which is not supported by A2DP. Check out your audio input selection in System Preferences.

Zac said...

when setting up the aggrigate in the audio midi setup what devices am I to select? It seems like all is working, but the signal is sent to the speakers instead of the headset. It is an HT820.

Jonathan said...

Thank you so much I bought my 15 inch macbook pro (intel core2 duo) with hopes of finding a flawless laptop with intel inside plus flawless other hardware and a rock solid OS---come to find out no a2dp---and hardly any of the good bluetooth services...so I started wondering why not since it's EDR and great bluetooth...after 6 months of owning my MBP I finally found this site and I'm glad you guys thought to figure this crap out and get it in an easy to install package. I almost crapped my pants when I heard crystal clear bluetooth stereo from my MBP to my Jabra bt620s headphones. Any idea on avrcp to use with itunes?? just a thought anyway guys thank you so much and way to go with the workaround it was music to my ears (literally)!!!

Tim Hewett said...

Re: Any idea on avrcp to use with itunes??

It needs someone to get to grips with iTunes plugins and to write a Bluetooth AVRCP server. This already exists for Linux and I've had my Jabra receiving audio from Linux's XMMS music player as well as controlling it for play/pause and next/previous track. It is cool. So the Linux source code (which is in the a2dpd code in the plugz tree of the bluetooth-alsa project at sf.net) would be a useful start for a port to the Mac.

For now Apple ought to drop their claim of OS X being the world's most most advanced operating system since in the area of Bluetooth services is certainly isn't! However I do admit that my experience of getting Bluetooth working on Linux was not a trivial one...

Matthew said...

Zac... I am having the SAME problem....

I cna getGreat sound out of ym headset and speakers BUT only at the same time.... what am i doing wrong??

Ken said...

Tim,

thanks for the details on running a2dpcast from my desktop. I'd done a little research and figured a few things out about working in Darwin and your instructions were easy to follow.

All that said, I still get the "Failed to open connection
connectBTdevice : ng" message... no joy.

I'm certain I followed David's instructions for JackOSX and yours for a2dpcast quite accurately... though I am not clear exactly what order each program should be launched... I tried a couple of different oders... no go.

If you have some insight I'll try again. If not, I'll just have to wait for Leopard.

Thanks.

paobeleeso said...

WOW! Thanks David, thanks Tim. You've managed to make a 800mHz G4 iBook A2DP compatible - even using a D-Link dongle! Regarding compatibility, I'm using the HT820s - they work fine now (no more static!).
I still get occasional drop outs, and the quality of the audio probably isn't quite as good as a dedicated A2DP bluetooth device such as a BT stereo mobile phone, but it is super for such old hardware! I had originally tried out Tim's A2DPcast using Soundflower, and it worked, except that there were frequent drop outs. Switching to JackOSX has greatly improved that - it is actually useable, whereas with Soundflower it wasn't good enough.
I must say that I can understand the people posting who can't work out how to set this up - it took me quite a while and a lot of trial and error to understand how JackOSX works. For example, for a long time after finally working out how to stream iTunes to my headphones I was streaming noise from my built-in mic along with the music. Then I realised that I could turn it off using the 'Connections Manager' ...
In an effort to make things a bit clearer regarding Jack, here are the things that you need to do (though there are extra steps for Intel, see above):

- open Jackpilot.app (in the Jack folder in Applications after installation of JackOSX), then click 'Start'
- open System Preferences, and check that 'Jack Router' is selected as the input (and it probably best as output too). This step may not be necessary as it should be automatic, but it's good to check (otherwise you might start streaming your built-in mic).
- start A2DPcast by using terminal to launch it (eg. /usr/local/bin/a2dpcast YO-UR-HE-AD-SE-T)
- launch iTunes (or any other app you want to stream audio from)
- Click on 'routing' in the JackPilot window in order to open the 'Connections Manager'. In this 'Connections Manager' window, once you see iTunes (or your chosen app), click on iTunes so that it is highlighted, then double-click on A2DPcast (it will change colour to red). If you can't see iTunes, try playing some music and it should then appear.


I think that's it - you should hear music in your BT headphones. If so, you can quit the Connection Manager and JackPilot and the music will keep streaming. I hope this helps. Thanks again guys ...

Tim Hewett said...

Ken,

Re: "connectBTdevice : ng" message... no joy"

This suggests that either the device isn't paired or can't be contacted e.g. because it is out of range. Try seeing if it is listed as an audio device in System Preferences, and see if you can get telephony quality out of it by selecting it there. That will help to prove whether it can be reached.

Tim Hewett said...

UPDATED VERSION of a2dpcast

I've put a new zip at http://www.coolatoola.com/a2dpcast.zip. Only a small change but with larger benefits...

You can now add an (optional) extra parameter to a2dpcast, after the device address. This is a number specifying the audio encoding/compression quality, similar to the bitrate you can choose when encoding music to mp3.

If the parameter is omitted then a default value of 32 is used, this is the value used in the previous a2dpcast zip which seems to provide very satisfactory audio quality.

This parameter has been added because I've found that if you reduce the encoding quality, the device reception becomes usefully more tolerant of interference, seems to have an increased range, and seems to recover better if reception cuts out.

I now run habitually with a value of 27, this seems to keep the audio quality reasonably transparent yet cutting to zero all reception dropouts at 5 meters from the Mac, something which used to be a real problem even with the headset right on top of the Mac.

Your mileage may vary...

New command format:

a2dpcast 11-22-33-44-55-66 [option number]

The source code has also been corrected so that it can be built on any Mac, and a Readme file has been added to help newbies.

Anonymous said...

Got a Motorola S9 to work just fine with the newest version of the a2dpcast.

I think it would help to walk through how to use the Jack router to assign iTunes out to a2dpcast in with detailed instructions. For the most part, just start the Jack server, start a2dpcast and iTunes. Then open up the router in Jack and start clicking on the a2dpcast in the receive ports. Trial and error is the best I know then magically it works. Sometimes mono, click more and then you get stereo.

Tim Hewett said...

Re: how to use Jack, check out the documentation that comes with it which is located in /Applications/Jack/Documentation.pdf. It described how to use the router window comprehensively.

Arius said...

I made an applescript program to open jackpilot and a2dpcast, and open a connection to my headphones. I uploaded it here. http://www.megaupload.com/?d=GPYQQ15L.
all you have to do is open it with ScriptEditor, and change the address of the phones. then save, and enjoy!

Anonymous said...

I got a great stereo connection on my S9's but it would only loop what was coming into the internal mic on my MB. I know this is where the routing comes in in Jack but I lost the connection and can't get the stereo back now...

JP - Got the S9 to work. said...

Just got it working on my new Moto S9's no problems. Sounds great minus just alittle hiss which I can EQ out or mess with the transmission numbers later. It does play out the MB speakers also however I just muted them.

Heres how it goes...

1. Pair your headset with your Mac.
2. Install all the required software.
3.Follow the video instructions for the Aggregate Midi.
4.Run JackPilot and click start.
5.Go to Sys. Prefs. and make sure JackPilot is selected for Audio In and Out both.
6.While you're in Sys. Prefs. go to Bluetooth and copy the Mac address of your headset.
7.Run Terminal and type "desktop/a2dpcast/a2dpcast/00-0d-fd-16-a0-61 "with your address of course. Some text will pop up and you may eventually hear a slight hiss in stereo, you know the headset is connected and it Terminal will say an A2DP connection is open.
8.Open iTunes or whatever you're listening to.
9.Before hitting play go back to JackPilot and click on routing. Under Send Ports click iTunes, then under Receive ports double-click a2dpcast.
10.Go back to iTunes and hit play, it should work beautifully.

Good luck, hope this helps you out!

Mike said...

the above directions also worked perfectly with a Sony shelf stereo unit: Sony CMT-BX5BT, a bluetooth enabled stereo. So, awesome! Thanks everyone.

Just a quick additional note on the above - under #7 where it reads
"7.Run Terminal and type "desktop/a2dpcast/a2dpcast/00-0d-fd-16-a0-61 "with your address of course" it should read:
"desktop/a2dpcast/a2dpcast 00-0d-fd-16-a0-61" with a space rather than a backslash.

Thanks again. Made my day, sadly.

SunnyCanuck said...

this worked great for my Plantronics 260, but I can't get the audio in to come from the bluetooth headset... any comments on how to set this up?

Anonymous said...

Thanks guys i got it working now.!!!!!


Plantronics 590 headset sounds killer!

mood said...

Got A2DP to work for my PowerBook G4 with iSkin Cerulean F1 headset, was having a bad time with dropout till its resolved by the new a2dpcast script.

Thanks guys.

Jared M. Ritter said...

Having some trouble trying to get my Jabra 620s to work. It worked for a split second but now will not. It seems the a2dpcast is working as I can hear what the mic is picking up, and the aforementioned "hiss". What is worthy to note is that I no longer see a2dpcast as a "receive" port in the JackPilot routing window. I have a feeling I have either done something wrong in setting up the aggregate device, or I've messed something up in the Jack settings. Either way, I'm stumped.

Here's what I did:

In "Audio MIDI Setup"
I clicked on Audio in the menu bar
I then selected "Open Aggregate Device Editor""
This brings me to a window where I add an Aggregate Device
I clicked the "+" button
I clicked on the "use" checkboxes by Built-In Output and Built-In Input. The "clock" orb is selected by Built-In Output

I changed nothing else as per the video

I then selected the JackPilot application which has been waiting in the background, and select "JackPilot" then "Preferences" from the menu bar
I chose "Aggregate" from the "Interface" drop-down and then clicked "Save".

Next, I clicked "Start" on the JackPilot window

Then, I open a terminal window, cd to the Desktop/a2dpcast directory and run:
sudo ./a2dpcast 00-13-17-71-ce-34

I see the following messages:
setting thread 0x2203 to precedence policy
sample rate is 44100, channels is 2
2007-07-04 16:20:09.369 a2dpcast[425] *** _NSAutoreleaseNoPool(): Object 0x321980 of class NSIdEnumerator autoreleased with no pool in place - just leaking
2007-07-04 16:20:09.369 a2dpcast[425] *** _NSAutoreleaseNoPool(): Object 0x327890 of class IOBluetoothNotification autoreleased with no pool in place - just leaking
2007-07-04 16:20:09.369 a2dpcast[425] *** _NSAutoreleaseNoPool(): Object 0x32b980 of class NSCFArray autoreleased with no pool in place - just leaking
discover : received
SEID = 6
Sent set configurations command
set_config : rejected (serv_cat : 2, error_code: 0)
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 69
50301 bytes/sec, hdr.sampling_frequency is 2
Transmitting A2DP, press RETURN to stop.


Now I hear the "hiss" and I can hear microphone noises.

Quick check of System Preferences for Sound shows that "Jack Router" is selected as output and input.

I click on the "Routing" button in JackPilot and all I see is "Aggregate Device" in the "Send Ports" column and the associated "Receive Ports" column. no a2dpcast anywhere.

Anyone have any ideas?

Thanks in advance!

David Connolly said...

Hi,
There is no need to run it as sudo, it doesn't show up in Jack Pilot when running as root.

Before you can run it normally run:
sudo rm /tmp/1.pcm

then try it without sudo.

Best of luck!

Jared M. Ritter said...

That worked! I had used sudo to avoid some errors that I got when I used the a2dpcast that I had placed in /usr/local/bin. I guess it created that file in /tmp that you mentioned (/tmp/1.pcm), and thereafter I had to use sudo to spawn the command.

Seems to work great, albeit with some gaps. I had gaps when using Leopard's built-in A2DP support, so I guess it either is something wrong with my headset, or something janky with the Mac's bluetooth hardware...

At any rate, great job and thanks for the help!!!

-Jared

David Connolly said...

did you try tim's new feature? trace up for the comment about the [option number], it works really well (sorry its not in entry, yet, in new job so a bit busy!).

merc said...

so close...

any ideas on what my error might be terminal shows-
"mercbookpro:~ meme$ Desktop/a2dpcast\ 2/a2dpcast 00-03-89-fa-71-7a
setting thread 0x1d0f to precedence policy
sample rate is 44100, channels is 2
open L2CAP Channel: ng
connectBTdevice : ng

THANKS FOR HACKING OSX TO A2DP

merc said...

OK, I got Stereo!

I had trouble with the terminal command due to dongle I had left on -transmitting bluetooth audio from other device...

Now that I am listening to hifi stereo bluetooth, I can't close terminal without losing th A2DP?! Could this be true??

It sounds good! Is it really the only way to use a2dpcase by opening & keeping the terminal running?

THANKS FOR HACKING OSX TO A2DP

periferral said...

this is odd but I actually have this working out natively somehow. I have a jabra bt620s and it just seems to work. Power it on, pair it is 10.4 and play itunes and its on.

i dont know how but it does. Any clues?

David Connolly said...

tiger supports mono bluetooth headsets just fine, including the microphone. However its only voice quality!

karupss said...

Hi David and tks for your commitment in trying to solve this scandal.

After months of research I had finally found what I was looking for. I have bought the brand new high end Sony DR-BT50. Impressive sound quality, beautiful design.

I am also a Mac enthusiastic, not because of Apple but because of their products. They are very good. So enthusiastic that I haven't even thought to check if they were compatible. Disaster.

After following the complex setup with Jack and the rest. I managed to get cd sound quality oh the headset, but cannot leave the mac that the signal drops and sometimes picks up again.

I was not able to adjust the bitrate down to your suggested value (32 or 27) because this makes the whole thing not work again.

Any insight?

mattdahoov said...

The Motorola S9 seems to work fine. I am listening to Aerosmith as I type this.

David M. said...

Hi Everyone,

Awesome post. I'm a total Mac newb and don't want to annoy anyone with this question, but I'll go ahead anyway because I'm desperate to make this thing work.

I got a Jensen WBT310 BT Receiver. It pairs with no passkey, detected as a "headset". The WBT310 shows up in my sys pref>input and also output as a device with "no output controls".

Do I need this hack or what? When I set up the aggregate device the WBT310 also shows below the in/outputs.

I've tried all the methods described thusfar in this post. The last thing is that I am getting this error message:

"setting thread 0x1d0f to precedence policy
sample rate is 8000, channels is 2
Failed to open connection
connectBTdevice : ng"

Any thoughts? TIA

Albert said...

Hi David and guys, Well done!

Just joined the club where i bought this Jabra BT320 and now only to find out that Tiger doesn't support a2dp :(

Anyway, tried to install the Jackos, aggregate, run a2dp, only hiss comes out.

Further investigation reveals that the running of a2dp addr.. resulted:

--concat--
Sent set configurations command
set_config : rejected (serv_cat : 2, error_code: 0)
--concat--

Where the guys that has success shows:

set config : accepted

Can anyone help to point where did I missed?

BTW, still cannot find device called Jack Router in the syst pref-audio. Only can find aggregated audio ...is this normal? or jackos installation problem?

Waiting for enlightenment...

Albert said...

In addition, when I played iTunes, Quicktime or anything with sound, these applications does not shown in Jack routing windows..something's not right but since am newbie in mac, cant do much to trace it..

seems that been sometime that this topics has no updates...

David Connolly said...

First response is for David M:
Make sure you have selected correct input and output audio device. Both should be the aggregate created with these instructions. It is not correct to select the bluetooth headset in System Preferences -> Sound, as previously mentioned by Tim (search for 8000 in comments).

Second is for Albert:
Have you started iTunes after starting Jack it is the only way to make them show up in JackPilot?

Third:
I'm going to be between Mac's until the end of July...

Albert said...

Hi David :) thanks for the reply and yup, did run iTunes or others after Jack started, but still... maybe it got something to do with 10.4.10 upgrade that i've done?

still curious with the case of
set_config : rejected (serv_cat : 2, error_code: 0)
...seems this also similar with Jared showed in his post. maybe this problem was a chain effect of my Jack problem?

uugh, hate hijacking my 6 yr old son's PC just to hear using my jabra headset.

David Connolly said...

Hi Albert, could you post details of all preferences from JackPilot? (Screenshot would be quickest!)

Tim Hewett said...

Albert,

Re: "set_config : rejected", this appears to be normal for some headsets, my Jabra BT320s unit does it every time but still works fine, similarly for other headsets. It is probably a red herring.

Since you and I have exactly the same device, something else must be wrong but I'm not sure what. Make sure you start Jack running before starting anything else, including System Preferences.

Albert said...

Hi David, here they are,

1. Created Aggregated Device Screen 1
2. Setup Jack Configuration Screen 2
3. Start Jack Router, Setup Sound in SysPref Screen 3
4. Open Jack's connection Window, Launch iTunes and play Music..voila! nothing in Jack's Connection Window Screen 4

I've also tried the older version of Jack, the 0.72 because 0.74 keeps giving me error popup everytime i close the syspref, itunes or anything that related to sound.

Tim, thanks! that's very comforting, now i can be sure that this solution is work with our headset, and the problem is only on my setup.

Mike said...

Hey guys, I've got it working great with the HT820, but it's playing out of my MB's speakers too. Any way to fix this? Or is there a way to mute the speakers without using system prefs? thanks

hermes369 said...

Just got the Moto HT820. Followed the instructions; had to try a few times to get it just right (i.e. rtfm). It sounds great!
While I'm looking forward to Leopard, I must say you should enjoy at the very least an official and free iPhone from the mothership. Thanks for taking this on!

P.S. Apparently, Mike posted his comment minutes before I completed mine. I am experiencing the same behavior. Weird. I'm also on a 15" MBP. Synchronicity!

David Connolly said...

Hi Albert,
All of those screenshots look correct.

Perhaps tick the verbose logging options in preferences and post any Jack or Audio related messages from Utilities/Console, it might yield something interesting...

David Connolly said...

Hi Mike & Hermes,
Using the JackPilot application's "Connection Manager" by clicking on the entries you can break the connection from output (iTunes) to input (e.g. your speakers) but leave the connection to a2dpcast (e.g. your bt headset). Best of luck!

Albert said...

Thanks for the help, clicking the verbose logging really helps! after looking at it, it turns out that Jack.Router plugin is conflicting with iWOW.plugin, duh! after i removed iWOW's plugin, everything works nearly to come as expected (not yet).

iTunes and a2dpcast shown in Jack, but then the CPU hitting 99%-100%. I've tried to do it step by step, turns out that the cpu is going up after executing the a2dpcast..

the screenshot is here

At least now is moving, sometimes sounds come out, but very stutter, but you can guess from the quality is good and stereo.

Albert said...

yup, confirmed that the cpu hitting 99-100% everytime executing a2dpcast..

does anyone experience this?

Miles said...

Albert, dumb question, but did you turn logging back off? Could definetly account for resource issues.

Miles said...

Has anyone had any success making this work with car audio headunit? I'm assuming that this should work exactly the same as head phone setup, but you never know.

My airstream trailer has a car head unit and I'd love to be able to play sound for movies, etc.. without hooking up wires.

Garland said...

I got it working the first time. I have a BT620s and macbook pro intel duo with tiger 10.4.10 . Then i ran the the autostartjack script and now it does not work. A2DPcast does not start now. I am getting the following:

2007-07-17 20:17:48.288 a2dpcast[355] *** _NSAutoreleaseNoPool(): Object 0x31f290 of class NSIdEnumerator autoreleased with no pool in place - just leaking
2007-07-17 20:17:48.288 a2dpcast[355] *** _NSAutoreleaseNoPool(): Object 0x326b10 of class IOBluetoothNotification autoreleased with no pool in place - just leaking
2007-07-17 20:17:48.288 a2dpcast[355] *** _NSAutoreleaseNoPool(): Object 0x327180 of class NSCFArray autoreleased with no pool in place - just leaking
discover : received
SEID = 52
not codec param
SEID = 6
Sent set configurations command
set_config : rejected (serv_cat : 2, error_code: 0)
OPEN : rejected
SEID = 1
not codec param
Can't open stream port

Istvan said...

Tim's new quality setting is great, previously I had to be very careful how to position myself in relation to my mac, because the connection had a tendency to interrupt if the distance was more than 2-3 meters, which was a bit annoying. Thank you! :)

Albert said...

Hi Miles,
yup, the logging turned off already :-)

cheers,

Tim Hewett said...

With special thanks to Paul Guyot, a patched release of a2dpcast is now available. This fixes problems Paul experienced using the previous a2dpcast with his Princeton PTM-BHP4 headphones, and may help others also having compatibility issues.

Please say if the new release introduces compatibility problems.

The new zip is here:

http://www.coolatoola.com/a2dpcast-0.2.zip

sbanboy said...

Hey thanks David just got it to work with my Jabra 320s and Macbook

Thorsten said...

Hey David, hey Tim,

many thanks for bringing a2dp to the Mac!

I am finally getting it to work in the following setting:
MacBook Pro, 2 GHz IntelCore Duo
MacOX 10.4.10
Jabra BT620s

So far I was able access sound output from QuickTime, iTunes and even from a Dashboard widget called BBC Radio 3.1.

However if I am not exactly in front of my computer, the BT connections breaks away and seldom reconnects, which isn't very useful, is it?

I've fiddled with the extra parameter, set it to 2 (rather expectedly bad quality), 8 (not too bad for spoken word), 20 (good quality, breaking away almost as fast as with the default 32)...sigh

So, what is left to do to really increase stability?

Any hint is greatly appreciated!
Greetings, Thorsten.

Tim Hewett said...

Thorsten,

It may be that you have a noisy wireless environment (Bluetooth frequencies are shared with WiFi as well as other non-computer devices such as video senders), I suggest taking your MacBook and BT620s to a remote location (e.g. a large park away from buildings) to see how well they perform together in clear space without other sources of interference.

It seems to be the nature of A2DP to not be very robust with interference. As far as I can see the only way to be able to truly roam more than a few feet from your Mac while keeping uninterrupted audio is by buying Class 1 (100m) Bluetooth headphones and adding a class 1 USB Bluetooth adaptor to your Mac. To my knowledge Macs have only class 2 (10m) Bluetooth built in, and almost all headsets are only class 2 as well.

It may also help if the headphones are Bluetooth 2.0+EDR devices (I've not come across any), most seem to only be 1.2 or less and my understanding is that Bluetooth 2.0+EDR is more resistant to interference.

My Jabra BT320s are class 2 Bluetooth 1.2. I've tried them with a Linux/Windows PC with a class 1 Bluetooth 2.0+EDR USB adaptor and the same issues exist with both Linux and Windows, so at least a2dpcast is doing as well as A2DP on Windows and Linux.

One idea worth trying is to get a USB Bluetooth adaptor, put it on a long e.g. 5m USB extender lead, and place it somewhere high up in the room. Some USB adaptors provide support for MacOS though beware the Belkin ones as they only work on PPC. I find that MacOS will use a USB adaptor in preference to any built-in device, but you will have to re-pair all your paired devices when you start/stop using the USB adaptor.

Alexey said...

Tim, please , let me know if I have a chance to listen music througth my nokia BH 900 ( mono )???
Not sterio?
Is it possible to fix a problem in my situation?
sincerely,
Alex from russia

Tim Hewett said...

Alexey,

The Nokias don't support A2DP, only hands free profile audio. You should find that they appear as a device in the System Preferences Sound panel, but they will not work with a2dpcast.

Mike said...

Albert. I have the same problem with the cpu load reaching 99%, or spiking often. How do you turn "logging off" on terminal? Did that help your problem? I don't know much about Terminal yet. Thanks.

Anonymous said...

I have noticed that the CPU @ 99-100% seems to occur when I have Firefox open with multiple tabs. Watching the Activity monitor shows it running high. When it jumps, JackPilot jumps.

Albert said...

Mike, i turned off the detailed logging in JackOS - not in the terminal. Its via JackOS preference window.

But still, cpu reaching up 100% that resulted a clear crisp stereo audio but stutters every second, 1 sec hear, 1 sec stop :(

sound goes smoothly without stutter, if i use parameter 2 - in which the quality is very bad..

I've already tried with a fresh boot, nothing loaded except JackOS and a2dpcast, also 100%.

Based on thorsten's post, where he successfully got it works with Jabra BT620s, there's gotta be some conflict in my setup but i don't know how to trace it....

David Connolly said...

Hi Mike and Albert,
For reference what macs are you using a2dpcast on?

Mike said...

Thanks Albert.

i'm using a macbook, about 1 year old. My cpu load only spikes occasionally now, causing the bluetooth connection to stutter, but for now apparent reason.

It seemed that it was the running of a2dpcast on terminal was causing the spikes, but that seems to have "calmed" down, though I have no idea why.

Anyway, thanks again for the help.

Albert said...

Hi David,
I'm running a2dpcast on Intel iMac, with OSX 10.4.10, 3gigs ram. Further checks: seems that a2dpcast somehow checking what plugins you have, in relation to audio/video, maybe because i have too many codec packs installed in Quicktime, i will cleanup my codecs and leave the standard ones.

Will let you know the result...

Albert said...

Unfortunately...cleaning up the quicktime components doesn't effect. Cpu still raising up.

tim Hewett said...

Re: CPU hogging, could you check to see which app is doing the hogging? In Terminal do

top -uk -s 9

which will present a list of processes which updates every 9 seconds. The one at the top of the list is the one doing the hogging.

Press q to quit...

Albert said...
This comment has been removed by the author.
Albert said...

Hi Tim, thanks, very much appreciated your suggestion.

The result was somehow strange, though the load in Jack's window say 100%, but 'top' doesn't show similarities.

From the 'top', cpu is only used 15-25%, a2dpcast only takes 2-3% sometimes. other than that, usually AntiVirus (Virex) takes 5%-10% occasionally..So, the cpu idle range is 75-85%...

I wonder where Jack got that 100% info from...

Tim Hewett said...

Albert,

Those figures are perfect. I don't take any notice of Jack's own CPU meter, I don't know where it gets its data from and it doesn't always tell the truth!

Albert said...

Thanks Tim, at least there's hope after reading others with the same BT headset and OSX version..Thanks for bringin' a2dpcast for us.

I'll check around my setup/add-ons, auto start apps, again, hopefully it will shed some lights.

Howie said...

Thanks for your work David and Tim.
Arius mentioned on July 1 an applescript to launch Jack Pilot, a2dpcast and connect to your headset. Has anyone had any luck with this script? Or how would you script JackPilot to connect itunes to a2dp?

Paul said...

Well, I'm an ex Windows XP user... and I purchased a Macbook Pro with the Pulsar 590 stereo headsets. Was I surprised with the HORRIBLE audio quality!

After that I investigated and found out about this A2DP issue. Oh well, "time for some ole hacking" I though. But hey... this is OS X, not Windows!

So here I am with technical difficulties... I followed all the procedures, but the 1 problem I have is that in the routing "connections manager" in JackPilot, I don't get iTunes.

Any ideas???

Thanks!

(and I couldn't find the script anymore! :( )

Paul said...

Giving more detailed information:

- Terminal script is perfect. Have the headset connected with the peculiar hissing noise.
- Video instructions followed carefully.

Only problem that I see is that, in System Preferences, under SOUND, I don't have Jack Pilot selectable, but rather "aggregated device", which is the one I select.

Paul said...

Mmm... I feel like I'm spamming here, but I forgot to say something!

All my plugins are "Perian", nothing else.

Paul said...

Woot! Now I could!!!

2 Observations:
-I couldn't do it with v.72 of Jackpilot.
-Jackpilot routing won't display the iTunes connection until you push play.

2 Questions:
-The sound is going through both the built-in speakers and my Pulsar 590... is this fixable?
-Has anyone thought a solution for symbian phones? My N80 needs this quick!

Thanks all so much.

PacoBell said...

@Paul: You have to toggle OFF the Aggregate Device inputs for the AD outputs, respectively, in JACK Router and then toggle ON the a2dpcast inputs for the respective AD outputs. If you've also configured other devices (i.e. Built-In Microphone) in your AD, you can also configure them likewise in JACK and you'll be able to listen to both stereo audio as well as anything your mic picks up (quite handy to avoid being entirely antisocial whilst listening to your fav tunes ;)

PacoBell said...

I also have a pair of P590s and it seems to work flawlessly...except when I hit the mute button. I guess it shuts down the A2DP connection temporarily, but a2dpcast doesn't reinitialize it when I unmute it. Just a rough edge that needs to be worked out eventually.

Paul said...

Excellent! It worked PERFECTLY. I'll now fiddle around with the additional parameter to test the range.

Is there a way to automate the whole process?

Hopefully someone will find a similar solution for symbian! *wink wink*

N_Tesla said...

Hi,

thanks for the solution. Everything is working fine here, just one little problem. Even though I configured the Aggregate Device and it is rerouted to a2dpcast in Jack, I can't get the system sound out through the headset. Only when I reroute single applications it works. But every other sound is still played through the built-in speakers. Any ideas?

[intel iMac 1,83 1,5GB HT820 Headset]

Fabián Arias said...

It works in my Nokia BH-501, but I have interference and heavy saturation when listening louder. I probably should play with sample rate and bitrate sent to the headset, but after listening my music like AM radio, this is a dream come true.

David Connolly said...

Hi All, Just back from an unplugged holiday in Toronto- still jet lagged so haven't read recent comments...

Jesse said...

I bought some iMuffs today but the MacBook Pro doesn't discover them. They are listed as compatible, so how did whoever listed them get his MacBook to recognize them?

Jesse said...

Nevermind - got it paired. Still trying to figure out the rest with Jack and a2dp.

Anonymous said...

For those who don't see "Jack Router" in Sound Preferences, you have to uninstall SoundFlower if you had tried using the old method.

There is an uninstall script in the SoundFlower .DMG.

nEmo said...

after an hour or so of playing with jack and trying to install a2dp cast properly and then trying to get the two to work together I finally decided to skim through the forum posts (I didn't bother with documentation, since the programs are fairly straight forward).

big thanks to paobeleeso's post since it laid everything out so nicely.

so basically jack controls all the inputs and outputs of every app using audio and a2dpcast simply adds your a2dp bluetooth device to the list of input devices. REALLY simple.

but please pleas PLEASE ALL INTEL MAC USERS PlEASE DO NoT BE FOOLED!!

forget about the aggregate devices thing, it's pointless if you just want to stream music through headphones. All you need to do is take the audio out from iTunes and connect is directly to a2dpcast, no aggregate devices needed!!!

Thanks to everyone especially tim for putting this all together.

Oh, and without further ado, you cn add the Sony CMT-HX5BT (it's a micro system with bluetooth capability) to the list is working (perfectly) devices. hopefully there is hope for the other sony bluetooth micro systems people have been asking about.

nEmo said...

oh yes, I almost forgot: would this be possible to do with AVRCP? obviously an AVRCPcast would need to be programmed, but would that even be conceivable?

my micro system supports (and recommends) AVRCP devices, simply because then you could control iTunes with the sony remote. (yes i know that apple computers have remotes anyways, but volume control is not an option with that apple remote)

anyways, just wondering if an interactive bluetooth cast could be a future possibility (even though I plan to move to leopard and no longer need it in a few months).

Ed said...

Thanks for the advice nemo.

If you don't set up an aggregate device (can anyone explain what's the purpose of setting one up?), then what should you choose as the interface under JackPilot preference?

I just want to listen to itunes through my jabra 8010 on my intel imac.

a2dpcast worked great for about an hour, then I got the 100% cpu load problem and nothing would work again.

David Connolly said...

Ed and Nemo,

The aggregate device is what Jack expects to have e.g. a sound device with 2 input and 2 output channels.

As Nemo points out you can just connect a2dpcast with iTunes or whatever output program your running, the selected interface wouldn't really matter although using "Built-in Output" would allow you to disconnect iTunes from your laptop speakers etc.

However I'm not about to recommend to people that they shouldn't bother to configure Jack properly just because Nemo couldn't figure it out despite the manual and the screencast...

nEmo said...

I also noticed something about the stability of the connection.

the first time I used the a2dp cast everything worked perfectly, but the second time I had frequent problems with the cpu jumping to 100% and the connection failing.

I think this may have something to do with the volume of the output. The lower the volume (iTunes default volume is good) the more stable the connection seems to be. This seems to be a combined problem of how jack sends the audio stream and how a2dp handles the data stream.

anyways, try turning down the volume of itunes or whatever you use and turn the volume up on your device, if that is an option. I'd like to see if that helps others of whether it's just something that works for me with my system.

Andrius said...
This comment has been removed by the author.
Ripper said...

Okay! Thanks to the step by step instructions from everyone I now have my Sony DR-BT30Q/S stereo headset and my MacBook Pro working together beautifully.

Awesome!

Thank you to everyone who posted how to do this and those who created the tools to make it work.

I did find some changes in the instructions posted by "jp". As mentioned, there is a space needed in the command line instead of a slash. Also, the latest version of the ad2pcast download comes in a folder labeled ad3pcast-0.2 requiring a change in that part of the instructions.

Here are the updated instructions for newbies and non-unix users like myself:

1. Pair your headset with your Mac.
2. Install all the required software.
3.Follow the video instructions for the Aggregate Midi exactly.
4.Run JackPilot and click start.
5.Go to Sys. Prefs. and make sure JackPilot is selected for Audio In and Out both.
6.While you're in Sys. Prefs. go to Bluetooth and copy the Mac address of your headset.
7.Run Terminal and type "desktop/a2dpcast-0.2/a2dpcast 00-13-a9-b2-76-a1"with your address of course. Some text will pop up and you may eventually hear a slight hiss in stereo, you know the headset is connected and it Terminal will say an A2DP connection is open.
8.Open iTunes or whatever you're listening to.
9.Before hitting play go back to JackPilot and click on routing. Under Send Ports click iTunes (or your audio application), then under Receive ports double-click a2dpcast.
10.Go back to iTunes and hit play, it should work beautifully.

I also found that double-clicking anything other than a2pdcast to unselect it helped. And selecting any other applications playing sound and double-clicking any other routing selections seemed to make the server run at a much lower CPU load, with resulting increase in performance.

Finally, I'm using this to play sound while I'm editing video, besides playing tunes while I work.

While using Final Cut Pro or SoundTrack, I found some interesting issues.

If I have any other BlueTooth devices connected to my laptop, the sound breaks up and stutters so bad as to be unusable. I use a BT mouse and keyboard so turning both of these off to listen to music is less than useful.

At times the speed of the music shifts radically. It usually starts speeding up with a resulting rise in pitch. Stopping the playback often cures this. I found no reason why this happens but it would be useful if it didn't.

Some apps provide a setting in Preferences for sound output. Selecting Jack usually made it work better.

Thanks, again, for all the help.

austin said...

Hey everyone--

Just wanted you to know I just got it working with a 13" MacBook (white) and a Motorola DC800 (I got worried when it was on the nonworking list...)

It cuts out every once in a while (I think the CPU load gets too high), and I've noticed the speed/pitch shift occasionally, which sucks, but overall it works.
Thank you all so much! Without the comments, I wouldn't have been able to do it (special thanks to paopeleeso for the selection of input/output-- that's what made it start working).
Nemo's comment that the lower the volume, the stabler the signal seems to be spot on.
Rock on via bluetooth, mac brethren!

Franck said...

Hi,

I was looking after this solution for ages.. Great thanks to David. Thanks a lot.

It works with my Motorola S9 quiet perfectly. I'm using soundflower instead of Jack because I couln't make it work with.

I'm on a powerbook and I did not use the aggregate audio configuration.

Bye,
Franck

Jean-Maxime C. said...

Wow! Your solution works incredibly well with my new Sony system! But I had a hard time undertanding all that stuff since I own a French Mac. So here is my French traduction of your method, hoping that it could help a few people over the world !

Méthode étape par étape pour émettre le son à partir d'un mac sur un périphérique Bluetooth (A2DP)

1.À l’aide des Préférences Bluetooth, détecter le périphérique qui sera utilisé pour recevoir la musique et configurer le “PIN Number” pour activer la connexion.

2.Installer Jack (http://www.jackosx.com/).

3.Télécharger et extraire “a2dpcast” (http://www.coolatoola.com/a2dpcast.zip) sur le Bureau. Copier le dossier extrait dans les Applications.

4.Dans les “ Configuration audio et MIDI”, aller dans le menu “Audio” puis cliquer sur “Ouvrir l’éditeur de périphérique agrégé”.

5.Cliquer sur le petit bouton “+” et cocher “Sortie intégrée” et “Entrée intégrée”. La “Sortie intégrée” doit être sélectionnée dans la colonne “Horl.”

6.Ouvrir JackPilot. Dans les préférences de JackPilot, choisir le “Périphérique agrégé” comme “Interface”. Cocher “Entrée par défaut”, “Sortie système par défaut” et “Sortie système par défaut”. Cliquer sur “Save”. Cliquer sur “Lancer”.

7.Dans les préférences système, s’assurer que “Jack Router” est sélectionné comme périphérique d’entrée et de sortie par défaut.

8.Exécuter “a2dpcast” avec le terminal. IMPORTANT: ne pas exécuter “a2dpcast” en mode SUDO.

Dans le terminal :
/Applications/a2dpcast/a2dpcast 00-1a-80-15-18-98 30
(où 00-1a-80-15-18-98 est remplaçé par l’adresse MAC du périphérique Bluetooth et où le 30 est le paramètre d’encodage laissé comme tel).

9.Exécuter l’application utilisée pour lire la musique. Avant de lancer une chanson, aller dans JackPilot, puis cliquer sur “Router”. Ensuite, lier ITunes dans la colonne de gauche (si c’est le logiciel utilisé) à “a2dpcast” dans la colonne de droite.

10.Lancer la chanson et apprécier.

En espérant vous aidez un peu !
Hopping to help you a little bit !

Andrius said...
This comment has been removed by the author.
Antoine said...

How great, it works perfectly with my Motorola S9 and my iMac Intel... The new a2dp made the whole difference;

Warm and kind regards,

Antoine, Paris, France

Z said...

I got it to work, but the audio keeps breaking up, and the pitch keeps changing. I assume this has something to do with the CPU load reaching 100%?

How can I remedy this? Thanks in advance.

(Also, does anyone know if the A2DP support in Leopard will fix this, or if I will still experience the same issues because the problem is elsewhere?)

Tim Hewett said...

Z,

The breakup and pitch issue is symptomatic either of excessive interference in the Bluetooth frequency band (which is shared with Wifi), or using the headphones too far from the Mac. I added an extra parameter to a2dpcast which allows you to control the encoding rate in a similar way to choosing an encoding bitrate for mp3 in iTunes (i.e. the lower the figure, the worse the quality) and this can have a dramatic effect on reception reliability.

The default encoding rate is 32 but this can suffer from breakup and pitch issues in imperfect radio situations. I suffer from this at my location and find that using 27 keeps the audio quality ok but makes reception much more resilient unless my Wifi is being used heavily.

So try adding 27 to your a2dpcast command line and see if that helps, if not then try even lower figures.

Re: Leopard, it is unlikely that it will solve this problem as it seems to be a weakness in the A2DP Stereo Headset profile (Linux and Windows A2DP transmissions suffer from the same problem). I also suspect it is unlikely that Leopard will provide you with the flexibility to control the encoding bitrate in the way a2dpcast does, i.e. choosing a slight reduction in audio quality to gain better reliability, so a2dpcast may continue to be the tool for A2DP listening after the release of Leopard, at least for those in more testing Bluetooth radio environments.

Regards,

Tim.

Tim Hewett said...

New developments to a2dpcast currently working on my Mac:

I have been looking to see if there is a way to get rid of the need for Jack and to have A2DP headphones selectable as a discrete audio device in System Preferences. Jack is very flexible but it is a bit of a pain to have to keep configuring it, and it would be nice to have a more direct and familiar way to play iTunes direct to Bluetooth headphones.

Apple provide an audio device example on the developer CD as a system extension called AudioReflectorDevice - all it does is provide an audio input device and an output device and pipe any audio sent to the input direct to the output. Normally that's not very useful, but it is perfect for a2dpcast as you can have iTunes (and any other app) play to the output and have a2dpcast record from the input to then send it to the headphones.

I've now found out how to have it listed in System Preferences (it isn't by default, which is no good for us), and now a2dpcast automatically selects this device (which is listed as "Stereo Bluetooth Headset") for audio output when it starts.

Still testing but so far working perfectly. System extensions have the power to crash an entire Mac, in the light of that does anyone else want to do some testing as well?

Also working on the bench is a new extra parameter for a2dpcast which allows you to specify the input device, e.g. "Built-in Audio" or similar.

Regards,

Tim.

Matthew Gertner said...

Tim,

Thanks for a2dpcast. I had exactly the issue that some other posters have mentioned with the connection dropping frequently (every few seconds) and JackPilot displaying a high CPU load. I dropped the encoding rate to 16, assuming this is done by adding this value as a second command line parameter as your post implies. This improved the situation considerably although I still have brief connection droppages every few minutes. The sound quality seems fine to me.

Assuming the worst thing that can happen is my Mac crashes and I have to remove it, I'd be interested in testing your new version.

Tim Hewett said...

Matthew,

I've been using this for the last few days on both PPC and Intel without any crashes, so that risk seems to be low.

First you have to install the kernel extension for the audio device (replace DOWNLOAD_DIR with the path to where your browser downloads stuff to):

cd /
sudo tar xfzp DOWNLOAD_DIR/a2dpcastAudioDevice.tgz --same-owner
sudo kextload /System/Library/Extensions/AudioReflectorDriver.kext

The a2dpcastAudioDevice.tgz file can be downloaded from http://www.coolatoola.com/a2dpcastAudioDevice.tgz

After doing this you should see a new audio output device appear in System Preferences called "Stereo Bluetooth Headset".

You need to use the updated a2dpcast: http://www.coolatoola.com/a2dpcast-0.3.zip

Run a2dpcast as normal, no need to use Jack, you can see that the "Stereo Bluetooth Headset output device is automatically selected when a2dpcast is run. Also a2dpcast takes note of which output device was in use before it was run and returns the output to that device when it quits.

You can also specify an audio device for a2dpcast to record from, e.g.

a2dpcast aa-bb-cc-dd-ee-ff 27 "Built-in Input"

Tim.

Mike said...

Tim- I tried to install your kext and keep getting the error

kextload: extension /System/Library/Extensions/AudioReflectorDriver.kext is not authentic (check ownership and permissions)

I will try fiddling around with it more later.

I have an Intel Macbook with latest OS updates.

Tim Hewett said...

Mike,

It may be that a parameter ("--same-owner") was missed off in the commands I posted, as they wrapped around the lines. This may mean that the ownership and permissions of the files is incorrect and kextload has detected this as a security risk.

Try pasting this all in in one go:

sudo chown -R root /System/Library/Extensions/AudioReflectorDriver.kext
sudo chmod -R 755 /System/Library/Extensions/AudioReflectorDriver.kext

Now try the kextload again... it works fine on my iBook G4.

Tim.

Matthew Gertner said...

Tim - working perfectly for me so far as I blogged here: http://www.allpeers.com/blog/2007/09/12/making-stereo-bluetooth-headphones-work-on-mac/

Anonymous said...

Where can I download a2dpcastAudioDevice.tgz?

Anonymous said...

umm, a2dp doesn't even show up as an option in jack. wtf can someone help

Tarun said...

David, great little program. I'm using it to stream audio from my intel macbook pro to a ihifi reciever connected to my pioneer reciever. A parameter of about 30 yeilds great results allowing me to move around the apartment with my laptop while music is playing in the living room! Total cost for the zoom ihifi reciever: 50 bucks....worlds cheaper than other wireless solutions....

Andrius said...

Does anyone have a straightforward explanation for how to run these scripts in terminal? I keep trying various combinations of what Tim is saying and am having absolutely no luck. I either get errors that say "no such file or directory", or the same permissions error that Mike got.

I'm not especially terminal savvy, but I've followed the sparse directions here to the "t" and have tried numerous variations just on the off-chance the error was something simple I was missing. I feel like there must be some simple step that everyone else is already aware of that I'm missing.

Mike said...

Tim- I tried again to install your kext and keep getting the error

kextload: extension /System/Library/Extensions/AudioReflectorDriver.kext is not authentic (check ownership and permissions)

I have verified that the permissions for AudioReflectorDriver are identical to the other kexts in the directory. I'm still not sure what's up. Again, I have an Intel Macbook and latest OS updates.

Mike said...

Correction:

I was able to load the kext by using these commands.

sudo chown -R root:wheel /System/Library/Extensions/AudioReflectorDriver.kext

sudo chmod -R 755 /System/Library/Extensions/AudioReflectorDriver.kext

sudo kextload /System/Library/Extensions/AudioReflectorDriver.kext

Mike said...

Ok I've gotten audio output to work with my LG headset!

I'm not sure what you mean by choosing built in audio by adding 27 and "Built=in Audio". What do these mean? How can I use the microphone of my headset? Also I can't change the volume on my mac- I must use the headset for volume changes. This is the way it works with my phone though. Is this a headset specific thing?

This is what I did after loading the kext. I moved a2dpcast 3.0 to /usr/local/bin and

typed /usr/local/bin/a2dpcast MYADDRESS

Returned:

Found audio device "Built-in Microphone"
Found audio device "Built-in Input"
Found audio device "Stereo Bluetooth Headset"
Found audio device "LG HBS-200"

Using audio device "Stereo Bluetooth Headset"

sample rate is 44100, channels is 2
2007-09-15 17:34:11.050 a2dpcast[504] *** _NSAutoreleaseNoPool(): Object 0x3adef0 of class NSIdEnumerator autoreleased with no pool in place - just leaking
2007-09-15 17:34:11.050 a2dpcast[504] *** _NSAutoreleaseNoPool(): Object 0x3b2ee0 of class IOBluetoothNotification autoreleased with no pool in place - just leaking
2007-09-15 17:34:11.050 a2dpcast[504] *** _NSAutoreleaseNoPool(): Object 0x3b67b0 of class NSCFArray autoreleased with no pool in place - just leaking
discover : received
SEID = 1
Sent set configurations command
set_config : accepted
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 69
50301 bytes/sec, hdr.sampling_frequency is 2
Transmitting A2DP, press RETURN to stop.

Anonymous said...

i've installed everything tim said and now have "stereo bluetooth heaset" in my system prefs. when i select it, i get sound, but it is extremely choppy, and drops out more than once a second. how do i fix this? thanks so much, this is an extremely helpful thread

Tim Hewett said...

Mike,

Re: kext permissions, thanks for the feedback, it seems that group-ownership by "wheel" is important. I suggest anyone else reading this and having problems uses Mike's instructions after following my original ones for installing the kext. For anyone unfamiliar with Terminal, please follow the instructions to the letter otherwise you risk damaging or removing important files which could leave your Mac having problems, particularly if you are using sudo.

Re: "I'm not sure what you mean by choosing built in audio by adding 27 and "Built-in Audio", this just means that you can have a2dpcast take its audio from a different device to the one chosen as the default output (i.e. "Stereo Bluetooth Headset"), e.g. if you feed your TV audio into your Mac. To use your Mac's microphone type 'a2dpcast ADDR 27 "Built-in Microphone"'. The figure of 27 is just the SBC encoding rate as described previously, choose your own as suits.

Re: "How can I use the microphone of my headset?", A2DP doesn't permit this, that is only for the standard headset profile.

Re: volume control, I think all A2DP headsets control the volume locally. You should find that the GUI volume controls on iTunes, QuickTime etc. work as well.

Tim.

Tim Hewett said...

Anonymous,

Re: "I get sound, but it is extremely choppy", try unloading the kext then loading it again:

sudo kextunload /System/Library/Extensions/AudioReflectorDriver.kext
(you may need to do this twice)

sudo kextload /System/Library/Extensions/AudioReflectorDriver.kext

I had this problem in the early days (solved in the way described) but haven't had problems yet with the version that has been published.

Tim.

Anonymous said...

wow, thank u for replying so quickly. I tried what you said but I am still having trouble. Here is a log of what I did and the results... maybe I did something wrong as I'm pretty new to terminal


Last login: Sat Sep 15 17:16:11 on ttyp1
Welcome to Darwin!
bobs-computer:~ bob$ sudo kextunload /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext/
Password:
kextunload: unload kext /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext/ failed
bobs-computer:~ bob$ sudo kextunload /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext/
kextunload: unload kext /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext/ succeeded
bobs-computer:~ bob$ sudo kextload /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext
kextload: /Users/bob/Desktop/System/Library/Extensions/AudioReflectorDriver.kext loaded successfully
bobs-computer:~ bob$ /Users/bob/Desktop/a2dpcast-0.3/a2dpcast 00-13-8a-08-18-ff

Found audio device "Built-in Microphone"
Found audio device "Built-in Input"
Found audio device "Stereo Bluetooth Headset"
Found audio device "GSH300"

Using audio device "Stereo Bluetooth Headset"

sample rate is 44100, channels is 2
discover : received
SEID = 1
Sent set configurations command
set_config : accepted
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 69
50301 bytes/sec, hdr.sampling_frequency is 2
Transmitting A2DP, press RETURN to stop.

This was followed by over a hundred "sendbuf : ng" that just kept adding on.
Thank you for helping, I really appreciate it

Anonymous said...

I got it to work with a Motorola S9 using the kext driver, however there are a few issues:

1) I had to set quality down to 12 before I could get a (mostly) uninterrupted sound stream.

I'm on a MacPro which is known to have their bluetooth antennas wired incorrectly. I rewired the antenna and I believe it is working correctly but it would nice if there was some way to measure signal strength.

2) When watching iTunes video (Stargate Atlantis if you must know), the sound was noticeably behind the video

3) No microphone input - I use Skype for work for about 6 hours a day so this is pretty important

4) Hiss - my Plantronics USB stereo headset has no hiss. It would be nice to not have any hiss through bluetooth.

So does anyone have a great solution for Stereo Wireless Headset on OSX? At this point I would be fine in not using bluetooth.

Mike said...

Thanks for your help! I think I understand it now. Also I found things are less likly to cut out with a lower rate and I can't really tell the difference in quality.

Maybe you should make a web page to document all these discoveries so people aren't asking the same questions?

paobeleeso said...

Wow.
No more DarwinPorts/MacPorts, Apple Developer Tools, X11. No more Soundflower, esd, and shellscripts. No need to make sure that Jack is launched before iTunes, and that JackRouter is selected in System Prefs before lauching a2dpcast in Terminal. And no more Aggregate Devices ...
Version 0.3 is much simpler, and is working fine on my old iBook - it's great that once installed, just one terminal command launches the whole BT stereo process.
Now all you need is to provide an installer, and a GUI on/off switch (with a SBC encoding rate slider ...), and we won't need to touch terminal at all ... Thanks!
(By the way, like Mike above, I often get the three 'autoreleased with no pool in place - just leaking' messages in terminal on launching a2dpcast - I had this in previous versions too.)

Andrius said...

Tim,

I've been able to load kext and my bluetooth headset is connected, but after I run ad2pcast in Terminal I get the following return:

setting thread 0x1d0b to precedence policy
sample rate is 44100, channels is 2
discover : received
SEID = 2
SEID 2 : MPEG codec
SEID = 1
Sent set configurations command
set_config : rejected (serv_cat : 2, error_code: 0)
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 69
50301 bytes/sec, hdr.sampling_frequency is 2
Transmitting A2DP, press RETURN to stop.


It doesn't say "Found Audio Device" or anything like that, and the headset is not receiving audio. Stereo Bluetooth Headset IS selected in audio preferences.

Any thoughts?

Tim Hewett said...

Andrius,

Make sure you follow all the instructions in the original post here:

http://blog.david.connolly.name/2007/06/stereo-bluetooth-profile-a2dp-on-mac-os.html#comment-8186979506416383137

It sounds like you are using a2dpcast-0.2, you need to download the latest one.

Tim.

asae said...

Hi Tim, Hi David,

Hope you remember me, the Jabra BT620 guy with 100% CPU/Jackrouter problem. I really thank you for this new solution with kextload and a2dpcast-0.3 works with me. No more Jackrouter and 100% cpu problem. Now got a clear, smooth and crispy A2DP sound.

Don't know how to say thanks but, its really rare these days for someone to do something like you guys did. Sharing something important that you invented without asking anything in return. And you also keep providing help to others on how to install or try to solve other's problem. Although still, for some people, this kind of thing is never enough, they still demand, demand, demand, not really appreciating what been shared to them.

All the best, keep up the good work!

albert

Tim said...

Asae,

Thanks for your thanks! Perhaps it would be worth explaining that lots of people do this kind of work, you only need to look at Linux where all of the OS and most of the tools are open source and free. So I'm just one of many.

In fact the root of a2dpcast IS Linux, specifically the Plugz and SBC projects at sourceforge.net, where these have been ported to MacOS. These project are covered by the General Public License (GPL) and so if you use parts of them and re-publish you must normally also publish the modified source (all of it, including your own work). The only part not covered by the GPL is the new kext for the audio device, but that's free too in that anyone with a MacOS install DVD (hopefully everyone) has a copy of the source in the developer package, and it has only been slightly modified by me.

asae said...

Just to add, if you get a bit choppy quality sometimes, check your wireless. I have to switch to different channel cause it seems that the freq (2.4xx) conflicts with my Jabra, especially when its (the wireless) transferring data. After switched to a lower ones, and I lowered the quality in a2dpcast parameter to become 27 as recommended by Tim, quality goes very smooth.

iMac007 said...

I am new to macs and this is all very confusing.I have downloaded both programs.When i start Jack i set the following settings as suggested.but nothing.i cant find the specified folder to extract the files of the second program.ad2pcast.im lost!any help would be greatful.

iMac007 said...

I actually got to the point where itunes is in red in the window but nothing stating a2dp.now when i try to use itunes nothing comes out of my speakers on my mac.

asae said...

iMac007, no need to use Jack anymore,let me help resummarize the latest how-to. Don't include the numbers (1.,2. ..) in the command you type on terminal, its just to show the orders of the command you need in the terminal.

First, 2 files needed,

a. a2dpcastAudioDevice.tgz: http://www.coolatoola.com/a2dpcastAudioDevice.tgz

b. the updated a2dpcast: http://www.coolatoola.com/a2dpcast-0.3.zip

Then run terminal from Application/Utilities/terminal and install the kernel extension for the audio device (replace DOWNLOAD_DIR with the path to where your browser downloads stuff to) - you need your admin password to do sudo:

1. cd /
2. sudo tar xfzp DOWNLOAD_DIR/a2dpcastAudioDevice.tgz --same-owner
3. sudo kextload /System/Library/Extensions/AudioReflectorDriver.kext


Copy a2dpcast to /usr/local/bin (replace A2DPEXTRACTDIR with the path to where your extracted the downloaded a2dpcast-0.3.zip) - you need your admin password to do sudo:

1. sudo cp A2DPEXTRACTDIR/a2dpcast-0.3/a2dpcast /usr/local/bin

Run a2dpcast with your Bluetooth address

1. /usr/local/bin/a2dpcast aa-bb-cc-dd-ee-ff 27

Keep a2dpcast running, leave the terminal open, then run whatever program that you want, the sound will be streamed automatically to your headset. Again, do not close the terminal until you have enough enjoying your bluetooth headset ;)

Hope this helps.

3NAstudio said...

Genius! Works like a charm.

I'd just caution the "Terminal-ly challenged" among us that you may have to to create the /usr/local/bin directory before attempting to copy a2dpcast. Do this by issuing the command:

sudo mkdir /usr/local/bin

Anyone else want to go in a bounty to get this ported to the iPhone???

Tim Hewett said...

All indications suggest that Apple intend to keep the iPhone locked down from the point of view of 3rd party development, there's nothing on developer.apple.com providing any information on plugin interfaces or how to build for it using Xcode (it isn't an Intel or PPC processor).

I've seen chat indicating that the iPhone already has A2DP built in, which would make sense since Leopard has it (or will... soon).

whistler said...

Has anyone had any luck in getting this to work when using a wireless keyboard/mouse? I have a MacBook Pro with an apple wireless keyboard and mighty mouse and I can only get a2dpcast to work (when the peripherals are on) if I set the quality to around 10 (which makes for awful sound quality)

I just wasn't sure if this was a me issue (something wrong in my config) or just a bandwidth issue as I'm using a lot of Bluetooth devices concurrently.


As a note, if I don't have the peripherals on then a2dpcast works like a charm (with a quality of 27)

TIA

Tim Hewett said...

Whistler,

I suspect the best (but undesirable) solution is to use only Bluetooth 2 devices as that has much more bandwidth and is less prone to interference form other sources such as wifi. A2DP SBC encoding at the 27 setting generates a bit rate of about 400kbit which is a significant portion of the Bluetooth 1.x bandwidth.

I doubt much else can be done about this at present.

Tim.

czakhary said...

Thank You so much for your guys help. I installed the file a2dpcastAudioDevice.tgz and the A2DP streaming works great!!! Just a few questions. I really have no idea what the file I installed was because I am not too familiar with terminal or the MAC programming. If I wanted to delete the file what would I do? Also what exactly is the file and how does it replace the JackPoilit program?

Thanks Again!!!

Tim Hewett said...

Czakhary,

The file a2dpcastAudioDevice.tgz is a compressed tar archive, similar to a zip file. It contains a kernel extension (i.e. a device driver) which is a slightly enhanced copy of Apple's developer example called AudioReflectorDriver. It is installed in /System/Library/Extensions/AudioReflectorDriver.kext.

This extension removes the need to use JackOSX by providing an audio output device without any associated audio hardware (similar to Jack). This provides a means for a2dpcast to receive audio from any application and for it to be the default audio output selected in System Preferences.

Anonymous said...

Can do this for the IPhone too?

czakhary said...

Hello again,

I am have problems with the music dragging and cutting in and out with using the a2dpcastAudioDevice.tgz method. Does anyone know what could be causing this? I am using the Sony DR-BT50 headphones. I pretty much have my macbook on the table and I am sitting right next to it. It verys to how bad it gets. Any help would be greatly appreciated.

Anonymous said...

just did all the procedure last nite.
Working great MacBook+Motorola S9.
thanks guys.
Now just waiting for an Iphone version.

Anonymous said...

For first: Thanks for this program and information!
My Problem is the quality of sound. Now it seems to be stereo but the sound quality is bad. I`ve testet the stereo headphone (BT 2.0) ANYCOM with my mobile phone, and there the quality is great.
My terminal said this:
Desktop/a2dpcast-0.3/a2dpcast BT3071

Found audio device "Built-in Audio"
Found audio device "BT27MR"
Found audio device "BT3071"
Found audio device "Jack Router"
Found audio device "Gerät"
No such audio device 'Stereo Bluetooth Headset'. Using System Default.

Using audio device "Gerät"

sample rate is 8000, channels is 2
Failed to open connection
connectBTdevice : ng

Maybee here is the problem listet, but I can`t understand.
Thanks and regards Jenny

Tim Hewett said...

Jenny,

It looks like the "Stereo Bluetooth Headset" driver has not been installed. Make sure you follow the instructions posted above by "asae" on 23 September 2007 03:29.

henmaker said...

Hi guys, i posted a chinese installation guide for this, if you guys who need chinese or with picture guide, please refer to this post:
Chinese Guide of how to install and run A2DPcast

Thanks to David Connolly for created this script, it really help a lot for Tiger user.

Cheers,
Henry Chong

Wesley said...

Is it possible to add a bluetooth dongle to the Mac in addition to the built-in Bluetooth? I'm searching for a way to increase the BT bandwidth so I can continue using my wireless mighty mouse at the same time as running A2DP audio. I thought perhaps if I could run dual bluetooth interfaces this might work, but so far no luck -- as soon as I plug in the D-Link module, I can't use the built-in interface.

frozen ananas said...

hello,
i'm reading this blog with great interest. i have a mac mini and a motorola S9. and as you might have guessed, i'm trying to pair the 2 up. i've followed the instructions right until the end, but have got this message:

Found audio device "Motorola S9"
No such audio device 'Stereo Bluetooth Headset'. Using System Default.

Using audio device "Motorola S9"

sample rate is 8000, channels is 2
discover : received
SEID = 2
SEID 2 : MPEG codec
SEID = 1
Sent set configurations command
set_config : accepted
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 2
6000 bytes/sec, hdr.sampling_frequency is 0
Transmitting A2DP, press RETURN to stop.
Bus error



any insight into this would be very much appreciated. being "terminally" blind, it's already taken me a few hours to get this far... many thanks!

Kryptik Mystik said...

Not sure how active this blog post still is. But I have a2dpcast 0.3 working with my Philips Vox 340 headset. The problem is that I have to turn the quality down to 10 to get any playback and down again to 5 to have anything close to uninterrupted playback. At that sound quality, its not even worth using! I noticed in the source that a2dpcast runs by default on SEID channel 1 and that there was a //cry for help (at least in 0.2). So I am wondering if anything can be done to improve quality and playback regarding the SEID and am also wondering what the SEID is? For some reason I couldn't understand exactly what it's purpose was from the IOBluetooth framework files ;). Your response is much appreciated.

Tim Hewett said...

To Wesley: unfortunately MacOS only supports one Bluetooth dongle. If you plug in an external one, it will override the internal one.

To Frozen Ananas: Does System Preferences list "Stereo Bluetooth Headset" in its Sound pane? I suspect not in which case you need to make sure that kextload of /System/Library/Extentions/AudioReflectorDriver.kexthas been completed successfully.

To Kryptik Mystik: the problem is probably lots of Bluetooth and Wifi activity in your neighbourhood, assuming that you are using the headset close (1-2m) to the Mac. You could get an external class 1 (i.e. high power, 100m) Bluetooth dongle, I have an Edimax EB-DGC1 and it makes a huge difference to both range and reliability, even though my headset is only class 2. It needs no installation beyond plugging it in. Another benefit is that being external it can be put on a long USB cable and mounted in the best place for coverage.

Paullazo said...

Though I've read with interest the A2DP work-around involving the kernel extension, I've held off attempting the method. It's been at least 25 years since I've done any real programming and I don't trust I'm up to the job. But since I can't part with my OS9 apps, Leopard isn't for me.

When I tried to load the kext, I got the message:
kextload: extension /Users/paullazo/Desktop/System/Library/Extensions/AudioReflectorDriver.kext appears to be valid
37com_apple_driver_AudioReflectorDevice is not compatible with its superclass, 13IOAudioDevice superclass changed?

The kext didn't load. I'm using 10.3.9 on a G3 - is the kext only compatible with 10.4.x, or is there something else I can try ?
Thanks, P

Tim Hewett said...

Paullazo,

I've not tried it under 10.3.9. It can probably be made to work with a rebuild though you'll be better off doing it with Apple's original AudioReflectorDriver sample code (in /Developer/Examples/CoreAudio/HAL, if you install the developer CD). If you build that under 10.3.9 but use the Info.plist from my download, it may work fine. Don't try building my download under 10.3.9 because it contains settings to make a universal binary which 10.3.9 won't understand.

Contact me via my registered user support address if you need more help, see here:

http://www.coolatoola.com/support.htm

Tim.

Timothy said...

I am using Leopard right now with the build in A2DP (audio sink) but it is in such bad quality when compare using the "old method" introduced here for Tiger...
or using my other windows machine

I doubt why apple does that to us, to keep the airport express sales up? it is a shame

Anonymous said...

Have anyone tried this solution?
http://www.softick.com/macosx/audio-gateway/

Looks interesting, but I will wait for the PPC version.

CosmicVoyager said...

ATTENTION

a2dpcast 0.2 with Jack works with my Motorola HT820 headset

but

a2dpcast 0.3 with AudioReflectorDriver.kext

does not because "Stereo Bluetooth Headset" does not list as an option in Sound Input.

When I click off of "Internal microphone" and on to my headset, a2dpcast stops working and prints endless lines of "sendbuf : ng" in the terminal window.

So I had to switch back to a2dpcast 0.2 with Jack.

This is probably the cause f other people having the same problem.

asae said...

Has anyone tested this in iPhone? :)

Assuming iPhone OS is a stripped down OSX - with unix in the back, maybe this could work also in iPhone...

Tim Hewett said...

Asae,

Re: iPhone, Apple are said to be opening the iPhone up to 3rd party development in February 2008. Just how much it will be opened up is still to be seen, for example access to hardware facilities such as Bluetooth may still not be possible. That wouldn't surprise me as Apple are likely to be keen to stop direct hardware access to make things more difficult for hackers wanting to open the phone up for use on any network.

Tim.

Joel said...

Hey, I've been following along trying to get my blutooth speaker to work with my MacBook, but with no success. I decided to just plug the speaker in to the MacBook directly. Success, it plays music nicely.

However, now I can't change the volume on my Mac using F4 and F5, or with the slider. I'm getting a circle with a diagonal line through it coming up underneath the volume notice when I try to change the volume. Um.

So, I tried to unload AudioReflectorDriver.kext, but the bugger's not co-operating. Here's everything I've done. Any ideas?

Cheers!

Joel.




Last login: Wed Dec 5 20:56:53 on console
Welcome to Darwin!
guybrush:~ joel$ sudo kextunload /System/Library/Extensions/AudioReflectorDriver.kext
Password:
kextunload: /System/Library/Extensions/AudioReflectorDriver.kext: no such bundle file exists
can't add kext (file access/permissions).
guybrush:~ joel$ cd system
guybrush:~/system joel$ cd library
guybrush:~/system/library joel$ cd extensions
guybrush:~/system/library/extensions joel$ sudo kextunload AudioReflectorDriver.kext
kextunload: unload kext AudioReflectorDriver.kext failed
guybrush:~/system/library/extensions joel$ sudo kextunload AudioReflectorDriver.kext
kextunload: unload kext AudioReflectorDriver.kext failed
guybrush:~/system/library/extensions joel$ sudo kextunload AudioReflectorDriver.kext
kextunload: unload kext AudioReflectorDriver.kext failed
guybrush:~/system/library/extensions joel$ sudo kextunload AudioReflectorDriver.kext
kextunload: unload kext AudioReflectorDriver.kext failed
guybrush:~/system/library/extensions joel$ sudo kextunload AudioReflectorDriver.kext
kextunload: unload kext AudioReflectorDriver.kext failed
guybrush:~/system/library/extensions joel$

Joel said...

Hey, Joel again. Please don't worry, I've just figured it out. Here's what I did.

Apple...System Preferences...Output

Change from Aggregate Device to Internal Speakers (or Headphones, when the blutooth speaker is plugged in).

I'm a silly billy.

Seq0 said...

Hi. I found something better :).
http://www.softick.com/macosx/audio-gateway/
Try this app, working great with my Motorola S9

Anonymous said...

Thank You!!!!

bobloblaw said...

I have been working with Jack & a2dpcast for probably 4-5 hours. I am using iBook G4 & Motorola S9 (I know it's on the "doesn't work List" but I'm determined). OSX 10.4.11.

So far I can get the system preferences to reflect "connected", but still no sound.
Can someone help? or should I get another headset?

Here is what i get so far...
Scott$ /Users/Scott/Desktop/a2dpcast-0.2/a2dpcast 00-0d-fd-1d-b3-ca
setting thread 0x1c13 to precedence policy
sample rate is 8000, channels is 2
discover : received
SEID = 2
SEID 2 : MPEG codec
SEID = 1
Sent set configurations command
set_config : accepted
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

By the way, where is this frequently mentioned "doesn't work list"?

bobloblaw said...

Rhetorical question but..... If Apple is the "leader" with iTunes & iPhone etc... Why are they so behind with the A2DP technology? I'm baffled!

didn't Apple spearhead Bluetooth in the first place?

Dylan said...

i cant seem to get this to work because after i download jack pilot and follow the video and when im entering the code into terminal i got this message dylan-2:~ dylanboyes$ Desktop/a2dpcast/a2dpcast 00-1a-80-15-45-25
-bash: Desktop/a2dpcast/a2dpcast: No such file or directory

Eric said...

@ bobloblaw (do you know DarrenDominion? ;)
Anyway, I've heard that Apple was worried (if you can be worried with a future like Apple's!) about ipod sales

Yuchi Atsui said...

just 3 or more hours to get it work, but, wow its fatntastico on my bh 501 from nokia.. awesome XD thanks ;)

Probably Over Reacting said...

I'm not sure if this is a2dpcast, Jack, Tiger, my S9s or just me--but when I listen with my S9s on my MacBook the music sounds like it goes in and out of tune. I don't have perfect pitch or anything, but I can definitely hear a difference when playing through both the S9s and the onboard speakers. Is anyone else getting this? Any ideas on how to rectify this? Seems to happen with the [option] at 15, 20, 27 and 32 (The last two of which also give me plenty of gaps).

Tim Hewett said...

To "Probably Over Reacting":

The pitch issues tend to happen for non-Bluetooth2.0 devices, e.g. Bluetooth 1.2 ones. They are much more susceptible to transmission delays and failure, caused either by other devices connected to the same computer, or by Wifi activity (which operates in the same frequency).

My own Bluetooth 1.2 headset won't work unless all other devices connected to the same Mac are turned off. Devices connected to other computers have no impact. Also it can be hit if I start a large download to my laptop over Wifi.

Bluetooth 2.0 devices are far more resilient.

David Connolly said...

Hi it has been a while since I've been intrested in this topic. I've upgraded to leopard and have not looked back since!

The only flaw (I can see) in the otherwise excellent instructions from asae / reposted on skyhorse.org is the presumption of /usr/local/bin being included in your bash profile path.

you can get around that easy, instead of typing:
1. a2dpcast aa-bb-cc-dd-ee-ff 27
type:
/usr/local/bin/a2dpcast aa-bb-cc-dd-ee-ff 27

etc.

Details on where it is failing would allow people to help, do the programs output anything when you run them?

Best of luck!

bobloblaw said...

me to try to make it work on Tiger with a G4 machine?

bobloblaw said...

ooops try this again.

Is this a waist of time to try to make it work on Tiger with a G4 machine?

Tim Hewett said...

Re: "Is this a waist of time to try to make it work on Tiger with a G4 machine?"

No it isn't a waste of time, in fact the first thing I did after becoming involved with this project was to get it working on PPC under Tiger.

Anonymous said...

after 2 straight days trying to figure out the terminal step, my macbook intel-based is paired up with a sony DR-BT50 and it sounds wonderful. it takes a couple of seconds to stream witn no interruption.

Im new with macs, so i had a rough time with terminal, but it is actually quite easy, just be sure to type the right name of the folder on your desktop "a2dpcast-0.2". In my case, i follow the steps posted by paobeleeso on 29 June 2007 18:38 but in the Terminal step, JUST DRAG THE FOLDER "a2dpcast-0.2" from your desktop into terminal and add: a2dpcast YO-UR-HE-AD-SET and press enter. that should do. the other steps were followed literally, so I must thank all of you who posted here giving explanaitons, and of course, david and tim who allowed us, mac users, a really cool stereo time with no wires at all!!!

Thnxs a lot

Bobr said...

got it working with imac mini(intel) and Sony CMT-BX5BT. Sounds great, but connection is VERY flaky. Kept getting in the terminal window
JackActivationCount::Signal value = 0 ref = 5
message over and over again.
Will play with it some more to see if I can get it more robust.
Thanks for the post!

Pravir said...

First of all a huge thanks to David & Tim for developing the software and having the patience to explain it to Mac newbies like me! and now got my Motorola S9 to work fine with my Mac mini Power PC running OS 10.4.11! It did take a little bit of tweaking but once I followed JP - Got the S9 to work's advice and all is good. Only thing I would ask is there any way of increasing the volume output? - as the volume is controlled locally (off the headphones) and through the application playing the music e.g. i tunes I have everything on max and yet it's not very loud esp compared to my old wired headphones. Any suggestions for this or is a limitation of the S9?

Russ said...

thanks much from another fan. I got tripped up on a couple of steps since I'm a bit dense (at least when it comes to computers and pseudo programming):

Safari is set to "open safe files after downloading" (under general preferences) although this will automatically open the "a2dpcastAudioDevice.tgz" file, creating the .tar file and clearly when you try to run the commands in terminal, it tells you the file does not exist.

Although after you turn this preference off, you'll have to download the .zip file and double click on it to unstuff it and create the a2dpcast-0.3 folder.

I'm sure this is too obvious to 90% of you, just wanted to clarify and save an hour for others like me. Good thing I'm not getting my PhD in CS or bioinformatics, I'd never graduate.

Working perfectly for my Jabra BT3030 and macbook with 10.4.11 intel. Not sure why, but the softick audio gateway and system preferences->sound->output transfers the most muffled unbearable audio.

Thanks much again

Amarand said...

I've noticed a few people talking about problems with random pitch bending when using their Bluetooth headphones with Mac OS X and (say) the Motorola S9 headphones. I'm using these same headphones with the Samsung T10 and am experiencing the same problem. I periodically get dropped audio and the odd (but minor) pitch shift. I'm curious if this may be something endemic to the Motorola S9, or Bluetooth in general? I thought these two devices were BT 2.0, but are they hitting so much interference outside that they backoff to BT 1.X? Happy to see the discussion here, apologize if my post seems somewhat off-topic. I am, actually, experiencing the drop-outs and pitch bending on the Macbook running 10.5.2 with plenty of CPU and memory, and much much else running.

dreamcore said...

Tim Hewett's coolatoola.com has been down for some time...

Could anyone still provide the a2dpcast software?

I'd like to try to get a Motorola S9 headset to work with a D-Link DBT-120 and Tiger on an iBook 900.

Rodrigo aus München said...

Finally my Philips SHB6100 delivers a decent audio quality with my PowerBook G4 and Mac OS X 10.4.11

Thanks!!!

Rodrigo aus München said...

Sorry, it does not work ... :(

Michel said...

Is it possible to do A2DP the other way: I mean I want to use my Palm (equped with audio gateway http://softick.com/bluetooth-audio/) and output the sound to mac speaker so this means that the Mac would act as a A2DP headphone for the Palm ?

On windows this is call "local services" under Bluetooth config.

Regards.

Anonymous said...

couldn't make it work with my logitech freepulse headphone. turned quality way down to 8 with a2dpcast 0.3 parameter and finally could hear something. but quality was so bad i just gave up. thinking of buying new headphones.

Martina said...

How so stereo bluetooth mac audio is very stagger.

Martina said...

What a great this bluetooth profile on mac.

Anonymous said...

Great tip - many thanks for sharing this.

Did take some fiddling, but works fine. Don't want to update to Leopard just for A2DP, therefore this was the solution to go for me :)

Regards mhoesch

Arthur said...

Just unwrapped my MacBook Aluminium (Max OS Leopard) and started playing music via Bluetooth streaming to my Sony CMT-HX5BT stereo.

All working fine with online music from Deezer.com. Streaming fine. Quality fine.

Will post updates as soon as I will have tried more sound sources, eg DVD.

Arthur

Anonymous said...

Wonderful Worked OK on a MACBOOK on Tiger

with Nokia BH-500 Bluetooth Headset (linked to my Koss Portapro).

Thanks a Lot !!!!

0)Pair your BT device with computer and retrieve adress in BT preferences
1)Install Jack, Run It
2)After installing the AD2P cast archive in Usr/local/bin/
3)Type In terminal the right stuff see above
4)Click on routing in Jack and dble click on Itunes
5)Sound Comes


Thanks a lot

sony dr-bt22a said...

Hi David,
I've been reading the comments from others and I get to the point where I can hear the mic on the headset, but I can't stream the music to it. The connection manager on Routing do not have the option to choose a2dp.

Here is my log. It seems that the problem is that the jack server is not running or cannot be started. Is that due to the incompatibility with the headset?

======
setting thread 0x2203 to precedence policy
ConnectPort: can't find mach server port name = jackdmp_entry.0_default err = unknown error code
Cannot connect to server Mach port
jack server is not running or cannot be started
no message buffer overruns
sample rate is 44100, channels is 2
2009-05-16 19:31:52.822 a2dpcast[435] *** _NSAutoreleaseNoPool(): Object 0x4271e0 of class NSIdEnumerator autoreleased with no pool in place - just leaking
2009-05-16 19:31:52.823 a2dpcast[435] *** _NSAutoreleaseNoPool(): Object 0x42b7a0 of class IOBluetoothNotification autoreleased with no pool in place - just leaking
2009-05-16 19:31:52.823 a2dpcast[435] *** _NSAutoreleaseNoPool(): Object 0x42f880 of class NSCFArray autoreleased with no pool in place - just leaking
discover : received
SEID = 2
SEID 2 : MPEG codec
SEID = 1
Sent set configurations command
set_config : rejected (serv_cat : 2, error_code: 0)
open : stream channnel
open_stream : ok
start_stream : ok
mtu = 672

frm_len = 69
50301 bytes/sec, hdr.sampling_frequency is 2
Transmitting A2DP, press RETURN to stop.

=========

«Oldest ‹Older   1 – 200 of 203   Newer› Newest»