Linksys E8450 AX3200はEasyMeshでバッファローの子機にもできるけど5GHzが4チャンネルしか使えない

LinksysのWi-Fiルータ E7350とE8450がEasyMeshに対応した、というニュースとツイートに遭遇した。

https://twitter.com/JapanLinksys/status/1431251402114969605
.

Amazonで見てみたら、Amazonアウトレット扱いでE7350が4791円、E8450が6204円だった。

というわけでLinksys E8450 AX3200を買って、firmwareを1.0.01.101415から1.1.00.180912へアップデートしてからいろいろやってみた。

W52周波数帯しか使えない問題

ウィザード形式の設定を飛ばして、設定画面を見てみると、なんと5GHzで使用できるチャネル設定が36,40,44,48chの4つしかない。

この4chはW52と呼ばれる周波数帯で、2021年現在の日本では他にW53の52,56,60,64ch、と、W56の100,104,108,112,116,120,124,128,132,136,140chが使えるのが普通である。

サポートに問い合わせて見たが、2021/09/10時点ではW52しか選択できない件について明確な回答は得られていない。

2021/09/27追記:なんと技適はW52範囲でしか取得していないということが判明。まさかの仕様!

他社のEasyMesh親機につなげるか問題

さて、今回このLinksys E8450はEasyMeshの子機として使うために購入した。

既存環境はバッファローのWSR-1800AX4で、2021年6月に「バッファローWSR-1800AX4をEasyMesh対応にしてみた」で書いたように構成したものとなる。

この環境にE8450を子機として設定する手順は「LinksysデュアルバンドEasyMeshWiFiルーターへの子ノードの追加方法」にある「WPSボタンを使用してEasyMesh子ノードを追加する方法」を使用した。

親機となるバッファローWSR-1800AX4の管理画面からWPSボタンを押した後、E7450背面のWPSボタン(物理)を3秒押して、電源ランプが点滅するのを確認して手を放します。

しばらくすると、子機の電源ランプとインターネットランプが青で点灯します。

そして、親機のWSR-1800AX4の管理画面上では「機器名:Other」として登録されているのが確認出来ます。

・・・接続帯域が「2.4G」となっていますね。

これは既存環境のWSR-1800AX4で使っている5GHz帯が140chチャンネルで、E8450がサポートしていないチャンネルであるから接続出来なかったようです。

試しにWSR-1800AX4のチャンネルを40chに変更してから再試行すると、ちゃんと「接続帯域:5G」となります。

念のためW53の60chでも試してみたところ2.4GHz接続となり、E8450ではW52以外のチャンネルは使用できないようです。

EasyMesh子機の管理画面にアクセスできない

結構な問題だと思うのですが、E8450をEasyMesh子機とした場合、そのE8450の管理画面にアクセスできなくなります。

英語のLivechatサポートに確認したところ、子機の管理画面は親機となるE8450から一括管理できる、という話で、メーカー違いの場合は管理できないようです。

このため、実は上記で親機のチャンネル変更を行った場合、E8450が設定をアップデートとかしてくれなかったので、毎回E8450を初期化して、1から設定をやり直していました。

Linksysメッシュルーターを工場出荷時のデフォルト設定にリセットする」にあるように、E8450が起動状態にあるときにリセットボタンを10秒ぐらい押しつづけ、赤点滅をしはじめて処理がはじまったところで、ボタンを放すと初期化が開始されます。

異機種混在はメーカ保証対象外なんでしょうけど、単体で設定出来る手法は用意してほしかったものです・・・


2022/05/06追記

openwrtに「Linksys E8450 (aka. Belkin RT3200)」というページがあり、snapshot版22.03で対応している。

snapshot版を入れた人の話では、5GHzはW52,W53,W56がちゃんと使えるそうだ。

Xperia XZsにGSIイメージを書き込んだ

秋葉原でXperia XZs G8232を4400円で入手した。

調べて見るとGSIイメージを書き込むという手法があるようでFIRE & TECH「Xperia XZs の ROM 焼き」で紹介されていた。

ファイルの配布元はxda-forumの「[10.0] Project Treble for Xperia XZs [2020.03.18]」で、どういうことをやっているのかは「Fake Treble for Xperia XZ」に書かれている。

まずはXperia XZsのbootloader unlockをするために、設定画面から「OEMロック解除」を有効にする。

で、IMEI調べて、sonyの「Unlock Bootloader」でbootloader unlockのコードを申請して入手。

電源オフ状態でボリューム↑ボタンを押しながらUSBケーブルでパソコンに接続すると、fastbootモードで起動します。

起動するとXZs左上のランプが青く点灯し、パソコンから「fastboot devices」を実行するとデバイスが表示されます。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot.exe devices
BH9011Gxxxx      fastboot

C:\Program Files (x86)\Android\android-sdk\platform-tools>

続いて申請して表示された文字列の先頭に0xを付け加えて「fastboot oem unlock 0x~」と入力します。

最初間違えて0xをつけないで実行してしまったのでエラーになっています。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot oem unlock 570C856D14FAxxxx
                                                   FAILED (remote: 'Incorrect format for unlock data. Should be on the form "0x')
fastboot: error: Command failed

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot oem unlock 0x570C856D14FAxxxx
                                                   OKAY [  2.055s]
Finished. Total time: 2.059s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

Treble-10.0-keyaki-4.9-sjll-V2.10.zipのHow-to-flash.txtは下記の様に書いてあります。

Format Data
fastboot flash oem vendor.img
fastboot flash boot boot.img
fastboot flash system <GSI Image>

GSI should be A/B type, Never use A-Only!

For XZs, you can use the twrp of X Performance or XZ's.

NEVER, NEVER flash Sony Open devices oem image!!!!!!

まずは「Format Data」ということで「fastboot -w」(Wipe)を実行します。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot -w
Erasing 'userdata'                                 OKAY [  0.385s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 13089792 4k blocks and 3276800 inodes
Filesystem UUID: f9136b0e-0b12-11ec-a6fc-fda6154f283e
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'userdata' (4396 KB)                       OKAY [  0.144s]
Writing 'userdata'                                 OKAY [  0.059s]
Erasing 'cache'                                    OKAY [  0.026s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 65536 4k blocks and 65536 inodes
Filesystem UUID: f96341ce-0b12-11ec-b52e-2ff551a4869a
Superblock backups stored on blocks:
        32768

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'cache' (120 KB)                           OKAY [  0.025s]
Writing 'cache'                                    OKAY [  0.026s]
Finished. Total time: 1.213s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

続いて Treble-10.0-keyaki-4.9-sjll-V2.10.zipの vendor.imgをOEM領域に書き込みます。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash oem F:\download\android\xperia-xzs\vendor.img
Sending 'oem' (248608 KB)                          OKAY [  6.827s]
Writing 'oem'                                      OKAY [  1.871s]
Finished. Total time: 8.853s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

Treble-10.0-keyaki-4.9-sjll-V2.10.zipのHow-to-flash.txt の boot.imgをboot領域に書き込みます。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash boot F:\download\android\xperia-xzs\boot.img
Sending 'boot' (12368 KB)                          OKAY [  0.366s]
Writing 'boot'                                     OKAY [  0.110s]
Finished. Total time: 0.530s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

最後にGSIイメージをsystem領域に書き込みます。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android10\system-quack-arm64-ab-gapps_v222.img
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 480526784 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 212095424 is not a multiple of the block size 4096
Sending sparse 'system' 1/3 (262140 KB)            error: write_sparse_skip_chunk: don't care size 480526784 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 480526784 is not a multiple of the block size 4096
OKAY [  7.512s]
Writing 'system'                                   FAILED (remote: 'buffer overreads occured due to invalid sparse header')
fastboot: error: Command failed

C:\Program Files (x86)\Android\android-sdk\platform-tools>

エラーとなりました。

よく調べてみたところ、img.xzのはずなのですが、imgとしてファイルが保存されていたための問題でした。

xzファイルを展開して再チャレンジ

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android10\system-quack-arm64-ab-gapps_v222.img
Sending sparse 'system' 1/9 (262140 KB)            OKAY [  7.497s]
Writing 'system'                                   OKAY [  2.023s]
Sending sparse 'system' 2/9 (262140 KB)            OKAY [  7.572s]
Writing 'system'                                   OKAY [  2.050s]
Sending sparse 'system' 3/9 (262140 KB)            OKAY [  7.548s]
Writing 'system'                                   OKAY [  2.035s]
Sending sparse 'system' 4/9 (262140 KB)            OKAY [  7.650s]
Writing 'system'                                   OKAY [  2.101s]
Sending sparse 'system' 5/9 (262140 KB)            OKAY [  7.672s]
Writing 'system'                                   OKAY [  2.102s]
Sending sparse 'system' 6/9 (262140 KB)            OKAY [  7.673s]
Writing 'system'                                   OKAY [  2.060s]
Sending sparse 'system' 7/9 (262140 KB)            OKAY [  7.645s]
Writing 'system'                                   OKAY [  1.984s]
Sending sparse 'system' 8/9 (262140 KB)            OKAY [  7.641s]
Writing 'system'                                   OKAY [  2.068s]
Sending sparse 'system' 9/9 (183260 KB)            OKAY [  5.354s]
Writing 'system'                                   OKAY [  1.434s]
Finished. Total time: 91.779s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

今度は成功です。

再起動します。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot
Rebooting                                          OKAY [  0.002s]
Finished. Total time: 0.003s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

で・・・Android 10で起動しました。

続いて、Android 11のGSIが使えるのか確認。

「fastboot -w」でフォーマット

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot devices
BH9011Gxxx      fastboot

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot -w
Erasing 'userdata'                                 OKAY [  1.073s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 13089792 4k blocks and 3276800 inodes
Filesystem UUID: 4150c0de-0b17-11ec-9cae-af9c3c428626
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'userdata' (4396 KB)                       OKAY [  0.156s]
Writing 'userdata'                                 OKAY [  0.061s]
Erasing 'cache'                                    OKAY [  0.030s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 65536 4k blocks and 65536 inodes
Filesystem UUID: 41a1c326-0b17-11ec-a365-bd86ad12ab05
Superblock backups stored on blocks:
        32768

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'cache' (120 KB)                           OKAY [  0.022s]
Writing 'cache'                                    OKAY [  0.024s]
Finished. Total time: 1.819s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

続いてGSIをsystem領域に書き込みます。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android11\system-roar-arm-ab-gogapps_v312.img
Sending sparse 'system' 1/6 (262140 KB)            OKAY [  7.562s]
Writing 'system'                                   OKAY [  1.975s]
Sending sparse 'system' 2/6 (262140 KB)            OKAY [  7.591s]
Writing 'system'                                   OKAY [  2.083s]
Sending sparse 'system' 3/6 (262140 KB)            OKAY [  7.653s]
Writing 'system'                                   OKAY [  2.028s]
Sending sparse 'system' 4/6 (262140 KB)            OKAY [  7.713s]
Writing 'system'                                   OKAY [  2.085s]
Sending sparse 'system' 5/6 (262140 KB)            OKAY [  7.679s]
Writing 'system'                                   OKAY [  2.018s]
Sending sparse 'system' 6/6 (243672 KB)            OKAY [  7.158s]
Writing 'system'                                   OKAY [  1.923s]
Finished. Total time: 61.099s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

再起動

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot
Rebooting                                          OKAY [  0.010s]
Finished. Total time: 0.013s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

Xperiaロゴが出たあと、電源が切れ、再びfastbootモードになってしまいました。

今度は省略したところも全て再実行

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot -w
Erasing ‘userdata’ OKAY [ 1.073s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 13089792 4k blocks and 3276800 inodes
Filesystem UUID: 4150c0de-0b17-11ec-9cae-af9c3c428626
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Sending ‘userdata’ (4396 KB) OKAY [ 0.156s]
Writing ‘userdata’ OKAY [ 0.061s]
Erasing ‘cache’ OKAY [ 0.030s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 65536 4k blocks and 65536 inodes
Filesystem UUID: 41a1c326-0b17-11ec-a365-bd86ad12ab05
Superblock backups stored on blocks:
32768

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Sending ‘cache’ (120 KB) OKAY [ 0.022s]
Writing ‘cache’ OKAY [ 0.024s]
Finished. Total time: 1.819s

C:\Program Files (x86)\Android\android-sdk\platform-tools>
C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android11\system-roar-arm-ab-gogapps_v312.img
Sending sparse ‘system’ 1/6 (262140 KB) OKAY [ 7.562s]
Writing ‘system’ OKAY [ 1.975s]
Sending sparse ‘system’ 2/6 (262140 KB) OKAY [ 7.591s]
Writing ‘system’ OKAY [ 2.083s]
Sending sparse ‘system’ 3/6 (262140 KB) OKAY [ 7.653s]
Writing ‘system’ OKAY [ 2.028s]
Sending sparse ‘system’ 4/6 (262140 KB) OKAY [ 7.713s]
Writing ‘system’ OKAY [ 2.085s]
Sending sparse ‘system’ 5/6 (262140 KB) OKAY [ 7.679s]
Writing ‘system’ OKAY [ 2.018s]
Sending sparse ‘system’ 6/6 (243672 KB) OKAY [ 7.158s]
Writing ‘system’ OKAY [ 1.923s]
Finished. Total time: 61.099s

C:\Program Files (x86)\Android\android-sdk\platform-tools>
C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot
Rebooting OKAY [ 0.010s]
Finished. Total time: 0.013s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot devices
BH9011G172 fastboot

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot -w
Erasing ‘userdata’ OKAY [ 0.722s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 13089792 4k blocks and 3276800 inodes
Filesystem UUID: e9ea269a-0b17-11ec-8cba-a17b44c778c4
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Sending ‘userdata’ (4396 KB) OKAY [ 0.145s]
Writing ‘userdata’ OKAY [ 0.061s]
Erasing ‘cache’ OKAY [ 0.026s]
mke2fs 1.45.4 (23-Sep-2019)
Creating filesystem with 65536 4k blocks and 65536 inodes
Filesystem UUID: ea381fe4-0b17-11ec-b1f1-f1b13df9e489
Superblock backups stored on blocks:
32768

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Sending ‘cache’ (120 KB) OKAY [ 0.023s]
Writing ‘cache’ OKAY [ 0.026s]
Finished. Total time: 1.443s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash oem F:\download\android\xperia-xzs\vendor.img
Sending ‘oem’ (248608 KB) OKAY [ 6.746s]
Writing ‘oem’ OKAY [ 1.910s]
Finished. Total time: 8.825s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash boot F:\download\android\xperia-xzs\boot.img
Sending ‘boot’ (12368 KB) OKAY [ 0.426s]
Writing ‘boot’ OKAY [ 0.116s]
Finished. Total time: 1.085s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android11\system-roar-arm-ab-gogapps_v312.img
Sending sparse ‘system’ 1/6 (262140 KB) OKAY [ 7.523s]
Writing ‘system’ OKAY [ 2.121s]
Sending sparse ‘system’ 2/6 (262140 KB) OKAY [ 7.584s]
Writing ‘system’ OKAY [ 2.055s]
Sending sparse ‘system’ 3/6 (262140 KB) OKAY [ 7.543s]
Writing ‘system’ OKAY [ 2.071s]
Sending sparse ‘system’ 4/6 (262140 KB) OKAY [ 8.527s]
Writing ‘system’ OKAY [ 2.036s]
Sending sparse ‘system’ 5/6 (262140 KB) OKAY [ 7.556s]
Writing ‘system’ OKAY [ 2.058s]
Sending sparse ‘system’ 6/6 (243672 KB) OKAY [ 7.044s]
Writing ‘system’ OKAY [ 1.945s]
Finished. Total time: 61.023s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot
Rebooting OKAY [ 0.002s]
Finished. Total time: 0.005s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

….やっぱりダメですね。

2021/09/04追記:よく見たらarmイメージを書き込んでいました。arm64じゃん・・・

Google配布のAndroid 12のGSIイメージを書き込めるかもチャレンジ

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system F:\download\android\xperia-xzs\GSI-Android12\system.img
Invalid sparse file format at header magic
Sending sparse 'system' 1/10 (262104 KB)           OKAY [  7.717s]
Writing 'system'                                   OKAY [  2.124s]
Sending sparse 'system' 2/10 (262128 KB)           OKAY [  7.544s]
Writing 'system'                                   OKAY [  2.070s]
Sending sparse 'system' 3/10 (262112 KB)           OKAY [  7.527s]
Writing 'system'                                   OKAY [  2.053s]
Sending sparse 'system' 4/10 (262128 KB)           OKAY [  7.672s]
Writing 'system'                                   OKAY [  2.073s]
Sending sparse 'system' 5/10 (262124 KB)           OKAY [  7.563s]
Writing 'system'                                   OKAY [  2.073s]
Sending sparse 'system' 6/10 (262124 KB)           OKAY [  7.524s]
Writing 'system'                                   OKAY [  2.021s]
Sending sparse 'system' 7/10 (262116 KB)           OKAY [  7.516s]
Writing 'system'                                   OKAY [  2.044s]
Sending sparse 'system' 8/10 (262084 KB)           OKAY [  7.550s]
Writing 'system'                                   OKAY [  2.147s]
Sending sparse 'system' 9/10 (262128 KB)           OKAY [  7.798s]
Writing 'system'                                   OKAY [  2.051s]
Sending sparse 'system' 10/10 (126492 KB)          OKAY [  3.675s]
Writing 'system'                                   OKAY [  6.845s]
Finished. Total time: 104.423s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot
Rebooting                                          OKAY [  0.003s]
Finished. Total time: 0.007s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

SONYロゴのままハングアップ。電源ボタン長押しでのoffも出来なくなりました。

ということで、Xperia XZsのfake GSIで使えるのはAndroid 10のみということですね。


TWRPを書き込めるか確認:twrp-q-V1.img

fastbootモードにしてからrecovery領域に書き込んだ。

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash recovery F:\download\android\xperia-xzs\twrp-q-V1.img
Sending 'recovery' (20056 KB)                      OKAY [  0.706s]
Writing 'recovery'                                 OKAY [  0.158s]
Finished. Total time: 1.418s

C:\Program Files (x86)\Android\android-sdk\platform-tools>

Androidが起動してからadb reboot recoveryでTWRPが起動することを確認

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb reboot recovery

C:\Program Files (x86)\Android\android-sdk\platform-tools>

なお、ボリューム↓+電源ボタンで起動してもTWRPが起動する。

Andy Yan’s personal builds // GSI にあるLineageOS 17.1のテストと、GAppが書き込めるか確認

きちんと書き込めて、TWRP経由でNikGAppsのNikGapps-stock-arm64-10-20210815-signed.zipを書き込み、Lineage OS 17.1上でGappsが使えることを確認しました。


Android 11 Custom Rom for the Xperia XZs に下記のAndroid11を試した、という話が書かれていた。
 Pixel Experience Plus and non-Plus
 Corvus OS
 Havoc OS

開発者向け資料のGeneric System Imageを確認すると、/system/etc/ld.config.数字.txt 内の[vendor]セクションで「namespace.default.isolated=true」となっていれば、いいらしい。

Vendor Native Development Kit(VNDK)のバージョンは 下記の様に26~29 で定義されていた。

keyaki:/ $ ls -l /system/etc/ld*
-rw-r--r-- 1 root root 34755 2020-08-06 05:16 /system/etc/ld.config.26.txt
-rw-r--r-- 1 root root 39324 2020-08-06 05:16 /system/etc/ld.config.27.txt
-rw-r--r-- 1 root root 39844 2020-08-06 05:16 /system/etc/ld.config.28.txt
-rw-r--r-- 1 root root 40252 2020-08-06 05:16 /system/etc/ld.config.29.txt
-rw-r--r-- 1 root root 27897 2020-08-06 05:16 /system/etc/ld.config.vndk_lite.txt
keyaki:/ $

一番新しい 29 というのはAndroid 10ということらしい。このため、少なくともAndroid 10のGSIは使える、ということになる。

それ以降のバージョンを使えるかを /system/etc/ld.config.29.txt の該当部分を確認すると下記のようになっていた。

<略>
[vendor]
additional.namespaces = runtime,system,vndk

###############################################################################
# "default" namespace
#
# This is the default linker namespace for a vendor process (a process started
# from /vendor/bin/*). The main executable and the libs under /vendor/lib[64]
# are loaded directly into this namespace. However, other libs under the system
# partition (VNDK and LLNDK libraries) are not loaded here but from the
# separate namespace 'system'. The delegation to the system namespace is done
# via the 'namespace.default.link.system.shared_libs' property below.
#
# '#VNDK27#' TAG is only for building ld.config.27.txt for backward
# compatibility. (TODO:b/123390078) Move them to a separate file.
###############################################################################
namespace.default.isolated = true
namespace.default.visible = true
<略>

namespace.default.isolated = true となっているので、使えてもおかしくはないはず、ということになりそうだ。

次に、こちらでは Phhusson’s AOSP で試したが、動いたとしているGSIは Pixel Experience Plus and non-Plus, Corvus OS, Havoc OSとの差を考察してみる。

Pixel Experience Plus and non-Plus はPhhusson’s AOSPをベースとしているが配布イメージに vndkliteとついているバージョンがある。


Corvus OS にもvndkliteバージョンがある。

Havoc OSにはvndkliteバージョンがない。そして2020/12/30と更新が古い。

違い?と想定されるVNDK Liteについて調べると、開発者向け資料に記載があった。

Android10については今回使用しているvendorイメージがAndroid 10向けに作成したものなのでVNDKイメージが使用できているが、それ以外については、元々はXperia XZsはAndroid 8.xデバイスなのでVNDK Lite構成でないと動かない、ということではないか、という仮説を立てた。

はたして?

CHUWEI HiPad Proを買ったらがっかりペンタブレットだった件

スナドラ662で、メモリ8GB、ストレージ128GBというスペックにひかれてCHUWEI HiPad Proをペン付きで購入してみました。

8月5日に発送連絡があって、到着したのが8月17日でした。

追加送料払ってなかったのでもっと時間がかかるのかと思っていたら2週間かからないという予想外の到着でした。

ペン付きで買ったので2つ届きました。

裏面は綺麗な感じですね

添付のペンはHiPen H6とありました。

起動後の初期設定は普通のAndroidなので飛ばして、firmware updateを行います。

ここ、メッセージを読み飛ばしていたのですが、アップデート後の再起動でかならず下記の画面でブート失敗します。

画像

ボリュームの下ボタンを押して「Factory data Reset」を実行して初期化をする必要がある、ということです。

なので、ファームウェアアップデートが完了するまでGoogleアカウントの登録などの詳しい設定を行ってはいけない、ということですね。

さて、とりあえず原神を起動して様子見・・・

うーん・・・いまいち

次・・・ペンの動作がどうか確認。

手持ちにWacom Bamboo Inkペンがあったので、今回買ったHiPen H6を並べて見る。

だいたい同じサイズ。

画像

ペン先のサイズがちょっと違うっぽい(なお、Bamboo Inkのが斜めにみえるのは、曲げてしまってしまったため)

HiPad ProはMPP(Microsoft Pen Protocol)採用という話なので、Bamboo InkをMPPモードで電源を入れると使える様になる。

Bamboo Inkで書いた時と

HiPen H6で書いた時と比べると結構筆圧動作が違ってて興味深かったです。

・・・ここまではそんなに問題なさそうに見えますよね

ところが・・・

見ての通りに

ペンの動きに対して、描画が遅すぎる

この動作、CLIP STUDIOだけでなくKritaでも、筆圧検知自体は出来ているけど、遅延が酷い状態でした。

画像

よって、絵描き用途としてまったく向かない感じでした。

このCHUWEI HiPad Proですが、事前にAmazon PrimeがHDで見れる、というのもあったのですが、ChinaR「【CHUWI HiPad Proレビュー】WideVine L1認証済みのCHUWI HiPad ProはAmazonプライムビデオのHD再生に非対応(CHUWI HiPad Pro Don’t Support HD On Amazon Prime Video, Although Got WideVIne L1)」にあるように対応できてない、とかいう問題もあります。

とりあえず、うちのHiPad Proは2万円分のネタになってもらえるように、他の人に貸し出して楽しんでもらうつもりです

pythonのtwitterモジュールで特定ユーザの発言を取得する

twitterのspaceによる音声配信は、m3u8ファイルを使用してのhttpsによるaacファイルの配布という形で実現されている。

streamlinkにm3u8ファイルのURLを与えると音声ファイルが取得できるので、これを自動化できないか検討している。

まず第1歩として、指定したユーザのタイムラインでspace配信のURLがあった場合に検出できないかを確認。

単純にwgetやcurlで「curl -s https://twitter.com/niselog/」とやっても発言は拾えない。

python-twitterのマニュアルを見ながらpythonスクリプトを作成

#!/usr/bin/python

import os
import twitter

token='文字列'
token_secret='文字列'
consumer_key = '文字列'
consumer_secret='文字列'

t = twitter.Api(consumer_key=consumer_key,
        consumer_secret=consumer_secret,
        access_token_key=token,
        access_token_secret=token_secret)

for line in t.GetUserTimeline(screen_name="niselog"):
        print line

これを実行すると、下記の様な出力になる

-bash-4.2$ ./test3.py |tail -2
{"created_at": "Sat May 14 08:13:22 +0000 2016", "hashtags": [{"text": "\u30b1\u30eb\u30d9\u30ed\u30b9\u30d6\u30ec\u30a4\u30c9"}], "id": 731396977758339072, "id_str": "731396977758339072", "lang": "ja", "source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>", "text": "\u507d\u30ed\u30b0 for #\u30b1\u30eb\u30d9\u30ed\u30b9\u30d6\u30ec\u30a4\u30c9 \u306f\u30b1\u30eb\u30d9\u30ed\u30b9\u8d85\u4f1a\u8b70\u306e\u4e00\u89a7\u30da\u30fc\u30b8\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f https://t.co/gDlRyiFWC3", "urls": [{"expanded_url": "http://tw5.niselog.jp/", "url": "https://t.co/gDlRyiFWC3"}], "user": {"created_at": "Mon Mar 01 05:51:23 +0000 2010", "default_profile": true, "default_profile_image": true, "description": "\u30c8\u30df\u30fc\u30a6\u30a9\u30fc\u30ab\u30fcPBW \u7121\u9650\u306e\u30d5\u30a1\u30f3\u30bf\u30b8\u30a2/\u30b7\u30eb\u30d0\u30fc\u30ec\u30a4\u30f3/\u30a8\u30f3\u30c9\u30d6\u30ec\u30a4\u30ab\u30fc\uff01/\u30b5\u30a4\u30ad\u30c3\u30af\u30cf\u30fc\u30c4\u3078\u306e\u643a\u5e2f\u5411\u3051\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u30b5\u30fc\u30d3\u30b9\u300c\u507d\u30ed\u30b0\u300d\u306e\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3059\u3002 http://t.co/QMKlQjzjSI http://t.co/YEiNJUvGdU", "followers_count": 40, "id": 118604209, "id_str": "118604209", "listed_count": 5, "name": "niselog \u7ba1\u7406\u8005", "profile_background_color": "C0DEED", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "screen_name": "niselog", "statuses_count": 340, "url": "http://t.co/QMKlQjzjSI", "withheld_in_countries": []}, "user_mentions": []}
{"created_at": "Sat May 14 07:02:08 +0000 2016", "hashtags": [], "id": 731379051852505088, "id_str": "731379051852505088", "lang": "ja", "retweet_count": 2, "source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>", "text": "\u7121\u9650\u306e\u30d5\u30a1\u30f3\u30bf\u30b8\u30a2\u3001\u30b7\u30eb\u30d0\u30fc\u30ec\u30a4\u30f3\u3001\u30a8\u30f3\u30c9\u30d6\u30ec\u30a4\u30ab\u30fc\u5411\u3051\u306e\u507d\u30ed\u30b0 https://t.co/QMKlQjzjSI \u3067\u3059\u304c\u3001\u590f\u9803\u306b\u5b8c\u5168\u505c\u6b62\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002(URL\u306f\u6b8b\u308a\u307e\u3059\u304c)", "urls": [{"expanded_url": "http://niselog.jp/", "url": "https://t.co/QMKlQjzjSI"}], "user": {"created_at": "Mon Mar 01 05:51:23 +0000 2010", "default_profile": true, "default_profile_image": true, "description": "\u30c8\u30df\u30fc\u30a6\u30a9\u30fc\u30ab\u30fcPBW \u7121\u9650\u306e\u30d5\u30a1\u30f3\u30bf\u30b8\u30a2/\u30b7\u30eb\u30d0\u30fc\u30ec\u30a4\u30f3/\u30a8\u30f3\u30c9\u30d6\u30ec\u30a4\u30ab\u30fc\uff01/\u30b5\u30a4\u30ad\u30c3\u30af\u30cf\u30fc\u30c4\u3078\u306e\u643a\u5e2f\u5411\u3051\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u30b5\u30fc\u30d3\u30b9\u300c\u507d\u30ed\u30b0\u300d\u306e\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3059\u3002 http://t.co/QMKlQjzjSI http://t.co/YEiNJUvGdU", "followers_count": 40, "id": 118604209, "id_str": "118604209", "listed_count": 5, "name": "niselog \u7ba1\u7406\u8005", "profile_background_color": "C0DEED", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "screen_name": "niselog", "statuses_count": 340, "url": "http://t.co/QMKlQjzjSI", "withheld_in_countries": []}, "user_mentions": []}
-bash-4.2$

unicode escapeという形式で文字が表示されているので読めない。

全体的にみてみるとJSON形式のデータになっているのでjqコマンドを通して見た。

-bash-4.2$ ./test3.py |tail -2|jq .
{
  "created_at": "Sat May 14 08:13:22 +0000 2016",
  "hashtags": [
    {
      "text": "ケルベロスブレイド"
    }
  ],
  "id": 731396977758339100,
  "id_str": "731396977758339072",
  "lang": "ja",
  "source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>",
  "text": "偽ログ for #ケルベロスブレイド はケルベロス超会議の一覧ページに対応しました https://t.co/gDlRyiFWC3",
  "urls": [
    {
      "expanded_url": "http://tw5.niselog.jp/",
      "url": "https://t.co/gDlRyiFWC3"
    }
  ],
  "user": {
    "created_at": "Mon Mar 01 05:51:23 +0000 2010",
    "default_profile": true,
    "default_profile_image": true,
    "description": "トミーウォーカーPBW 無限のファンタジア/シルバーレイン/エンドブレイカー!/サイキックハーツへの携帯向けゲートウェイサービス「偽ログ」の管理者 アカウントです。 http://t.co/QMKlQjzjSI http://t.co/YEiNJUvGdU",
    "followers_count": 40,
    "id": 118604209,
    "id_str": "118604209",
    "listed_count": 5,
    "name": "niselog 管理者",
    "profile_background_color": "C0DEED",
    "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
    "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
    "profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
    "profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
    "profile_link_color": "1DA1F2",
    "profile_sidebar_border_color": "C0DEED",
    "profile_sidebar_fill_color": "DDEEF6",
    "profile_text_color": "333333",
    "profile_use_background_image": true,
    "screen_name": "niselog",
    "statuses_count": 340,
    "url": "http://t.co/QMKlQjzjSI",
    "withheld_in_countries": []
  },
  "user_mentions": []
}
{
  "created_at": "Sat May 14 07:02:08 +0000 2016",
  "hashtags": [],
  "id": 731379051852505100,
  "id_str": "731379051852505088",
  "lang": "ja",
  "retweet_count": 2,
  "source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>",
  "text": "無限のファンタジア、シルバーレイン、エンドブレイカー向けの偽ログ https://t.co/QMKlQjzjSI ですが、夏頃に完全停止する予定です。(URLは残りますが)",
  "urls": [
    {
      "expanded_url": "http://niselog.jp/",
      "url": "https://t.co/QMKlQjzjSI"
    }
  ],
  "user": {
    "created_at": "Mon Mar 01 05:51:23 +0000 2010",
    "default_profile": true,
    "default_profile_image": true,
    "description": "トミーウォーカーPBW 無限のファンタジア/シルバーレイン/エンドブレイカー!/サイキックハーツへの携帯向けゲートウェイサービス「偽ログ」の管理者 アカウントです。 http://t.co/QMKlQjzjSI http://t.co/YEiNJUvGdU",
    "followers_count": 40,
    "id": 118604209,
    "id_str": "118604209",
    "listed_count": 5,
    "name": "niselog 管理者",
    "profile_background_color": "C0DEED",
    "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
    "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
    "profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
    "profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
    "profile_link_color": "1DA1F2",
    "profile_sidebar_border_color": "C0DEED",
    "profile_sidebar_fill_color": "DDEEF6",
    "profile_text_color": "333333",
    "profile_use_background_image": true,
    "screen_name": "niselog",
    "statuses_count": 340,
    "url": "http://t.co/QMKlQjzjSI",
    "withheld_in_countries": []
  },
  "user_mentions": []
}
-bash-4.2$

今度は可読できる状態になった。

で・・・twitter spaceの場合、次のような出力になっていた

{
  "created_at": "Fri Aug 13 02:11:56 +0000 2021",
  "hashtags": [],
  "id": ~,
  "id_str": "~",
  "lang": "ja",
  "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>",
  "text": "スペース配信開始\nhttps://t.co/~",
  "urls": [
    {
      "expanded_url": "https://twitter.com/i/spaces/~",
      "url": "https://t.co/~"
    }
  ],
  "user": {
<略>
 }
}

urlsにexpanded_urlという項目があり、そこに /i/spaces/~ というtwitter spaceのURLが書かれているという状態であった。

とりあえず、これで、twitter spaceに参加するためのURLは取得できそう。

jqコマンドのオプションを変えて.urlsだけを抜き出して見る

-bash-4.2$ ./test3.py|jq '.urls'
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[
  {
    "expanded_url": "https://twitter.com/i/spaces/~",
    "url": "https://t.co/~"
  }
]
[
  {
    "expanded_url": "https://~",
    "url": "https://t.co/~"
  }
]
[]
[]
[]
[]
[]
[]
[]
[]
-bash-4.

中身が入ってないものまで表示されてしまう。

jq コマンドを使う日常のご紹介」になかなかいい参考事例を発見

-bash-4.2$ ./test3.py|jq -r '.urls[] '
{
  "expanded_url": "https://twitter.com/i/spaces/~",
  "url": "https://t.co/~"
}
{
  "expanded_url": "https://~",
  "url": "https://t.co/~"
}
-bash-4.2$

これでURLがある場合だけ結果が出た。

もう1歩すすめてjqコマンドマニュアルみつつselectで完全一致だけ出力

-bash-4.2$ ./test3.py|jq -r '.urls[] |select(.expanded_url == "https://twitter.com/i/spaces/~")'
{
  "expanded_url": "https://twitter.com/i/spaces/~",
  "url": "https://t.co/~"
}
-bash-4.2$

部分一致を探すとstartswith,endswithで指定文字列で始まる場合/終わる場合を条件にできた

-bash-4.2$ ./test3.py|jq -r '.urls[] | select(.expanded_url | startswith("https://twitter.com/i/spaces/"))'
{
  "expanded_url": "https://twitter.com/i/spaces/~",
  "url": "https://t.co/~"
}
-bash-4.2$

含まれる場合は containsでいけた

-bash-4.2$ ./test3.py|jq -r '.urls[] | select(.expanded_url | contains("https://
twitter.com/i/spaces/"))'
{
  "expanded_url": "https://twitter.com/i/spaces/~",
  "url": "https://t.co/~"
}
-bash-4.2$

Cisco UCSのCIMCにssh接続して設定を行う

Cisco UCSのCisco Integrated Management Controller (CIMC)はWeb管理画面とssh接続によるCLI管理がある。

CIMCについているホスト名は基本的に「サーバ機種名-シリアル番号」となっている。

ホスト名を確認する操作をCLIから行うには、scope:cimc/network以下でdetailを表示する操作になる。

ホスト名# scope cimc/network
ホスト名 /cimc/network # show detail
Network Setting:
    IPv4 Enabled: yes
    IPv4 Address: xxx.xxx.xxx.xxx
    IPv4 Netmask: 255.255.255.0
    IPv4 Gateway: xxx.xxx.xxx.xxx
    DHCP Enabled: no
    DDNS Enabled: yes
    DDNS Update Domain:
    DDNS Refresh Interval(0-8736 Hr): 0
    Obtain DNS Server by DHCP: no
    Preferred DNS: xxx.xxx.xxx.xxx
    Alternate DNS: 0.0.0.0
    IPv6 Enabled: yes
    IPv6 Address: ::
    IPv6 Prefix: 64
    IPv6 Gateway: ::
    IPv6 Link Local: fe80::86b8:xxxx:xxxx:xxxx
    IPv6 SLAAC Address: ::
    IPV6 DHCP Enabled: yes
    IPV6 Obtain DNS Server by DHCP: yes
    IPV6 Preferred DNS: ::
    IPV6 Alternate DNS: ::
    VLAN Enabled: no
    VLAN ID: 1
    VLAN Priority: 0
    Port Profile:
    Hostname: ホスト名
    MAC Address: XX:XX:XX:XX:XX:XX
    NIC Mode: dedicated
    NIC Redundancy: none
    VIC Slot: riser1
    Auto Negotiate: yes
    Admin Network Speed: auto
    Admin Duplex: auto
    Operational Network Speed: 1Gbps
    Operational Duplex: full
ホスト名 /cimc/network #

show detailだといろんな項目が表示されすぎるので、ホスト名だけを取り出すことができないか調べたところ「| grep キーワード」が使えた。

ホスト名 /cimc/network # show detail | grep Hostname
    Hostname: ホスト名
ホスト名 /cimc/network #

ホスト名変更操作は scope:cimc/network にて set hostnameを実行したあと、commitで確定する。

ホスト名 /cimc/network # set hostname 新ホスト名
Create new certificate with CN as new hostname? [y|N] y

ホスト名 /cimc/network *# commit
Changes to the network settings will be applied immediately.
You may lose connectivity to the Cisco IMC and may have to log in again.
Do you wish to continue? [y/N] y

注意点として、ホスト名変更に伴い、Web管理GUIおよびssh接続で使用するSSL証明書で使用するCN(common name)が変更されるため証明書が作成されるということがある。

また、再作成に伴いCIMC自体も再起動されるため、commit後、再起動完了までの数分間CIMCに接続できなくなる。

このため、CIMCホスト名変更処理を行ったあとは、再起動待ちと証明書再発行にともなうssh接続時のキー変更に対応する処理を入れる必要がある。

ssh接続時のknown_hostsファイルから該当するエントリを削除したい場合は、 ssh-keygenコマンドの-Rオプションを使うことで行える。

osakanataro@ubuntu2004:~/imc$ ssh-keygen -R xxx.xxx.xxx.xxx
# Host xxx.xxx.xxx.xxx found: line 1
/home/osakanataro/.ssh/known_hosts updated.
Original contents retained as /home/osakanataro/.ssh/known_hosts.old
osakanataro@ubuntu2004:~/imc$

これで材料が揃ったので、スクリプトを作成する。

最初は Ciscoのcimc-ansible , cimcsdk を使用できないか検討したのですが、どちらもCIMCのホスト名変更に関する処理が実装されていないようだったので、expectコマンドによる処理を採用しました。

作成するにあたり下記を参考にしています。
How to programmatically enable redfish on Cisco CIMC?
Automate the UCS CLI with expect

今回作成したスクリプトは下記の様になりました。

#!/usr/bin/expect -f

# CIMCへの接続に時間がかかるようで
# 標準設定のtimeout値だとコマンド実行前にプロセスが進んでしまう 
# -1 を設定すると応答があるまで待つが
# ホスト名変更処理後は再起動がかかり、-1だと再起動が終わるまで待つことになってしまい時間がかかるので20に設定
set timeout 20

set CIMCaddr "xxx.xxx.xxx.xxx"
set CIMCuser "admin"
set CIMCpass "パスワード"
set CIMChostname "新ホスト名"


spawn ssh -l $CIMCuser -t $CIMCaddr
expect_after eof {exit 1}
# ログイン処理
expect {
        "*?assword:*" {
                send -- "$CIMCpass\r"
        }
        "(yes/no*)*" {
                send -- "yes\r"
                expect "*?assword:*"
                send -- "$CIMCpass\r"
        }
	# ホスト名変更時にssl証明書再作成が行われるため
	# キーが変わることに対する対応
	# リトライ処理が面倒だったので、古いキーを削除するところまでしか行わない
	# 必要に応じて手動で再実行で対応
        "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" {
                system ssh-keygen -R $CIMCaddr
                puts "\nplease re-exec this script\n"
                exit 2
        }
}

expect "# "
send -- "scope cimc/network\r"
expect "# "

# 現在のホスト名確認
send -- "show detail | grep Hostname \r"
expect -indices -re "Hostname: (.*)\r"
# 文字列検出に使った": "の2文字分を足す
set strst [string last ": " $expect_out(buffer)]
set strst [expr $strst + 2]
# 行の終わりの改行分を引く
set stred [string length $expect_out(buffer)]
set stred [expr $stred - 2]
set hostnamenow [string range $expect_out(buffer) $strst $stred]
puts "CIMChostname: $CIMChostname"
puts "hostname: $hostnamenow"

# ホスト名の変更が必要か?
if { "$CIMChostname" != "$hostnamenow" } {
        puts "change hostname"
} else {
        puts "no change"
        expect "# "
        send -- "top\r"
        expect "# "
        send -- "exit\r"
        exit 0
}

# ホスト名変更
expect "# "
send -- "set hostname $CIMChostname\r"
expect "*new hostname?*"
send -- "y\r"
expect "# "
send -- "show detail | grep Hostname \r"
expect "# "
send -- "commit\r"
expect "*\[y/N] "
send -- "y\r"

# ホスト名確認
#  ただし実際には再起動が掛かっているので実行できない
expect "# "
send -- "show detail | grep Hostname \r"

expect "# "
send -- "top\r"
expect "# "
send -- "exit\r"

exit 0