LoginSignup
2
3

More than 5 years have passed since last update.

ESP8266 > Link > watchdog reset対策 > WiFi.softAP("MyESPAP", "MyPassword"); WiFi.mode(WIFI_AP); / WiFi.disconnect();

Last updated at Posted at 2016-06-25

Link

http://qiita.com/7of9/items/527b87a63aeb2ce51828
で調べていたwatchdog resetがかかる症状。
近い症状の例が以下に見つかった。
http://www.esp8266.com/viewtopic.php?f=8&t=4089

and tried to write a simple blink code as follow:

Lチカだけのプログラムでwatchdog resetがかかるという。

それに対しての回答が

Probably it is coming from the Wifi thread not able to start due to corrupted configs store in flash.
Maybe you should upload blank.bin to both 7C000h and 7E000h addresses or initialize Wifi using API.

対策としてblank.binで7C000hと7E000hを上書きしてしまう、とあるが他の方法として以下をするのでもいいとのこと。

Instead, if you look at examples of ESP8266WiFi, you can initialize it in AP mode, and then do nothing with it, until your decide to get it further.

WiFi.softAP("MyESPAP", "MyPassword");
WiFi.mode(WIFI_AP);

試してみた

上記を試してみた。

  1. v0.2 @ githubから問題を生じるプログラムを取得
  2. WiFi_setup()内の#if 1の定義を#if 0に変更
  3. プログラム書込み
  4. 上記の対策をしたプログラム(下記)を書込み
#include <ESP8266WiFi.h>

void setup() {
  WiFi.softAP("MyESPAP", "MyPassword");
  WiFi.mode(WIFI_AP);
  Serial.begin(115200);
}

void loop() {
  char szbuf[] = "hello";

  Serial.println(szbuf);
  delay(3000);
}

確かにwatchdog resetがかからなくなった。

WiFi.disconnect()

個人的にはWiFi.disconnect()でもいいのではと思う。

試してみた。

#include <ESP8266WiFi.h>

void setup() {
  WiFi.disconnect();
  Serial.begin(115200);
}

void loop() {
  char szbuf[] = "hello";

  Serial.println(szbuf);
  delay(3000);
}

こちらもでwatchdog resetがかからないことを確認した。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3