Page 1 of 1

about eth

Posted: Tue Sep 11, 2018 3:19 am
by 1163167506
Good morning

I created a web server on esp32, and accessing the esp32 web server over Ethernet was significantly slower than accessing the esp32 web server over wireless.

Do people have similar problems or offer some help?

My webserver code:

Code: Select all

static void http_server(void *pvParameters)
{
    struct netconn *conn, *newconn;
    err_t err;
    conn = netconn_new(NETCONN_TCP);
    netconn_bind(conn, INADDR_ANY, 80);
    
    netconn_listen(conn);
    do 
    {
        err = netconn_accept(conn, &newconn);
        if (err == ERR_OK) 
        {
            http_server_netconn_serve(newconn);
            err = netconn_delete(newconn);
        }
    } while(err == ERR_OK);
    err = netconn_close(conn);

    err = netconn_delete(conn);

}

Re: about eth

Posted: Tue Sep 11, 2018 9:42 am
by 1163167506
oh
This problem has been solved in make menuconfig.
Settings: Component config=> Ethernet =>Enable copy between Layer2 and Layer3.

But I don't know how this function works. Can anyone explain it?

Re: about eth

Posted: Tue Sep 11, 2018 10:08 am
by WiFive