Bluetooth Commands

This chapter contains the following sections:

bluetooth device-name

Use the bluetooth device-name command in Bluetooth Interface mode to configure the Bluetooth device name to use in the pairing process, and in subsequent Bluetooth operations. Use the no form of command to return to the default setting.

Syntax

bluetooth device-name device-name

no bluetooth device-name

Parameters

device name- Specifies a name associated with the Bluetooth interface. (Length: 1–20 characters).

Default Configuration

The default device-name is the device hostname.

Command Mode

Bluetooth interface Configuration mode.

User Guidelines

Use the bluetooth device-name command to configure the device-name associated with the Bluetooth interface. The Bluetooth device-name is used to identify the Bluetooth interface in the Bluetooth pairing process. If a Bluetooth device-name is not configured then the device hostname will be used as the device-name.

Examples

The following example shows how enter the Bluetooth interface configuration mode and configuring "Switch BT" as the Bluetooth interface device-name:

switchxxxxxx(config)# interface bluetooth 0
switchxxxxxx(config-if)# bluetooth device-name "Switch BT"

bluetooth pin

Use the bluetooth pin command in Bluetooth Interface mode to configure the 6-digit pin used in the pairing process. Use the no form of command to return to the default setting.

Syntax

bluetooth pin pin

no bluetooth pin.

Parameters

pin- a 4-digit personal identification number

Default Configuration

The default PIN is 9999.

Command Mode

Bluetooth interface Configuration mode.

User Guidelines

Use the bluetooth pin command to configure the 4-digit PIN which is used use in the Bluetooth pairing process between the device Bluetooth interface and a Bluetooth partner.

Examples

This example shows how to configure a pin of 1234 on the Bluetooth interface:

switchxxxxxx(config)# interface bluetooth 0
 switchxxxxxx(config-if)# shutdown

shutdown

Use the shutdown command in Interface (Bluetooth) Configuration mode to disable the operation of the Bluetooth interface. Use the no form of command to return to the default setting.

Syntax

shutdown

no shutdown

Default Configuration

he Bluetooth interface is active by default

Command Mode

Interface (Bluetooth) Configuration mode.

Examples

Example 1

The following example shuts down the Bluetooth operation.
switchxxxxxx(config)# interface bluetooth 0
 switchxxxxxx(config-if)# shutdown

show bluetooth status

To display information about the Bluetooth interface configuration and status, use the show bluetooth status command in Privileged EXEC mode.

Syntax

show bluetooth status

Default Configuration

N/A

Command Mode

Privileged EXEC mode.

User Guidelines

Use the show bluetooth status command, to display information about the device bluetooth interface.

Examples

Example 1

This example shows BT interface information at the default state when dongle is not inserted into USB port:

switchxxxxxx# show bluetooth status
Dongle MAC: Not Available
BT Dongle Present: no
State: not ready
BT Local Name: switch112233 (the default)
PIN: 999999 (the default)
BT Partner Name: Not Available

Example 2

The following example displays the Bluetooth interface information when a dongle is inserted into USB port, and the user configured on the Bluetooth interface a Device Name and PIN. The Bluetooth interface is discoverable but did not connect yet with a remote Bluetooth partner:

switchxxxxxx# show bluetooth status
Dongle MAC: 00:1a:7d:da:71:13
Bus: USB
BT Dongle Present: Yes
State: Discoverable
BT Local Name: My_BT
PIN (encrypted): 8nPzy2hzuba9pG3iiC/q0451RynUn7kq94L9WORFrRM=
BT Partner Name: Not Available

Example 3

The following example displays the Bluetooth interface information when it is paired and connected to a remote Bluetooth partner:

switchxxxxxx# show bluetooth status
Dongle MAC: 00:1a:7d:da:71:13
Bus: USB
BT Dongle Present: Yes
State: Connected
BT Local Name: My_BT
PIN (encrypted): 8nPzy2hzuba9pG3iiC/q0451RynUn7kq94L9WORFrRM=
BT Partner Name: Tablet123

Example 4

The following example displays the Bluetooth interface information when it is paired and connected to a remote Bluetooth partner:switchxxxxxx# show bluetooth status

switchxxxxxx# show bluetooth status 
Dongle MAC: 00:1a:7d:da:71:13 
Bus: USB
BT Dongle Present: Yes
State: Admin Down
BT Local Name: My_BT
PIN (encrypted): 8nPzy2hzuba9pG3iiC/q0451RynUn7kq94L9WORFrRM=
BT Partner Name: Not available