Skip to content

Redirects esp32 console in realtime to webpage using websockets. Using esp-idf.

License

Notifications You must be signed in to change notification settings

craigpeacock/ESP32_Websocket_LogViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Websocket based Real Time Log Viewer

This example redirects the esp32 console in real-time to webpage using websockets. Developed using esp-idf.

This application dynamically redirects the esp console to the web browser when the user presses the start button and stops the redirection when pressing stop. Redirection is performed using the esp_log_set_vprintf() function.

The esp-idf log framework highlights the different log levels using colours specified by ANSI Escape Codes. These codes are stripped out using the remove_ansi_escape_codes() function prior to sending down the websocket.

Javascript running on the client side replaces greater than and less than symbols with the correct HTML codes to provide HTML compliance. When the end user presses the save button, the various elements making up the log file is iterated and saved to file. This provides a real-time interface without any flash wear that could occur if files are written to SPIFFS and retrieved.

When the log panel becomes full, a scroll bar will appear and the last lines are shown similar to a tail -f.

About

Redirects esp32 console in realtime to webpage using websockets. Using esp-idf.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published