Re: IOReturn documented somewhere?
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com - Eric On Oct 11, 2005, at 4:13 AM, Alexander Traud wrote: Correct but where are the errors documented? _______________________________________________ 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/esb%40apple.com This email sent to esb@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... It should be easy, but its not currently. All errors returned as an IOReturn should be defined in the reserved iokit error space (see IOReturn.h and IOBluetoothTypes.h). Unfortunately as you've discovered, currently HCI error codes are not mapped into the iokit/ IOReturn error space - they are simply returned as their native value (0x00 - 0xff). Any value you get in that small range is an HCI error - the HCI error that we received from the hardware. I am just migrating to the Bluetooth RFCOMM C-API rather than using POSIX serial ports and I am very happy, I should have done that earlier. One of the arguments given in http://developer.apple.com/documentation/DeviceDrivers/Conceptual/ Bluetooth/ Overview of Bluetooth Application Types > Accessing Serial Ports: All Bluetooth-specific errors are reported as a failure to open the serial port. In the headers only success is described but not all possible errors. I played a bit with IOBluetoothDeviceOpenRFCOMMChannel and it looks like I get zillions of possible errors. For example I got a 0x22 when the pairing timed out. In Bluetooth.h there is a kBluetoothHCIErrorLMPResponseTimeout which fits. If the pairing key was wrong I got 0x05, is that kBluetoothHCIErrorAuthenticationFailure? Then sometimes I get negative numbers (rejected connection; missing pairing key). If the device is not reachable I get 0x04. Is that kBluetoothHCIErrorPageTimeout? Its great to have such fine grained errors (down to the HCI) but I rather would like to know where (headers) all the possible errors are listed: IOReturn.h IOBluetoothTypes.h Bluetooth.h Correct? This email sent to site_archiver@lists.apple.com
participants (1)
-
Eric Brown