telnet and http server on NodeMCU v2

The NodeMCU v2 firmware for esp8266 only allows one TCP server. Usually, one will use this to serve a status page for the wireless unit. But, sometimes, maybe during development, it is desirable to also have a telnet access to the unit over WIFI to do some tweaking. Here, we achieve this by leaving a backdoor on the http port. By connecting to port 80 with telnet and enter "telnet" as the first input line, the connection is switch to a telnet service allows direct interaction with the Lua interpreter. The actual code is listed below:

Subscribe to Creative Constant Development Workgroup RSS