Callback for IOBluetoothRFCOMMChannelCloseChannel
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com On Mac OS X 10.3.9, when I invoke the IOBluetoothRFCOMMChannelCloseChannel function, my event listener function is not called with the kIOBluetoothRFCOMMChannelEventTypeClosed event. The basic flow of my program is (pseudo code): _deviceRef = IOBluetoothDeviceCreateWithAddress( &deviceAddress ); IOBluetoothDeviceOpenConnection( _deviceRef, NULL, NULL ); IOBluetoothDeviceOpenRFCOMMChannelAsync( _deviceRef, &_rfcommChannelRef, rfcommChannelID, rfcommEventListener, (void*)this ) CFRunLoopRunInMode( kCFRunLoopDefaultMode, 10 /* seconds */, false ); // returns after kIOBluetoothRFCOMMChannelEventTypeOpenComplete event is received [ write and read here ] IOBluetoothRFCOMMChannelCloseChannel( _rfcommChannelRef ); CFRunLoopRunInMode( kCFRunLoopDefaultMode, 10 /* seconds */, false ); // times out on 10.3.9; // returns after kIOBluetoothRFCOMMChannelEventTypeClosed event is received on 10.4.5 IOBluetoothObjectRelease( _rfcommChannelRef ); IOBluetoothDeviceCloseConnection( _deviceRef ); IOBluetoothObjectRelease( _deviceRef ); My rfcommEventListener function is called with the kIOBluetoothRFCOMMChannelEventTypeOpenComplete message after I invoke the IOBluetoothDeviceOpenRFCOMMChannelAsync function. It is also called with the kIOBluetoothRFCOMMChannelEventTypeData event. However, it is not called with the kIOBluetoothRFCOMMChannelEventTypeClosed event after I invoke the IOBluetoothRFCOMMChannelCloseChannel function. Should it be? The same code, when run on Mac OS X 10.4.5, does result in the rfcommEventListener function being called with the kIOBluetoothRFCOMMChannelEventTypeClosed event after I invoke the IOBluetoothRFCOMMChannelCloseChannel function. Which is the proper behavior? Which messages should I expect when? Thanks for any help! geoff -- Geoffrey Schmit Principal Engineer National Instruments geoffrey.schmit@ni.com www.ni.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
participants (1)
-
Geoffrey Schmit