electronicsgadget

sonoffにESPeasyを入れてみる(2)

前回sonoffにESPeasyを焼いて,うんともすんとも言わなくなってしまったため,
ググっていたら,sonoffもリビジョンによって違うらしいという話。

ESP8286にはESP8285という1MBのフラッシュ入りのチップがあるのだが,
sonoffも途中からこのESP8285に切り替わってるらしいという事がわかった。

で,手持ちのsonoffを調べてみたらESP8285が乗ってる新モデルらしく,
何も考えずにESPeasyのv2.0以前の安定版を焼くと,正常に焼けるけど動かないということがわかった。

したがって,ESP8285でESPEasyを使いたい場合はDev版のv2.0以降を使えって事らしい。

確かに微妙に書いてあるんだよな。。

ESP Easy can be installed/flashed on nearly every piece of Hardware that has an ESP8266 built-in, newest 2.0.0 version even does support the ESP8285 (basically an ESP8266 with built-in 1M Flash).
Please see the list here for more in depth detail about the hardware.

というわけで,気を取り直してv2.0を焼いてみることにした。

やり方は簡単で,sonoffをFW更新モードに入れて,USBttlケーブルでPCと繋いでesptoolで焼くだけなのだが,
esptoolのプログラミングモードを少し変更する必要がある。


$:~/Desktop/ESPEasy$ ./esptool -vv -bm dout -cd nodemcu -cb 115200 -cp /dev/ttyUSB0 -ca 0x000000 -cf ROMFILE

違いは,-bm で doutを指定すること。
要するにフラッシュチップのI/Fが8286と違うらしい。

-bm
Set the flash chip interface mode. Default is QIO.
This parameter is stored in the binary image header, along with the flash size
and flash frequency. The ROM bootloader in the ESP8266 uses the value
of these parameters in order to know how to talk to the flash chip.

で,それとv2.0のESPeasyには複数のビルド済みバイナリが8286用と8285用で別れているので,8285用を選ぶ必要がある。

とりあえず8285用のESPeasy焼いてみたらすんなり起動してきた。
よかった。

Leave a Reply

Your email address will not be published. Required fields are marked *