Skip to content

Very high 802.11 WiFi frame loss #3236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iceboundflame opened this issue Sep 21, 2019 · 3 comments
Closed

Very high 802.11 WiFi frame loss #3236

iceboundflame opened this issue Sep 21, 2019 · 3 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@iceboundflame
Copy link

I'm seeing delayed TCP and UDP packets on ESP32 and have discovered a high rate (30-50+%) of 802.11 frames being dropped and re-transmitted.

Symptom: I was originally trying to stream data from a PC to ESP32 via UDP at 60Hz. Although packets eventually arrived, there's a very high rate of delayed packets, with packets arriving in groups as measured by the ESP32. Delays ranged from 50ms-300ms.

Digging further, I found that the ESP32 WiFi stack itself is dropping packets. Here's a way I could test:

Setup:

  • Minimal Arduino sketch that simply turns on WiFi, disables power saving mode, and does nothing in loop().
  • Running Wireshark on Mac in monitor mode to capture 802.11 frames.
  • Python script on Mac is sending UDP packets, ~850bytes each, to ESP32 at 60Hz.
  • ESP32 placed next to the router for extremely high signal strength (RSSI = -4).

Wireshark shows many frame retransmissions.

Arduino 1.8.9 with ESP32 1.0.3 installed via Board Manager and NodeMCU-32S selected as board type.
Hardware: ESP-WROOM-32 module on a generic "ESP32 DEVKIT V1" breakout board.
Router: TP-Link Archer A20, WPA2 PSK

Hardware:

Board: ESP32 Dev Module
Core Installation version: 1.0.3
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Mac OSX

Sketch:

#include <WiFi.h>
const char* ssid = "xxxxx";
const char* pwd = "xxxxx";

void setup() {
  Serial.begin(115200);
  Serial.setDebugOutput(true);

  WiFi.setHostname("minimalnet");
  WiFi.begin(ssid, pwd);
  WiFi.setSleep(false);  // lower latency
}

void loop() {
  static int x;
  x++;
  if (x % 10000000 == 0) {
    Serial.print(WiFi.localIP());
    Serial.print("  ");
    Serial.println(WiFi.RSSI());
  }
}

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here 

I don't see this option in the Tools menu of Arduino IDE.

@lbernstone
Copy link
Contributor

Use AsyncUDP. See #2871

@stale
Copy link

stale bot commented Nov 22, 2019

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Nov 22, 2019
@stale
Copy link

stale bot commented Dec 6, 2019

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

2 participants