Very slow WiFi transfer speeds with ESP32S3 Sense board

Hi,

I’m getting extremely slow WiFi speeds on the ESP32S3 Sense board. The antenna is connected. I tried the camera server demo and it works at a couple FPS, which is impressive, but when I try to use HTTPServer to perform a POST request (with a pre-stored buffer), I’m measuring 0.04 MB/sec upload speeds to server on the same LAN (and this is consistent on every LAN I try).

I don’t see anything obviously wrong in HTTPServer: it just loops through the buffer and tries to push out an MTU worth of data as fast as it can.

Is anyone else observing this? Some searching online shows that I should be getting over 1MB/sec at minimum.

EDIT: I’ve also tried this with a TCP socket directly and it’s the same story. 0.07MB/sec max:

void speedTest()
{
    while (WiFi.status() != WL_CONNECTED);

    Serial.println("Beginning speed test");

    uint8_t *buf = (uint8_t *) ps_malloc(0x400000);
    if (!buf)
    {
        Serial.println("Failed to alloc");
        return;
    }

    WiFiClient client;
    client.setNoDelay(true);
    if (!client.connect("192.168.1.100", 8080))
    {
        Serial.println("Failed to connect");
        return;
    }

    unsigned long t0 = millis();
    client.write(buf, 0x400000);
    unsigned long t1 = millis();
    unsigned long delta = t1 - t0;
    Serial.printf("Transmission time: %d ms, %1.2f MB/sec\n", delta, 4.0f / (float(delta) / 1000.0f));

    client.stop();
    free(buf);

    Serial.println("Finished!");
    while(true);

}

Thanks,

– B.