ESP32 softAP

P. Short

Super Moderator
Staff member
Has anyone had any experience with these?

I've got a setup using softAP (espressif ide, ESP32 and ESP32C3) where I'm losing some packets. UDP packets are sent from a PC (ubuntu) in bursts of 6/7 packets at 25 mS intervals. The seventh packet in a sequence is usually lost when the PC is sending packets back-to-back. There is some packet loss (not as many, and more random) when a delay is inserted between my PC application attempting to transmit.

I'm most suspicious of the ESP softAP, but I haven't eliminated all other possibilities yet.
 
I use a built in sequence number. Report an error when a number is missing in the series. We get a lot of them in E1.31 data streams. Same for sending FTP data to the device. We get a lot of retransmits due to missing packets.
 
Are you using WireShark to capture the data?
Same as Martin. If I could get my PC's into a truly promiscuous mode I'd use tcpdump, but the wifi cards in the PC apparently only receive data intended for that PC, not packets going from the AP to other devices.
 
What if you used a hub instead of a switch on the network. SInce a hub rebroadcasts all traffic, I'd think that might work.
 
Based on Martin's replies, I'm thinking that the problem is likely a limitation or bug of the WiFi hardware/firmware in the ESP32 parts, which might be present in both the station and AP hardware/software. The setup didn't appear to be losing packets if the host was transmitting 6-packet bursts, but I would need to do some more testing to verify that there isn't any loss, rather than just a lower-frequency event.
 
I haven't played with the esp32's much but aren't there different implementations for Wifi? I think there is at least an Arduino implementation and an Expressif implementation (or they might be the same thing, not 100% sure). I'm just curious if its possibly a firmware issue with the library that's being used.
 
Dirk - thanks, but I'm leaving for Pasadena tomorrow, I'd like to hold off a bit.

Chris - as far as I can tell, the Arduino IDE for the ESP components builds on a port of the Espressif tools (if not incorporating it as-is). The version of the Arduino IDE on my PC is pretty old, and I'm holding off on updating it and modifying my espressif design to work with it.
 
My current take:

The loss of packets is likely due to the WiFi implementation in the ESP parts. This would affect my ESP32-S2 station receiving packets as well as potentially the ESP (and ESP-C3) access points. The packet loss is worse when the packet burst size is greater than six packets, but reducing the burst size reduces the number of lost packets (from one packet per burst down to one packet every few seconds). I'll do more testing using my house router, which I suspect will improve things but not totally eliminate the loss of packets. I'll also test PC-to-PC operation, see if the problem is larger than just the ESP implementations.

Edit: switching to using the COTS home router helped, but didn't totally stop the packet loss.
 
Last edited:
I've done a bit more testing. This involved porting the receiver logic from the espressif/ESP32-S2 program to a PC running under Ubuntu Linux. Testing show no packet loss when sending from PC to PC via the house Router, but packets were lost when the house Router was replaced with an ESP32 using softAP using the same PC programs. I don't think that the loss was due to signal strength problems, as all three devices were within a foot or two of each other. The obvious conclusion is that there are limitations in the ESP32xxx WiFi modules.

This throws a wrench in the works. Since I have a 4-Port ESP32-S2 based controller that supports up to 1500 pixels with 2 Mbaud serial input, I'll likely to go with that, and defer the higher pixel-count developments until next year (if ever).
 
Back
Top