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

# IOBluetoothOBEXSessionOpenTransportConnection

```
OBEXError IOBluetoothOBEXSessionOpenTransportConnection(OBEXSessionRef inSessionRef, IOBluetoothOBEXSessionOpenConnectionCallback inCallback, void *inUserRefCon);
```

## Parameters

`inSessionRef`

A valid session reference.

`inCallback`

A valid callback.

`inUserRefCon`

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

## Return Value

An error code value. 0 if successful.

## Discussion

Opens a transport-level connection to a remote target. For example, if you are using a Bluetooth transport, this will establish the baseband/L2CAP/RFCOMM connection to a device. Once the callback is called, the connection will either be opened or have failed with a status code. That status code will most likely have originated from the transport layer being used, so you may receive a Bluetooth error, an IOKit error, etc, but a 0 status should indicate success in all cases.

*** 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)