Left for archival purposes.

User avatar
By hreintke
#5619 LS,
I am experimenting with telnet server as shown n nodecmu readme file.
But when submitting the srv=net.createServer(net.TCP) i get the errormessage "only one tcp server allowed".
That prevents any development of a webserver interface using the telnet interface.

Is that a nodemcu/lua restriction or is that already restricted by esp8266 ?

Any chance that that will change in relative near future ?

Herman
User avatar
By lightbulb
#6319 Herman,

I have only just got my modules and started to play....

I think the limitation is because of the memory overhead of the protocol stack. I have not checked the SDK source (yet).

You can toggle between the two by using something like a specific GET request to close http server conn, and start telnet via timer, and likewise use a special command via telnet to close telnet conn and restart http via timer.

I use something similar myself to start a telnet server for 20secs on boot, then switch over into http, but I dont use GET params to switch back as I only need telnet for few mins after first boot.

My main observation thus far is that you have to be VERY frugal on memory use and code size. Also the heap is not garbage collected very quickly, but I have not looked at docs for a way to force gc.