Error codes could come from one of three places:
IOReturn.h - general IOKit errors. Typically codes such as "0xe00002CA".
The ones you are seeing are:
#define kIOReturnIOError iokit_common_err(0x2ca) // General I/O
error
#define kIOReturnVMError iokit_common_err(0x2c8) // misc. VM failure
IOBluetooth/IOBluetoothTypes.h - Bluetooth defined IOKit errors:
#define kIOBluetoothDeviceResetError iokit_bluetooth_err(1) //
Device reset interrupted pending operation
Finally, HCI errors are defined in IOBluetooth/Bluetooth.h. Common codes
are:
kBluetoothHCIErrorSuccess = 0x00,
kBluetoothHCIErrorNoConnection = 0x02,
kBluetoothHCIErrorHardwareFailure = 0x03,
kBluetoothHCIErrorPageTimeout = 0x04,
kBluetoothHCIErrorAuthenticationFailure = 0x05,
kBluetoothHCIErrorPairingNotAllowed = 0x18,
The error code 5 is probably an Authentication failure - as if you have not
paired properly with the device before trying to open a connection. What
device are you using and how did you set it up?