<!--
{
  "documentType" : "article",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/obex-convenience-macros",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "OBEX Convenience Macros"
}
-->

# OBEX Convenience Macros

Convenience Macros for working with OBEX Header Identifiers.

## Discussion

The API should shield you from using these, they are included here to completeness.

## Topics

### Macros

[`#define BluetoothCoDMinorPeripheral1(minorClass)`](/documentation/IOBluetooth/BluetoothCoDMinorPeripheral1)

[`#define BluetoothCoDMinorPeripheral2(minorClass)`](/documentation/IOBluetooth/BluetoothCoDMinorPeripheral2)

[`#define BluetoothGetDeviceClassMajor(inCOD)`](/documentation/IOBluetooth/BluetoothGetDeviceClassMajor)

[`#define BluetoothGetDeviceClassMinor(inCOD)`](/documentation/IOBluetooth/BluetoothGetDeviceClassMinor)

[`#define BluetoothGetSecondsFromSlots(inSlots)`](/documentation/IOBluetooth/BluetoothGetSecondsFromSlots)

[`#define BluetoothGetServiceClassMajor(inCOD)`](/documentation/IOBluetooth/BluetoothGetServiceClassMajor)

[`#define BluetoothGetSlotsFromSeconds(inSeconds)`](/documentation/IOBluetooth/BluetoothGetSlotsFromSeconds)

[`#define BluetoothHCIExtractCommandOpCodeCommand(OPCODE)`](/documentation/IOBluetooth/BluetoothHCIExtractCommandOpCodeCommand)

[`#define BluetoothHCIExtractCommandOpCodeGroup(OPCODE)`](/documentation/IOBluetooth/BluetoothHCIExtractCommandOpCodeGroup)

[`#define BluetoothHCIMakeCommandOpCode(GROUP, CMD)`](/documentation/IOBluetooth/BluetoothHCIMakeCommandOpCode)

[`#define BluetoothHCIMakeCommandOpCodeEndianSwap(GROUP, CMD)`](/documentation/IOBluetooth/BluetoothHCIMakeCommandOpCodeEndianSwap)

[`#define BluetoothHCIMakeCommandOpCodeHostOrder(GROUP, CMD)`](/documentation/IOBluetooth/BluetoothHCIMakeCommandOpCodeHostOrder)

[`#define BluetoothMakeClassOfDevice(inServiceClassMajor, inDeviceClassMajor, inDeviceClassMinor)`](/documentation/IOBluetooth/BluetoothMakeClassOfDevice)

[`#define GET_HEADER_ID_IS_1_BYTE_QUANTITY(HEADER_ID)`](/documentation/IOBluetooth/GET_HEADER_ID_IS_1_BYTE_QUANTITY)

[`#define GET_HEADER_ID_IS_4_BYTE_QUANTITY(HEADER_ID)`](/documentation/IOBluetooth/GET_HEADER_ID_IS_4_BYTE_QUANTITY)

[`#define GET_HEADER_ID_IS_BYTE_SEQUENCE(HEADER_ID)`](/documentation/IOBluetooth/GET_HEADER_ID_IS_BYTE_SEQUENCE)

[`#define IOBLUETOOTH_EXPORT`](/documentation/IOBluetooth/IOBLUETOOTH_EXPORT)

[`#define IS_REQUEST_PDU(_pduID)`](/documentation/IOBluetooth/IS_REQUEST_PDU)

[`#define IS_RESPONSE_CODE_FINAL_BIT_SET(RESPONSE_CODE)`](/documentation/IOBluetooth/IS_RESPONSE_CODE_FINAL_BIT_SET)

[`#define IS_RESPONSE_PDU(_pduID)`](/documentation/IOBluetooth/IS_RESPONSE_PDU)

[`#define RFCOMM_CHANNEL_ID_IS_VALID(CHANNEL)`](/documentation/IOBluetooth/RFCOMM_CHANNEL_ID_IS_VALID)

[`#define SET_HEADER_ID_IS_1_BYTE_QUANTITY(HEADER_ID)`](/documentation/IOBluetooth/SET_HEADER_ID_IS_1_BYTE_QUANTITY)

[`#define SET_HEADER_ID_IS_4_BYTE_QUANTITY(HEADER_ID)`](/documentation/IOBluetooth/SET_HEADER_ID_IS_4_BYTE_QUANTITY)

[`#define SET_HEADER_ID_IS_BYTE_SEQUENCE(HEADER_ID)`](/documentation/IOBluetooth/SET_HEADER_ID_IS_BYTE_SEQUENCE)

[`#define SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT(HEADER_ID)`](/documentation/IOBluetooth/SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT)

[`#define STRIP_RESPONSE_CODE_FINAL_BIT(RESPONSE_CODE)`](/documentation/IOBluetooth/STRIP_RESPONSE_CODE_FINAL_BIT)

[`#define iokit_bluetooth_err(return)`](/documentation/IOBluetooth/iokit_bluetooth_err)

[`#define kIOBluetoothConnectionAlreadyExists`](/documentation/IOBluetooth/kIOBluetoothConnectionAlreadyExists)

[`#define kIOBluetoothDeviceResetError`](/documentation/IOBluetooth/kIOBluetoothDeviceResetError)

[`#define kIOBluetoothHCIPowerStatesNotSupported`](/documentation/IOBluetooth/kIOBluetoothHCIPowerStatesNotSupported)

[`#define kIOBluetoothNoHCIController`](/documentation/IOBluetooth/kIOBluetoothNoHCIController)

[`#define kNoNotifyProc`](/documentation/IOBluetooth/kNoNotifyProc)

[`#define kNoUserRefCon`](/documentation/IOBluetooth/kNoUserRefCon)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)