FreeBSD On ThinkPad X60

Bluetooth Mouse

ThinkPad X60 内蔵の Bluetooth を利用してマウスを接続する。
ThinkPad X60 には Broadcom 社の bluetooth インタフェイスが搭載されており、 ppp のみならず Bluetooto マウスも FreeBSD からも問題なく利用できる。

カーネルモジュール

Bluetooth を利用するためにカーネルモジュールをロードする必要がある。
そのために、起動時に /boot/loader.conf に 以下のモジュールをロードする設定を追加する。
netgraph_load="YES"
ng_ubt_load="YES"
vkbd_load="YES"

デバイスの設定情報

Bluetooth 機器に接続するためには Bluetooth 機器の デバイスアドレスが必要になるので、 hccontrol(8) コマンドを実行して取得する。
# hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: XX:XX:XX:XX:XX:XX
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 42:02:04
Clock offset: 0x7d0a
Bluetooth 機器との認証を管理するのは hcsecd(8) というプログラムなので、 接続する機器ごとの情報を /etc/bluetooth/hcsecd.conf に登録しておく。
device {
	bdaddr  XX:XX:XX:XX:XX:XX;
	name    "任意の名称";
	key     nokey;
	pin     nopin;
}

BlueTooth マウスのデバイスアドレスを /etc/bluetooth/hosts に登録する。
XX:XX:XX:XX:XX:XX	任意の名称

bthidcontrol (8) コマンドで BlueTooth マウスの情報を取得し 定義ファイルに出力する。
# bthidcontrol -a 名称 query > /etc/bluetooth/bthidd.conf

接続

Fn + F5 を押すと画面下の Bluetooth インジケータが点灯して Bluetooth が利用可能となる。
bluetooth マウスを利用するためには bthidd (8) コマンドを実行する。
# bthidd -c /etc/bluetooth/bthidd.conf

Last Update: 4 Feb. 2010