Skip to main content

Posts

Showing posts from April, 2018

ESP32: Webserver using esp-idf SDK

Web-Server or Web-socket oe http socket is most commonly used method to read or write data from Ethernet or now as we move to new technology WiFi in embedded universe. It was already there, but with cheap and easily available ESP modules it has taken a big leap forward. Here in this topic, i will explain you to added Web Server to ESP32 module using eclipse. If you are new to ESP32 using eclipse you start from here for adding ESP32 in eclipse. Ok lets start with ESP32 Webserver, initialization, struct netconn *conn, *newconn; err_t err; conn = netconn_new(NETCONN_TCP); // Create TCP socket netconn_bind(conn, IP_ADDR_ANY, 80); // bind socket netconn_listen(conn); Now, write the main body to accept web client connection and to decrypt http frame. do { err = netconn_accept(conn, &newconn); // accept incoming connection if (err == ERR_OK) { ESP_LOGI(TAG, "Accepted Conn %d\n", err); http_server_netconn_serve(n