Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Open SCOAudio connection with phone

I am trying to use IOBluetooth framework on OS X 10.8.2 to connect with the bluetooth enabled phones emulating computer as a hands free device. I can successfully make a connection with the phone and phone can recognise the connection as a HandsFree connected to the phone. But when I try to make a call with the phone and want to send the audio to the mac (by selecting the source as handsfree), the audio never reaches the computer.

As at this point the bluetooth framework tries to open a SCO Audio connection with the device, but the connection establishment is never successful and I get the error code 0x0D status code in scoConnectionOpened status.

I am using IOBluetoothAddSCOAudioDevice function to attach the SCO Audio device with bluetooth device and it is always successful.

//btDevice is paired  res=IOBluetoothAddSCOAudioDevice((IOBluetoothDeviceRef) btDevice,NULL);  if(res != kIOReturnSuccess) {    self.error.title = [NSString stringWithFormat:         @"Could not attach the Audio device. Try  paring device again"]; } 

The console log says

24/11/2012 4:02:13.000 PM kernel[0]: [SendHCIRequestFormatted] ### ERROR: [0x0428] (Setup Synchronous Connection) -- Send request failed (err = 0x000D (kBluetoothHCIErrorHostRejectedLimitedResources))

24/11/2012 4:02:13.000 PM kernel[0]: REQUIRE_NO_ERR failure: 0xd - file: /SourceCache/IOBluetoothFamily_kexts/IOBluetoothFamily-4090.4.33/Core/Family/Drivers/IOBluetoothSCOAudioDriver/IOBluetoothSCOAudioDevice.cpp:872

Although console log says limited resources but I have tried it with multiple phones having their batteries full.

I am stumped on this and just thinking if I need to do any thing special or different?

Thanks in advance for much appreciated help.

like image 794
Muhammad Usama Avatar asked Nov 24 '12 11:11

Muhammad Usama


1 Answers

This error ("Connection Rejected due to Limited resource") typically happens when a T2 request is sent to a T1-only SCO listener. If you read the patch notes to version 5 you can get a discussion about this problem linux-bluetooth v5 patch notes

like image 200
Tyler Durden Avatar answered Oct 05 '22 07:10

Tyler Durden