JAndrassy / WiFiEspAT

Arduino networking library. Standard Arduino WiFi networking API over ESP8266 or ESP32 AT commands.
GNU Lesser General Public License v2.1
271 stars 44 forks source link

wait for module startup at reset #117

Closed gtortone closed 2 months ago

gtortone commented 2 months ago

Hi, I fixed a bug in AT+RST and added a small delay after module reset due to some ESP32 modules that need time to startup...

JAndrassy commented 2 months ago

did you experience some problems? because readRX is patient after reset. it skips 70 lines (presumably of startup log) before giving up

gtortone commented 2 months ago

yes, with an ESP32 module after a (hardware) reset without that delay it does not reconnect to wifi. If possible the delay time could be a parameter of reset... with a default value of zero.

JAndrassy commented 2 months ago

why did you replace readRX with sendCommand? readRX("ready") waits for "ready". sendCommand("ready") sends ready and doesn"t wait. firmware sends ready when it is booted

gtortone commented 2 months ago

Hi, your repo has sendCommand while my commit includes readRx...

JAndrassy commented 2 months ago

sorry, it was late and I thought I see the problem. but readRX instead of sendCommand doesn't commit the AT+RST with /r/n if you provide the reset pin for hardware reset then that else is not executed.