From debug messages to the fundamental ‘hello world’, serial communication does it all over three little wires. Now imagine being able to cut the cord to your next microcontroller project and use your phone as a VT100 terminal. This was the premise of [Ondřej Hruška]’s Wireless Terminal Project where he took an ESP8266 and added an in-browser terminal emulator which can be accessed over WiFi. The final hardware uses an ESP-01 module mounted atop a breadboard adapter with a 3.3V LDO, protection circuitry for the pins and under-voltage disable.
The firmware is based on [SpriteTM]’s libesphttpd code which was modified to include the VT100 escape sequence parser. The parser, in turn, was coded as a state machine and compiled using Ragel which simplifies such projects greatly. When you access the tiny web server, the loaded webpage starts to communicate over web sockets to the ESP-01. Key-presses from the terminal are sent to the buffer and onto the parser and control logic. The characters are then passed to the hardware UART lines at 115200bps and if an escape sequence is detected, the corresponding action is executed instead.
[Ondřej Hruška] shares the code as well as a user manual in PDF for anyone who would like to try it out and help improve the project. With a little inspiration on learning about state machines, you could extend the project to your own use case as well.
Thanks for the tip [Marco Saarloos]
Well done, this might come in handy. No need to hookup the FTDI for quickly checking the logs, just point your browser at it.
Nice Build. However it needs a button to select output baudrate. On similar but blutooth project I did 2 years ago I implemented the most common baudrate speeds: 115200, 38400 and 9600. I use it for routers and switches mostly :)
Very useful. Thanks!
Awesome hardware/firmware one-stop solution!
If you like this project, but don’t need the VT-100 stuff, you may also like esp-link.
I have not dug through the code of any of them, but any idea on the buffer size?
ESP-Link is great, but it uses a much older version of libesphttpd, that does not support websockets. As a result, updates are polled periodically, rather than being sent as and when they happen.
My antivirus blocks that website for malware reasons….