Bluetooth/ja

この記事では、Article description::Bluetooth コントローラーとデバイスの設定・使用について説明します.

Prerequisites
この記事では、udevとUSBが事前に設定されていることを前提としています.

Kernel
In most cases enabling RFCOMM ( CONFIG_RFCOMM ), HIDP ( CONFIG_BT_HIDP ), HCI USB ( CONFIG_BT_HCIBTUSB ) and/or HCI UART ( CONFIG_BT_HCIUART ) should be sufficient. The User-space I/O driver for HID input devices ( CONFIG_UHID ) should be enabled for Bluetooth keyboards and mice.

Firmware
Most Bluetooth controllers need firmware to function. If the controller is supported by Linux, will usually indicate if firmware is needed. The package should provide the needed firmware, although some devices may need firmware that is only available from the manufacturer.

USE flags
BlueZ is an implementation of the Bluetooth protocol stack for Linux, and it is provided by the package.

Bluetooth support can be enabled system-wide by setting the USE variable to :

Emerge
The system needs to be updated if the USE variable was set to :

Install BlueZ:

Permissions
Permissions for Bluetooth devices will be handled automatically if the USE variable is set to, and ConsoleKit or systemd or elogind is being used.

Alternatively, adding a user to the group will allow that user to access Bluetooth devices:

OpenRC
Bluetoothを起動します.

起動時にBluetoothを起動します.

systemd
Start bluetooth:

Start bluetooth at boot:

Controller setup
コントローラー情報の表示：

Where  is the name of the controller, and   (3rd line) indicates that the controller is enabled.

Enable the controller if indicates (with  ) (3rd line) that the controller is disabled:

In this case, query the state of the Bluetooth radio transmitter with :

can be installed with the package, or the >=-2.31 package.

Unblock the controller if indicates (with  ) that the controller is blocked:

If indicates (with  ) that the controller is blocked, unblock the controller by physical switch or keyboard function key.

Bluetooth controllers can be enabled automatically by setting  in :

In some instances Bluetooth controllers may have been soft-blocked by power management tools in udev. Make sure state is set to  in the corresponding rule file, or remove the following line entirely:

Device pairing
Bluetoothデバイスは、使用する前にBluetoothコントローラーとペアリングする必要があります. これは、相互作用エージェントを介して両方のデバイスにPIN（または他のコード）を入力することにより行われます. ヘッドセットなどの特定のデバイスでは、任意のPINを入力できません. これらのデバイスは、通常0000、1111、1234、または9999の静的PINを使用します. PIN入力を必要としないデバイス（Sony BD Remote Controlなど）もあり、プロンプトが表示されたときにPINを入力しようとすると失敗します. このようなデバイスでは、ペアリングをスキップできます.

This article only covers device pairing with, which is a command-line interaction agent provided by the package. If a graphical desktop environment is being used, device paring can be done with a graphical interaction agent. For KDE use, for GNOME use , and for GTK use or.

Start :

List the available controllers:

Display information about a controller:

Set the default controller:

Power on the controller:

Enable the agent and set it as default:

Set the controller as discoverable (temporarily for 3 minutes) and pairable:

Scan for devices:

Put the device into pairing mode. This generally involves pressing a button or a combinations of buttons, usually for several seconds.

Discover the device MAC address:

Pair with the device:

Enter the if prompted:

Allow the service authorization if requested:

Trust the device:

Connect to the device:

Display information about the device:

The device is now paired: