devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
549 stars 68 forks source link

wifi time out error #112

Open mikejrh opened 1 year ago

mikejrh commented 1 year ago

I am getting this output when i run the sketch in Arduino-IDE on an Esp-Wroom board "wifi:timeout when WiFi un-init, type=4". The wifiscan sketch example works.

devWaves commented 1 year ago

have you started with a fresh arduino install and cleared out the ~/Documents/Arduino/libraries folder ?

you could have a conflicting wifi library

what esp32 model are you using?

mikejrh commented 1 year ago

using a ESP32-WROOM-32 board. fresh install with these libraries: NimBLE-Arduino, EspMQTTClient. ArduinoJson, CRC32, ArduinoQueue and I had to install PubSubClient-2.8.0 after an error message in compilation.

Tadeas3 commented 1 year ago

I'm having same issue (same board - ESP32 devkit v1). I can see in my router's GUI that it keeps re-connecting and then disconnecting over and over.

I tried to set printSerialOutputForDebugging = true but nothing more is shown in monitor. Just this:

Switchbot ESP32 starting... Starting NimBLE Client E (1165) wifi:timeout when WiFi un-init, type=4

and that's it.

devWaves commented 1 year ago

not sure. I can't reproduce

Does you SSID or password has special or non-alphanumeric characters?

Tadeas3 commented 1 year ago

Both are alphanumeric only.