site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Importance: Normal User-agent: SquirrelMail/1.4.7-4.fc4 Hello Marco, Thank you for the response. I will not be able to attend WWDC. Can I get in touch (by mail) with the Mac OS SCO expert ? I've tried IOBluetoothAddSCOAudioDevice, but it's a deprecated function and the only thing it does, is to create the associated audio device, if such a device is not already present. My code is the following: void* keys[1]; keys[0]=[[NSString alloc] initWithCString:"IOAudioControls"]; void* values[1]; id array=[[NSMutableArray alloc] init]; values[0]=array; CFDictionaryRef dictionary=CFDictionaryCreate(NULL,keys,values,1, &kCFTypeDictionaryKeyCallBacks,&kCFTypeDictionaryValueCallBacks); IOReturn res=IOBluetoothAddSCOAudioDevice(m_headset,dictionary); The operation was successful in the case when the audio device didn't exist. In the case when the device existed (created using bluetooth interface in the OS), the function returned a general error. Regards, Mihnea GALCA
Hello Mihnea,
For each channel (RFCOMM or L2CAP) there can be only one client, so in general if the SCO driver is using the channel you can not use the same channel. So if you want to use the default SCO driver you can not read the button pressed. If you want to manage your own SCO connection there is an API in IOBluetoothUserLib.h called IOBluetoothAddSCOAudioDevice and IOBluetoothRemoveSCOAudioDevice, in this case the audio is handled for you but you need to handle the RFCOMM channel (so volume and button clicks) more info at http:// developer.apple.com/documentation/DeviceDrivers/Reference/IOBluetooth/ IOBluetoothUserLib/CompositePage.html#//apple_ref/c/func/ IOBluetoothAddSCOAudioDevice You need to know in deep how the MacOS X audio system works to use that API.
I am not the SCO expert, but he will be at WWDC if you have some specific questions.
On Mar 27, 2007, at 4:47 AM, Mihnea Galca wrote:
Everything in this message is related to latest Mac OS.
Is it possible to have a rfcomm connection with a bluetooth headset on top of which to start/stop SCO connection ?
Usage scenario: a RFCOMM connection has to be maintained to a bluetooth headset to get button press events, but in the same time, SCO is activated to play/record sounds using the headset.
So far, I could make a RFCOMM connection to capture button press events, but I couldn't start SCO in any way. SCO seems connected to a system audio device which connects/disconnects the headset when needed. I couldn't find any method to control SCO from API.
How can I solve the problem in the above given scenario ?
Do I need to develop my own SCO layer over RFCOMM and create a new audio device driver ? Any pointers to do such a thing ?
Regards, Mihnea GALCA _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/mpontil% 40apple.com
This email sent to mpontil@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com