What is the status returned from IOBluetoothDeviceRemoteNameRequest() - is it 0 (success)? Also, you do not need to provide "device_name" to the function if you are using it asynchronously, so just pass NULL there (not that it should matter). jason
Hey all.
when I call IOBluetoothDeviceRemoteNameRequest synchronously, it
connects to the remote device, fetches the name, no problem....
however, when I provide a callback (as the API provides should result
in an asynchronous response coming back at my callback), I just end up
'falling through' and my callback never gets called. Any suggestions?
here are the relevant pieces, thanks in advance for any guidance:
/* The inDeviceRef is properly set up, and the call gets made: */
IOBluetoothDeviceRef
inDeviceRef=IOBluetoothDeviceCreateWithAddress(&device_address);
status = IOBluetoothDeviceRemoteNameRequest(inDeviceRef,
RemoteNameRequestCallback,
self,
device_name);
/* Proto and setup of the callback: */
void RemoteNameRequestCallback(void* userRefCon,IOBluetoothDeviceRef
deviceRef,IOReturn status);
void RemoteNameRequestCallback(void* userRefCon,IOBluetoothDeviceRef
deviceRef,IOReturn status) {
printf("Hello");
}
_______________________________________________
_______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored.