Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By ChrixXenon
#58547 I am programming an ESP8266 via theArduino IDE on a Windows 10 PC. I can turn WiFi diagnostics on with Serial.setDebugOutput(true); - so now I get a bunch of stuff like:

Access point started
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt

connected with XXXXXXX, channel 11
dhcp client start...
chg_B1:-40

- the meaning of some of it is obvious - but not all of it. So I'd like to ask if it is explained anywhere. I've spent a long time not finding it.

Related to that - I'm trying to get a system to start an access point so I can connect to it and tell it my WiFi credentials, and then it will disconnect the AP and connect to the network using those credentials.
I want to leave the Access Point up long enough to tell the user that the credentials were fine and they can now re-connect via the usual WiFi network.


I can get each element working but not all elements together, reliably.

I know about WiFiManager, but that library is vast. Is there any other resource I've missed which might help?

Thanks,
Chris
User avatar
By mrburnette
#58851 Chris,

You can always look at the diag implementation in the source code and in examples ... perhaps igrr documented the output a bit better....
On my linux system:
Code: Select all ~/.arduino15 $ grep -r "setDebugOutput"
packages/esp8266/hardware/esp8266/2.3.0-rc2/doc/reference.md:By default the diagnostic output from WiFi libraries is disabled when you call `Serial.begin`. To enable debug output again, call `Serial.setDebugOutput(true)`. To redirect debug output to `Serial1` instead, call `Serial1.setDebugOutput(true)`.
packages/esp8266/hardware/esp8266/2.3.0-rc2/doc/reference.md:You also need to use `Serial.setDebugOutput(true)` to enable output from `printf()` function.
packages/esp8266/hardware/esp8266/2.3.0-rc2/cores/esp8266/core_esp8266_main.cpp:        DEBUG_ESP_PORT.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/cores/esp8266/HardwareSerial.h:    void setDebugOutput(bool);
packages/esp8266/hardware/esp8266/2.3.0-rc2/cores/esp8266/HardwareSerial.cpp:void HardwareSerial::setDebugOutput(bool en)
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266WebServer/examples/FSBrowser/FSBrowser.ino:  DBG_OUTPUT_PORT.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266WebServer/examples/WebUpdate/WebUpdate.ino:        Serial.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266WebServer/examples/WebUpdate/WebUpdate.ino:        Serial.setDebugOutput(false);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266WebServer/examples/SDWebServer/SDWebServer.ino:  DBG_OUTPUT_PORT.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266httpUpdate/examples/httpUpdateSPIFFS/httpUpdateSPIFFS.ino:    // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino:    // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.cpp:          Serial.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.cpp:        if (_serial_output) Serial.setDebugOutput(false);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino:   // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPClient/examples/ReuseConnection/ReuseConnection.ino:   // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino:    // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/libraries/ESP8266HTTPClient/examples/Authorization/Authorization.ino:   // USE_SERIAL.setDebugOutput(true);
packages/esp8266/hardware/esp8266/2.3.0-rc2/tests/device/test_WiFi_events/test_WiFi_events.ino:    Serial.setDebugOutput(false);
packages/esp8266/hardware/esp8266/2.3.0-rc2/tests/device/test_http_client/test_http_client.ino:    Serial.setDebugOutput(true);