---
title: getEncryptionMode()
framework: IOBluetooth
role: symbol
role_heading: Instance Method
path: iobluetooth/iobluetoothdevice/getencryptionmode()
---

# getEncryptionMode()

Get the encryption mode for the baseband connection.

## Declaration

```swift
func getEncryptionMode() -> BluetoothHCIEncryptionMode
```

## Return Value

Return Value Returns the encryption mode for the baseband connection. If no baseband connection is present, kEncryptionDisabled is returned.

## Discussion

Discussion This method only returns a valid result if a baseband connection is present (-isConnected returns TRUE).
