whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.19k stars 221 forks source link

added support for a generic telnet service #243

Closed the0ne closed 5 years ago

the0ne commented 5 years ago

by using this service, it's easy to resemble various "telnet-like" clear-text protocols like, e.g. AVR-NET-IO

for more information about AVR-NET-IO see http://www.gtkdb.de/index_18_1032.html for a description of the protocol and the original hardware that it was designed for

simple "echo" usage example:

-- this function is called for each line received from the client
function telnet_receive(client, command)
    -- the parameter 'client' contains the client's IP address
    local print = net.service.telnet.print
    print("you entered: "..command..NL) --this is sent directly to the client
end

if net.service.telnet then
    net.service.telnet.start(23, telnet_receive)
end
the0ne commented 5 years ago

note: when adding a wiki for this, probably openvpn should be documented as well

the0ne commented 5 years ago

@jolivepetrus the changes in the LUA_RTOS_BOARD_TYPE section in file components/sys/Kconfig are there because the line endings were \r\n style and my editor has fixed that