<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:@F@IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel"
  },
  "title" : "IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel"
}
-->

# IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel

Create an OBEX session with an IOBluetoothRFCOMMchannel. This implies you are creating a OBEX SERVER session that will dole out info to remote Bluetooth clients.

```
OBEXError IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel(IOBluetoothRFCOMMChannelRef inRFCOMMChannelRef, OBEXSessionEventCallback inCallback, void *inUserRefCon, OBEXSessionRef*outSessionRef);
```

## Parameters

`inRFCOMMChannelRef`

A valid IOBluetoothRFCOMMChannel reference.

`inCallback`

A callback for Get requests sent to your session by a remote device. Must be a valid function ptr, otherwise why even call this?

`outSessionRef`

A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.

## Return Value

An error code value. 0 if successful.

## Discussion

This assumes that the RFCOMM channel you have passed it is already open and ready to transmit data to the session.

*** DEPRECATED IN BLUETOOTH 2.2 (OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.

---

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)