---
title: "peripheral(_:didOpen:error:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbperipheraldelegate/peripheral(_:didopen:error:)"
---

# peripheral(_:didOpen:error:)

Delivers the result of an attempt to open an L2CAP channel.

## Declaration

```swift
optional func peripheral(_ peripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: (any Error)?)
```

## Discussion

Discussion This method delivers the result of a previous call to openL2CAPChannel(_:).
