2018年9月18日火曜日

Raspbianのlatest firmware (4.14.70-v7+ #1143)がshutdown時にkernel panic

*** このページの不具合は修正済み (2018-09-22更新) ***

shutdown / reboot時にkernel panicする不具合は4.14.70-v7+ #1144で著者の環境では再現せず、修正された模様。

なお、2018-09-22現在の最新版は4.14.71-v7+ #1145である。

*** 以上 ***


Raspberry Pi 3 model B (RasPi3B)をRaspbianで運用しているが、rpi-updateでupdateした最近のfirmware (4.14.69あたりから? 2018-09-18現在最新の4.14.70-v7+でも)だと、shutdown時にkernel panicを起こしてrestartしない。

普段RasPi3Bをheadless (displayに繋がずに)運用しているため、なぜrebootしないのか原因が分からなかったが、試しにHDMIにLCDを繋いでみたところ判明した。

Raspberry Pi Forumsによると、

* Bluetoothのon/offによる → BTがoffだとkernel panicする
* USBからのbootだとこのbugがaffectする?

などの書き込みがある。

workaroundとしては、8月中旬ごろのfirmwareにdowngradeする手がある。

cf.

* [Is this a stable kernel? - Raspberry Pi Forums](https://www.raspberrypi.org/forums/viewtopic.php?t=222448)
* [After last updates RPI 3+ hangs on shurdown/reboot if bluetooth off - Page 2 - Raspberry Pi Forums](https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=222475&start=25)

2018年9月15日土曜日

SwissMicros DM42のUSB関連のtrouble (2018-10-15更新, v3.11で解消)

(更新記録)

* 2018-10-15 firmware v3.11で当問題が解決されたのでupdateを推奨 cf. https://typeinf-memo.blogspot.com/2018/10/swissmicros-dm42firmwarev311usbfreeze.html
* 2018-09-18 画像を追加

(更新記録は以上)

Firmware v3.7あたりにupgradeしてから、DM42にUSB cableを接続すると次のようなerrorが出てfreezeするようになった:

ErrSrc/main.c:867
Err:main.c:867
Err:SetFreq 2
ERROR: 0777
Desc:SetFreq 2

このため、firmwareのupgradeができない、FAT diskへのaccessができない状態。

SwissMicrosのforumには既に報告されている cf. [Bug when connecting the USB cable - www.SwissMicros.com](https://forum.swissmicros.com/viewtopic.php?t=1922)が、まだ完全に解決された訳ではないようだ。なお、全てのDM42で発現する訳ではなく、稀らしい……。

この状態でもPGMとRESETの2つのhardware buttonsを使ってbootloader modeにした後、USB cableを接続したPCからdfu-utilを実行してfirmwareをupgradeできる:

Bootloader mode can be activated from main Setup menu: System > Bootloader or by resetting the calculator using RESET button while PGM button is pressed too.

To be more precise, the sequence of entering bootloader mode using RESET and PGM button is: - press and hold PGM button - press and release the RESET button - release the PGM button
cf. [DM42 User Manual](https://www.swissmicros.com/dm42/doc/dm42_user_manual/#bootloader_mode_activation)

手順


* 2本のネジ (図1の緑色の矢印)を取って裏蓋を外す → 下部にツメがあるので、USB connector等がある上の方 (LCDがある方)から外す。隙間にテレカのような薄いプラスチックを挟んで開けるのがお勧め
* PCB上にRESET buttonとPGM buttonがある → 裏蓋をつけたままだとRESETのみaccessible (図1の赤色の矢印)


図1 DM42背面
図2 裏蓋を外した様子 (左側が本体、右側がカバー)

図3 PCB拡大 (赤矢印=RESET, 黄矢印=PGM, 水色矢印=電池, 紫矢印=圧電ブザー)

* PGM (図3の黄色の矢印)を押しながらRESET (図3の赤色の矢印)を押すと強制的にbootloader modeになる → この時画面に変化がないのでmodeに入ったかどうかわかりにくいが、入力を受け付けず画面にも変化がないので判別できる
* USB cableを接続するとPCがDM42を認識するので、予めdownloadしておいたfirmwareをdfu-utilで書き込む cf. https://typeinf-memo.blogspot.com/2017/12/swissmicros-dm42firmware-update.html (過去記事)
* 終了したらRESET buttonを押す
* 表示される"About"でfirmwareのversionを確認する
* 裏蓋を戻してネジをしめる

結果とworkaround


この方法で無事v3.9.1 (2018-09-15現在の最新版)にupgradeできたが、USB cableを接続すると依然errorが表示されfreezeする。

workaroundとしては、

* USBへ接続せずに普通に使い続ける
* v3.5にdowngradeする

の2つがある。

v3.11へのupdateを行うと解決する。

SwissMicros DM15Lのfirmware upgrade (v27)

DM15Lのfirmare v27が公開されていたのでupgradeした。

Upgradeの手順については過去記事 (https://typeinf-memo.blogspot.com/2016/07/swissmicros-dm-15lfirmware-upgrade.html)を参照されたい。