LinuxでBluetoothの名前を変えたい
コロナ禍で初の自作PCを組んだのですが、皆さんはホスト名ってどうしていますか?メーカー製なら決まった名前、Windowsだとデフォルトでランダムな英数字、Fedora、openSUSEだとlocalhostだったり、Ubuntu系はインストール時に自分で決めたりetc..。ラップトップ、デスクトップとLinuxを複数動かして名前が被っても面倒なので変えたい、と思ったら引っかかったのでメモ。
今回の環境
- 自作PC
 - openSUSE Tumbleweed
 - GNOME desktop
 
ホスト名と分かれている..らしい
YaSTツールでホスト名を変えて、ターミナル上で変更を確認したのですがBluetoothの設定画面を覗いても変わっていなかったので、一緒に変えてくれるわけではないようでした。
そこでhciconfigを開こうとしたら、無くなっていたんですね。
hcitoolやhciconfigはBlueZに同梱されず
参照:https://wiki.archlinux.jp/index.php/Bluetooth#.E3.82.A4.E3.83.B3.E3.82.B9.E3.83.88.E3.83.BC.E3.83.AB
ラズパイだと使ってた気がしたけど、バージョンが古かったのか..?
なら代替品は?
非推奨なら入れて使う気にもならないしということでBlueZ自体に変わりがあるだろうと、helpを見ると
    [bluetooth]# help
    Menu main:
    Available commands:
    -------------------
    advertise                                         Advertise Options Submenu
    scan                                              Scan Options Submenu
    gatt                                              Generic Attribute Submenu
    list                                              List available controllers
    show [ctrl]                                       Controller information
    select <ctrl>                                     Select default controller
    devices                                           List available devices
    paired-devices                                    List paired devices
    system-alias <name>                               Set controller alias
    reset-alias                                       Reset controller alias
    power <on/off>                                    Set controller power
    pairable <on/off>                                 Set controller pairable mode
    discoverable <on/off>                             Set controller discoverable mode
    discoverable-timeout [value]                      Set discoverable timeout
    agent <on/off/capability>                         Enable/disable agent with given       capability
    default-agent                                     Set agent as the default one
    advertise <on/off/type>                           Enable/disable advertising with       given type
    set-alias <alias>                                 Set device alias
    (以下省略)
それらしきを発見ということで、さっそく
[bluetooth]# system-alias hogehoge

