I'm afraid it's gone because Google are in the process of shutting down the Chrome web app, so we're left with espruino.com/ide which doesn't support telnet directly as far as I know.
I guess the only real option would be to make the Linux build capable of starting an HTTP server with websockets - there is a fragment of JS code that does this already (below), but because it's doing it in JS isn't not as flexible as something built in at a lower level:
function onPageRequest(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(`<html>
<body style="margin:0px">
<iframe id="ideframe" src="https://www.espruino.com/ide/" style="width:100%;height:100%;border:0px;"></iframe>
<script src="https://www.espruino.com/ide/embed.js"></script>
<script>
var ws = new WebSocket("ws://" + location.host + "/ws", "serial");
var Espruino = EspruinoIDE(document.getElementById('ideframe'));
Espruino.onports = function() {
return [{path:'local', description:'Local Device', type : "net"}];
};
Espruino.onready = function(data) { Espruino.connect("local");};
Espruino.onwrite = function(data) { ws.send(data); }
ws.onmessage = function (event) { Espruino.received(event.data); };
ws.onclose = function (event) { Espruino.disconnect(); };
</script>
</body>
</html>`);
}
/* Hack to ensure that `reset` won't cause us problems */
global.reset = function() {
console.log("Ignoring reset() request");
};
var server = require('ws').createServer(onPageRequest);
server.listen(80);
server.on("websocket", function(ws) {
ws.on('message',function(msg) { LoopbackA.write(msg); });
LoopbackA.on('data',function(msg) { ws.send(msg); });
ws.on('close', function() {
LoopbackA.removeAllListeners();
USB.setConsole();
});
LoopbackB.setConsole();
});
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.
I'm afraid it's gone because Google are in the process of shutting down the Chrome web app, so we're left with
espruino.com/ide
which doesn't support telnet directly as far as I know.I guess the only real option would be to make the Linux build capable of starting an HTTP server with websockets - there is a fragment of JS code that does this already (below), but because it's doing it in JS isn't not as flexible as something built in at a lower level: