Re: IOReturn documented somewhere?
Re: IOReturn documented somewhere?
- Subject: Re: IOReturn documented somewhere?
- From: Eric Brown <email@hidden>
- Date: Tue, 11 Oct 2005 10:49:10 -0700
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.
- Eric
On Oct 11, 2005, at 4:13 AM, Alexander Traud wrote:
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.
Correct but where are the errors documented?
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?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden