Hi Steffer,
I put the try/catch but it was the same, terminal does not respond.
This is my code
function initTelnet(){ console.log('Init Telnet'); require("net").createServer(function(socket) { console.log('Telnet client connected'); socket.write('Welcome!\r\n'); socket.on('error', function(err){ USB.write(err); }); /*socket.on('data', function(data) { //just a test to verify connection //USB.write("client says " + data); });*/ socket.on('close', function() { USB.setConsole(); }); socket.pipe(LoopbackA); LoopbackA.pipe(socket); try{ LoopbackB.setConsole(); } catch(e){ USB.write(e); } }).listen(23); } function onInit() { console.log("Init Wifi"); wifi = require("Wifi"); wifi.connect("................", {password : ".................."}, function(err) { console.log("Wifi Connected"); initTelnet(); }); }
When connecting with putty I see:
Welcome! <- USB >
and nothing else, no response to commands.
... EDITED the code to remove the ondata event
@César started
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.
Hi Steffer,
I put the try/catch but it was the same, terminal does not respond.
This is my code
When connecting with putty I see:
and nothing else, no response to commands.
...
EDITED the code to remove the ondata event