ESP-01/WiFiEspServer/WiFiClient - possible problems

SnorkelMower

New member
Note: This is not a critique of someone doing a bad job. I am very grateful for all the work the guys have been doing for this project being what it is!

I have read that there have been problems with the ESP-01 but have been unable to find exactly what problems people have been experiencing.
Considering this and having problems with it on my own I though I should publish my findings.

During the process to get my mower to work i came across some interesting issues with the ESP-01. I am using PCB-1.3, Sunray 1.0.178 and the GPS+RTK kit.

Here are my findings:

1. I already spoke about the Watchdog problem during WiFiConnect in another post (https://forum.ardumower.de/threads/esp-01-causes-due-to-reset.24214/).
I think some restructuring of code is necessary here to avoid watchdog resets because of firmware not running concurrently (i.e. real-time).

2. Initialization of ESP-01's server seems to have some misunderstanding. Reading the ESP8266 AT Instruction Set Version 3.0.3 spec (https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf) the command "AT+CIPSERVER" takes two arguments "mode" and "port".
The argument "mode" is either 0 or 1, meaning 1 for create and 0 for delete.
Someone confused this with link id/socket/conn id. This has nothing to do with this!
But the code has now been contaminated with the notion that link/conn id/sock 1 has now been occupied. This is wrong.
The ESP-01 can handle up to 5 simultaneous connections (link id 0 through 4).
I have tested this with an ESP-01 connected to a TTL232R 3,3V converter and some terminals using telnet.

3. The WiFi code "assumes" that only one connection is occurring at the same time. Here it would have been appropriate to
configure the ESP-01 for that case, using the "AT+CIPSERVERMAXCONN" command.

4. I used "wget" to send commands to the mower and found out that it sent fragmented IP packets (one for the header, a second for the body).
This causes some delay in the handling of the "message" sent to the mower. This in turn causes the receiver in the mower to timeout,
check the status of the TCP connection and finally lose the command entirely. I modified my code to interpret the HTTP header so
that my code knows how many bytes are left in the HTTP (POST) request (Content-Length:).
This seem to make the command channel over the ESP-01 more robust.

That concludes my current findings.

I am working on a patch but I am lacking in my understanding of the total system architecture/design and what functions are expected from the ESP-01 so that will have to wait.
Anyone has any more inputs, problems or comments about the ESP-01 ?

/Snorkel
 
Hi, the issue is that both BLE modules (HM-10) and WiFi modules (ESP-8266) use all kind of firmwares, some are working fine, some are not. We tried to find binaries for the good ones without success (HM-10 etc.). Also one module (ESP-32) now replaces two modules. Less is better. And we now have full control over the BLE/WiFi firmware as the code is open:
For example, I could tune the connection BLE parameters via code, and that makes the module really versatile now...
 
Zuletzt bearbeitet:
Hello, and thanks for your answer. I was under the impression that NONOS v2.2.1 SDK was the preferred firmware for ESP-01 in the ArduMower design.
As I said, I think its great that so much work is being done, and is not questioning the choices being made. The ESP32 is probably a better device, maybe the next generation ESP-01. :) I already had an ESP-01 WiFi module from the pre-GPS-RTK ArduMower kit, and wanted to use it,
thats why I bothered to troubleshoot them. I also have droves of NodeMCUs which I use for home automation so I am not ready to abandon the old workhorse just yet.

Do you have a list of the problems you had with them, and which firmwares and so on ?

/Snorkel
 
We collected the versions from all customers where they could not get it work - for the ESP8266, customers could only get older firmware 2.2.1 to work
and for the HM-10, customers reported only older firmware 4.2.0 seem to work
The biggest issue is that no old firmware binaries for HM-10 are available for download somewhere. We did not try to debug the cases where customers reported not working versions. We have chosen the ESP-32 as a fast alternative to 'solve' both BLE+WiFi problems ;-)
 
Zuletzt bearbeitet:
Oben