This is a pure transparent bridge between Wifi and serial using any ESP8266 device. It's very useful for debugging or talking to remote serial device that have no network connection.
I'm using it on WeMos target, you can find more information on WeMos on their site, it's really well documented. I now use WeMos boards instead of NodeMCU's one because they're just smaller, features remains the same, but I also suspect WeMos regulator far better quality than the one used on NodeMCU that are just fake of originals AMS117 3V3.
This project is mainly based on excellent @me-no-dev ESPAsyncWebServer library and great JQuery Terminal done by Jakub Jankiewicz.
Once uploaded SPIFFS data (web page) you can connect with a browser to http://ip_of_esp8266 and start playing with it. The main index.htm web page include a full javascript terminal so you can type command and receive response.
The main web page can also be hosted anywhere and it's not mandatory to have it on the device (except if device and your computer have no access on Internet). I've published the fully fonctionnal WEB page from github so you can access it from here and then connect to your device on wich you flashed the firmware.
Some commands will be interpreted by the target (ESP8266) and not passed to serial, so you can interact with ESP8266 doing some variable stuff.
webdev folder is the development folder to test and validate web pages. It's used to avoid flashing the device on each modification. All source file are located in this folder the ESP8266 data folder (containing web pages) is filled by a js script of webdev folder.
To test pages, go to a command line, go into webdev folder and issue a:
node web_server.js
then connect your browser to htpp://localhost:8080 you can them modidy and test source files such index.htm
Once all is okay issue a:
node create_spiffs.js
this will gzip file and put them into data folder, after that you can upload from Arduino IDE to device SPIFFS
See comments in both create_spiffs.js and web_server.js files, it's also indicated dependencies needed by nodejs.
- connect : connect do target device
- help : show help
- swap : swap ESP8266 UART pin between GPIO1/GPIO3 with GPIO13/GPIO14
- ping : typing ping on terminal and ESP8266 will send back pong
- !close : close connection
See all in action
http://cdn.rawgit.com/hallard/WebSocketToSerial/master/webdev/index.htm
- More configuration features (UART speed/configuration)
- Arduino ESP8266
- @me-no-dev ESPAsyncWebServer library
- @me-no-dev ESPAsyncTCP library
- nodejs for web pages development test
See news and other projects on my blog