以前、紹介した Bluetooth Mouse support packages for OpenSolaris ですが、どうも debug kernel を想定していたようで通常の kernel では panic していたようです。
というわけで、新たにパッケージングしなおしたものがリリースされています。
OpenSolaris Project: Bluetooth Stack & Drivers
http://www.opensolaris.org/os/project/bluetooth/
詳細はこちらで。
[laptop-discuss] Announcement: Bluetooth Mouse support packages for OpenSolaris build107+
http://www.opensolaris.org/jive/thread.jspa?threadID=92641&tstart=0
ubt driver が attach しているようだと書きましたが、やっぱり attach できていて MacBook Late 2008 でも利用できることを確認。MacBook かわいいよ。かわいいよ MacBook。
WiFi はしょうがないにしても、Audio がなんとかなれば・・・くっ。
インストール方法は簡単で、こんな感じ。
1. $ su root
2. # wget http://www.opensolaris.org/os/project/bluetooth/btms_installer.sh
3. # chmod +x ./btms_installer.sh
4. # ./btms_installer.sh
btms_installer.sh を実行すると、uname から build を特定し、一致する archive を download してインストールするという作りになっています。
MacBook Late 2008 は、Nevada b108 なので、b108 用の package を持ってきてくれます。
$ cat /etc/release
Solaris Express Community Edition snv_108 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 09 February 2009
インストールには、ちょっと、時間がかかるので諦めないように。
ちなみに、現在確認できている package は、b107, b108, b109 用。
ON に b109 の tag が打たれたので、まぁ、そんなもんかなぁと。
http://www.opensolaris.org/os/project/bluetooth/bluetooth_mouse_snv_107.tar.gz
http://www.opensolaris.org/os/project/bluetooth/bluetooth_mouse_snv_108.tar.gz
http://www.opensolaris.org/os/project/bluetooth/bluetooth_mouse_snv_109.tar.gz
で、bluetooth とは全然関係ないのですが、インストール後に、wificonfig createprofile を実行しようとしても、/etc/inet/wifi.tmp file が作れないとかわけがわからない現象が発生。
ちょっと、これはやばいぞ?と思ってたら、bluetooth_mouse package の仕業でした。
macbook(i86pc):/ (← / にいる)
$ ls -la
total 17962
drwxr-xr-x 23 148931 staff 26 Feb 26 23:01 ./
drwxr-xr-x 23 148931 staff 26 Feb 26 23:01 ../
lrwxrwxrwx 1 root other 27 Feb 24 02:54 .make.machines -> opt/onbld/gk/.make.machines
lrwxrwxrwx 1 root root 9 Feb 23 14:08 bin -> ./usr/bin/
-rw-r--r-- 1 root root 8563200 Feb 26 17:46 bluetooth_patch_for_snv_108.tar
drwxr-xr-x 7 root sys 10 Feb 23 15:10 boot/
/ ディレクトリの . と .. の permission が見事に知らない人のものになっています。
これが原因ですね。見事に嵌められました。
chown root:root に変更したところ wificonfig の挙動も期待したとおりに。
再起動後、↓の setup instructions に従い、Bluetooth mouse の登録を。
http://www.opensolaris.org/os/project/bluetooth/btms_step_by_step1.TXT
まだ、テスト版なので Bluetooth 機器のアドレスは手入力です。
大抵の場合、ひっくり返すと書いてあったりするものですが、さとう手持ちの Kensington Slime Blade Trackball Mouse は、それがなく。。。真ん中ボタンもなく 2 ボタン同時押しだったり。。。
Bluetooth 搭載の携帯電話が手元にあるなら、マウスをペアリングモードにし、携帯でサーチかけてもいいです。というか、そうやって見付けましたw
Bluetooth を on に。up を down にすると off になります。
# btconfig ubt0 up
# btconfig
ubt0: bdaddr 00:23:6c:xx:xx:xx flags UP RUNNING XMIT_CMD XMIT_ACLXMIT_SCO INIT_BDADDRINIT_BUFFER_SIZINIT_FEATURES
Bluetooth 機器の検索。
お、MacBook Late 2006 も見付けてますね。2 番が Kensington SlimBlade Trackball Mouse です。って、きちんとアドレス見えてるじゃないですか。携帯で云々いらないじゃないですか orz
知らない人の携帯も拾ってますね。
# btconfig ubt0 inquiry
Device Discovery from device: ubt0 ...... 3 responses
1: bdaddr 00:17:f2:xx:xx:xx
: name "kazus's MacBook"
: class: [0x38010c] Laptop Computer <Capturing> <Object Transfer> <Audio>
: page scan rep mode 0x01
: clock offset 30934
2: bdaddr 00:02:76:xx:xx:xx (Slimblade)
: name "Kensington SlimBlade Trackball Mouse"
: class: [0x002580] Peripheral Mouse <Limited Discoverable>
: page scan rep mode 0x01
: clock offset 1099
3: bdaddr 00:xx:xx:xx:xx:xx
: name "912SH"
: class: [0x5a0204] Cellular Phone <Networking> <Capturing> <Object Transfer>
<Telephony>
: page scan rep mode 0x01
: clock offset 7748
/etc/bluetooth/hosts に、00:0076:xx:xx:xx slimblade と登録。
あとは、こいつと接続するためのコマンドを投入。
# btdevctl -a slimblade -d ubt0 -m none -s HID -Aこれで、使えるようになります。
descriptor_type: 34
descriptor_length: 0x78
接続を切るには、こんな感じ。
# btdevctl -a slimblade -d ubt0 -s HID -D
おお、Trackball が Wheel として動作しますよ。これはいいなぁ。
ただし、接続を切る(あるいは切れる)度に、mouse をペアリングモードにしてから、 btdevctl で接続コマンドを叩く必要があるので、ちょっと面倒。
まだ、ON にも統合されていなかったり、genunix や sockfs module を入れ替えたりするので、ちょっと危険なものではありますが期待したい機能です。
(mouse だけじゃなくって、PAN ができるようになれば神機能でつね)
