Bluetooth コマンド

この章は、次の項で構成されています。

bluetooth device-name

ペアリングプロセスおよびその後の Bluetooth 操作で使用する Bluetooth デバイス名を設定するには、Bluetooth インターフェイスモードで bluetooth device-name コマンドを使用します。デフォルト設定に戻すには、コマンドの no 形式を使用します。

構文

bluetooth device-name device-name

no bluetooth device-name

パラメータ

デバイス名:Bluetooth インターフェイスに関連付けられた名前を指定します。(長さ:1 ~ 20 文字)。

デフォルト設定

デフォルトの device-name はデバイスのホスト名です。

コマンド モード

Bluetooth インターフェイス コンフィギュレーション モード。

使用上のガイドライン

Bluetooth インターフェイスに関連付けられたデバイス名を設定するには、bluetooth device-name コマンドを使用します。Bluetooth デバイス名は、Bluetooth ペアリングプロセスで Bluetooth インターフェイスを識別するために使用されます。Bluetooth デバイス名が設定されていない場合、デバイスのホスト名がデバイス名として使用されます。

次の例では、Bluetooth インターフェイス コンフィギュレーション モードを開始し、Bluetooth インターフェイスのデバイス名として「Switch BT」を設定する方法を示します。

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

bluetooth pin

ペアリングプロセスで使用する 6 桁のピンを設定するには、Bluetooth インターフェイスモードで bluetooth pin コマンドを使用します。デフォルト設定に戻すには、コマンドの no 形式を使用します。

構文

bluetooth pin pin

no bluetooth pin.

パラメータ

PIN:4 桁の個人識別番号

デフォルト設定

デフォルトの PIN は 9999 です。

コマンド モード

Bluetooth インターフェイス コンフィギュレーション モード。

使用上のガイドライン

bluetooth pin コマンドを使用して、デバイスの Bluetooth インターフェイスと Bluetooth パートナー間の Bluetooth ペアリングプロセスで使用する 4 桁の PIN を設定します。

次に、Bluetooth インターフェイスで PIN を 1234 に設定する例を示します。

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

shutdown

Bluetooth インターフェイスの動作を無効にするには、インターフェイス(Bluetooth)コンフィギュレーション モードで shutdown コマンドを使用します。デフォルト設定に戻すには、コマンドの no 形式を使用します。

構文

shutdown

no shutdown

デフォルト設定

デフォルトでは Bluetooth インターフェイスがアクティブになっています

コマンド モード

インターフェイス(Bluetooth)コンフィギュレーション モード。

例 1

次の例では、Bluetooth の動作をシャットダウンします。
switchxxxxxx(config)# interface bluetooth 0
 switchxxxxxx(config-if)# shutdown

show bluetooth status

Bluetooth インターフェイスの設定とステータスに関する情報を表示するには、特権 EXEC モードで show bluetooth status コマンドを使用します。

構文

show bluetooth status

デフォルト設定

該当なし

コマンド モード

特権 EXEC モード。

使用上のガイドライン

デバイスの Bluetooth インターフェイスに関する情報を表示するには、show bluetooth status コマンドを使用します。

例 1

次の例では、ドングルが USB ポートに挿入されていない場合のデフォルト状態での BT インターフェイス情報が表示されます。

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

例 2

次の例では、ドングルが USB ポートに挿入されており、ユーザーが Bluetooth インターフェイスでデバイス名と PIN を設定した場合の Bluetooth インターフェイス情報が表示されます。Bluetooth インターフェイスは検出可能ですが、リモートの Bluetooth パートナーにはまだ接続されていません。

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

例 3

次の例では、Bluetooth インターフェイスがペアリングされ、リモートの Bluetooth パートナーに接続されている場合の Bluetooth インターフェイス情報が表示されます。

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

例 4

次の例では、Bluetooth インターフェイスがペアリングされ、リモートの Bluetooth パートナーに接続されている場合の Bluetooth インターフェイス情報が表示されます。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