bluetoothマウス:scpup64、upupbb/cc

当初、先人方の情報を参考に構築したが ビジュアルには行かなかった。
キッパリ諦め、シンプルに bluetooth接続だけに止めた。

bluetoothなんて搭載してない PCなので…ELECOMの LBT-UAN05C2を USBに接続。

LBT-UAN05C2を 刺したり、抜いたりする度に dmesgすると…
・dmesg | grep USB

usb 1-1.2: new low-speed USB device number 3 using ehci-pci
usb 2-1.1: new full-speed USB device number 3 using ehci-pci
抜き刺ししてまた dmesgすると…
usb 2-1.1: USB disconnect, device number 3
usb 2-1.1: new full-speed USB device number 4 using ehci-pci
反応はしてる。
刺した状態で、
# lsusb
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
いいじゃん「Bluetooth Dongle」って認識してるじゃん。

 

bluez_5.48
「Puppyパッケージマネージャ」でインストール。
インストール後、/etc/init.d/bluetooth
BLUETOOTH_ENABLED=0 → 1 に変更。
#これで upup起動で daemonしてくれそうなのだが…???
だめだったので、自分の「~Startup/startup_personal」に↓を記載。
-----------------------------------------------
#!/bin/sh

〜 略 〜
/etc/init.d/bluetooth start
〜 略 〜
-----------------------------------------------

PC再起動。

 

正常にインストールされていれば「bluetoothd」ってのが PC起動から常駐している(システム →タスクマネージャ)。設定コマンド(bluetoothctl)はそれと 話すらしい(?)
daemonとつながると、プロンプトが [bluetooth]# になった。
以下、見難いので、打ち込んだコマンド太文字表記。

 

LXTerminalを起動して、
# bluetoothctl
[NEW] Controller 00:1B:DC:0A:E4:EC BlueZ 5.46 [default]
Agent registered

↓ プロンプトが変る。「show」コマンドで現状のコントローラの状況が見れる。
[bluetooth]# show
Controller 00:1B:DC:0A:E4:EC
Name: BlueZ 5.46
Alias: BlueZ 5.46
Class: 0x00010c
Powered: yes
Discoverable: no
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
~ 略 ~
↑の「Powered: yes」だが、念のため↓
[bluetooth]# power on
Changing power on succeeded
「pairable on」ってコマンドもあるようだ。

・ここでマウスのペアリングボタンを押して…puppy側からのスキャン開始。
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1B:DC:0A:E4:EC Discovering: yes
[NEW] Device 0C:FC:83:20:53:AD Bluetooth optical Mouse
↑見つけたようですな…

・ホッとくと定期的に表示されてウッといので… scan off↓
[bluetooth]# scan off
[CHG] Device 0C:FC:83:20:53:AD RSSI is nil
[CHG] Controller 00:1B:DC:0A:E4:EC Discovering: no
Discovery stopped
これでマウスの IDが「0C:FC:83:20:53:AD」ってのは分かった。
MACアドレスだよな(?)

・これ以降は↓のコマンドでも 確認する事ができる。
[bluetooth]# devices
Device 0C:FC:83:20:53:AD Bluetooth optical Mouse
それでは、本ちゃんペアリング。

・マウス側が既にタイムアウトしていると混乱するので、ここでマウス再起動 →ペアリングボタン押した方がよいかも…
[bluetooth]# pair 0C:FC:83:20:53:AD
Attempting to pair with 0C:FC:83:20:53:AD
[CHG] Device 0C:FC:83:20:53:AD Connected: yes
[CHG] Device 0C:FC:83:20:53:AD Modalias: usb:v0A5Cp0001d0129
[CHG] Device 0C:FC:83:20:53:AD UUIDs: 00001000-0000-1000-8000-00805f9b34fb
~ 略 ~
[CHG] Device 0C:FC:83:20:53:AD ServicesResolved: yes
[CHG] Device 0C:FC:83:20:53:AD Paired: yes
Pairing successful
[CHG] Device 0C:FC:83:20:53:AD ServicesResolved: no
[CHG] Device 0C:FC:83:20:53:AD Connected: no53:AD
↑「Pairing successful」なので、採用します。
[Bluetooth optical Mouse]# trust 0C:FC:83:20:53:AD
[CHG] Device 0C:FC:83:20:53:AD Trusted: yes
Changing 0C:FC:83:20:53:AD trust succeeded
#このシェル…どん臭いのか? スペース多いだけで↓失敗する…orz
#[bluetooth]# trust   0C:FC:83:20:53:AD
#Device 0C:FC:83:20:53:AD not available


・これで登録されたはず。↓確認しておきます。
[bluetooth]# info 0C:FC:83:20:53:AD
Device 0C:FC:83:20:53:AD
Name: Bluetooth optical Mouse
Alias: Bluetooth optical Mouse
Class: 0x002580
Icon: input-mouse
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: yes
UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v0A5Cp0001d0129

・それでは、マウスに接続
[bluetooth]# connect 0C:FC:83:20:53:AD
Attempting to connect to 0C:FC:83:20:53:AD
Connection successful
[CHG] Device 0C:FC:83:20:53:AD Connected: yes
[CHG] Device 0C:FC:83:20:53:AD ServicesResolved: yes

・ここからマウスが使える様になった。更に↓プロンプトが [Bluetooth optical Mouse]# に変わる。
[Bluetooth optical Mouse]# info 0C:FC:83:20:53:AD
Device 0C:FC:83:20:53:AD
Name: Bluetooth optical Mouse
Alias: Bluetooth optical Mouse
Class: 0x002580
Icon: input-mouse
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: yes
~ 略 ~
よさそうじゃない?
↓さらに念のため、ペアリング済みのデバイスを見てみると…
[Bluetooth optical Mouse]# paired-devices
Device 0C:FC:83:20:53:AD Bluetooth optical Mouse
後は、exit で抜けて、PC再起動。


デスクトップ表示まで進むと、マウス使える。