VMware ゲストにDS4を接続してみた (Bluetooth編)
VMware にインストールした Ubuntu1.04 にDS4 (Sony DualShock4) を接続してみました。今回はBluetoothで接続した際のメモです。
下記のようなブログもあります。
1.動作環境
2.確認
接続されているUSBデバイスを確認する
$ lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub $
上記のように Bluetooth インターフェスが接続されていなければ
「Player(P)」メニュー →「管理 (M)」→ 「仮想マシン設定 (S)」をクリック
ポップアップした仮想マシン設定ダイアログの「USBコントローラ」をクリックして、「Bluetooth デバイスを仮想マシンと共有 (B)」のチェックを外し、[OK]をクリック。
再度接続されているUSBデバイスを確認する。2行目がBluetoothインタフェースの模様。
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 04c5:14b9 Fujitsu, Ltd Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub $
$ hciconfig $
何も接続されていないので、UbuntuにBluetoothデバイスを接続する。
[Player(P)]メニューの[取外し可能デバイス(R)] → [Fujitsu Bluetooth Radio] → [接続 (ホストから切断) (C)]
仮想マシンへの接続を確認するダイアログがポップアップするので、[OK] をクリック。
$ hciconfig hci0: Type: Primary Bus: USB BD Address: 80:78:71:1B:59:C3 ACL MTU: 1021:6 SCO MTU: 255:12 UP RUNNING PSCAN RX bytes:779 acl:0 sco:0 events:59 errors:0 TX bytes:3241 acl:0 sco:0 commands:59 errors:0 $
3.ペアリング
Bluetoothインタフェースが接続されたので、DS4 をペアリングする。
$ sudo ds4drv [sudo] ...... のパスワード: [info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event5 (evdev) [info][bluetooth] Scanning for devices
DS4 の[SHARE] ボタンと 二つのジョイスティックの間にある [PS] ボタンを、LEDが点滅するまで同時押し。ペアリングが完了すると、ターミナル・ウィンドウに下記のようなメッセージが出力される。
[info][bluetooth] Found device A4:AE:12:9A:8D:AC [info][controller 1] Connected to Bluetooth Controller (A4:AE:12:9A:8D:AC) [info][bluetooth] Scanning for devices [info][controller 1] Battery: Fully charged
別のターミナル・ウィンドウを立ち上げて([Ctrl] + [Alt] + [T])、/dev/input ディレクトリをチェックしてみる。
$ ls /dev/input
by-id event0 event2 event4 js0 mouse0 mouse2
by-path event1 event3 event5 mice mouse1
$
js0がジョイスティク、あとマウスとイベントが追加されている。