Close

NodeMCU and "Telnet" Client

A project log for VPN Light Switch

A Wi-Fi based LED switch to check that your VPN is running on your router and control it.

bleckyBlecky 08/15/2015 at 04:230 Comments

Here is a link to the NodeMCU firmware - https://github.com/nodemcu/nodemcu-firmware

You can build this with the ESP toolchain (instructions on building the toolchain here). You can also use the NodeMCU flasher which has prebuilt firmware included - https://github.com/nodemcu/nodemcu-flasher

To connect to a telnet session and send/receive, you can use the following using the socket library:

conn=net.createConnection(net.TCP, false)
conn:on("receive", function(sck, c) print(c) end )
conn:connect(7505,"192.168.1.1")
local ok, err = conn:send("state\n")
conn:close()

Discussions