Well, a couple of hacks later and I have something working, although the buffering is not really satisfying at all. I should move it into a JS flat string, but even then it's just waiting to overflow or to hit the out-of-memory wall.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well, a couple of hacks later and I have something working, although the buffering is not really satisfying at all. I should move it into a JS flat string, but even then it's just waiting to overflow or to hit the out-of-memory wall.
Code is here https://github.com/tve/Espruino/commit/8e480637e095f6fac0ee92f84eb67527ac24f4fa and in the prior commit (jsdevices.c).
If anyone wants to try it out:
require("Telnet").setOptions({mode:"on"});
The console also works with the Linux build, but uses port 2323 (to avoid needing root privs). But you have to build that from sources yourself.
I now need to work on the "always available" part so it comes up automatically whenever there's a Wifi connection (if so configured).
BTW, Gordon, do you have an esp8266 to try these types of things out?