TCP/IP randomly freezes

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

TCP/IP randomly freezes

Postby peterglen » Wed Apr 04, 2018 7:16 pm

I am connecting to the esp32 from a browser. Made a tiny HTTP server, works great ... except the HTTP connection freezes randomly. When it freezes, I cannot ping either. The access point stays connected OK. The connection randomly recovers in a minute to two ...

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

Re: TCP/IP randomly freezes

Postby peterglen » Fri Apr 27, 2018 9:41 pm

I found out that the ARP description on a post elsewhere is correct. Here is mine on before / after:

When error:

Interface: 192.168.4.2 --- 0xd
Internet Address Physical Address Type
192.168.4.255 ff-ff-ff-ff-ff-ff static
224.0.0.2 01-00-5e-00-00-02 static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static

When functional:

Interface: 192.168.4.2 --- 0xd
Internet Address Physical Address Type
192.168.4.1 30-ae-a4-1a-aa-35 dynamic
192.168.4.255 ff-ff-ff-ff-ff-ff static
224.0.0.2 01-00-5e-00-00-02 static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static

Note the 192.168.4.1 entry is missing.

PLEASE TREAT THIS AS BUG, Solution needed.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: TCP/IP randomly freezes

Postby ESP_Sprite » Sat Apr 28, 2018 4:12 am

If you want this to be treated as a bug in the sp-idf stack, you'd be better off filing an issue on Github. Be aware that we do need a fair amount more information before we can help you: the hardware you use (both devboard as well as AP), some code that exhibits the problem, specific logs, versions of tools used etc.

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

Re: TCP/IP randomly freezes

Postby peterglen » Tue May 29, 2018 11:50 pm

I have this error with both chips (Wrover /Wroom)
The ARP entry for the softAP intermittently vanishes. Here is a dump before /after:

Interface: 192.168.4.2 --- 0xd
Internet Address Physical Address Type
192.168.0.1 00-00-00-00-00-00 invalid
192.168.4.1 00-00-00-00-00-00 invalid
192.168.4.255 ff-ff-ff-ff-ff-ff static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static

Interface: 192.168.4.2 --- 0xd
Internet Address Physical Address Type
192.168.0.1 00-00-00-00-00-00 invalid
192.168.4.1 30-ae-a4-4b-0a-55 dynamic
192.168.4.255 ff-ff-ff-ff-ff-ff static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static

Platform description:

Win7
I (29) boot: ESP-IDF v3.1-dev-1193-g64b56bef 2nd stage bootloader
I (29) boot: compile time 18:06:03
wifi firmware version: 4ae09c9
phy: phy_version: 3910, c0c45a3, May 21 2018, 18:07:06, 0, 0

I tried disconnecting the station from the access point so only softAP is on, still the same error.

When the error occurs, (disconnected), ping times out. The connection goes up / down with no descernable pattern.

Any workaround / suggestion / fix would be helpful.

Peter

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

Re: TCP/IP randomly freezes

Postby peterglen » Sat Mar 23, 2019 1:59 am

I did not get a reply, so eventually we figured it out. The ESP32 (modem) sleep kicked in and the chip did not respond to the ARP requests from the peer. The peer then deleted the ARP entry, and it appeared as a frozen connection. Fixing the sleep code was the solution, and the folks at ESP did it. Thank you.

Who is online

Users browsing this forum: No registered users and 57 guests