Open natevw opened 9 years ago
UPDATE: disregard, I don't think this is particularly relevant.
Another potential way to trigger (at least something similar).
Server:
require('net').createServer(function (sock) {
sock.setNoDelay();
for (var i = 0; i < 25; i += 1) setTimeout(function () {
sock.write(".");
}, i*.1e3);
}).listen(5004, function () {
console.log("listening", this.address().port);
});
Tessel:
require('net').connect(5004, "192.168.4.114", function () {
console.log("connected, waiting");
setInterval(function () {
console.log("spin");
var i = 100000;
while (--i) ;
console.log("done");
}, 1e3);
});
There's no timeout errors, but the Tessel doesn't seem to read as much as expected (though it doesn't totally stop either!)the pattern of data read is a little weird. Full log is https://gist.github.com/natevw/ec2ce0be64ad41f6773c. Maybe this is simply due to event loop scheduling?
Will https://github.com/tessel/runtime/pull/713 improve this situation at least by making it detectable?
Run this somewhere the Tessel can talk to:
Run this with
tessel run -l all -s script.js
:Gets stuck in a loop like the following, and then needs a power cycle before doing any other WiFi stuff:
Full log at https://gist.github.com/natevw/6c39419e1e3bca9bf17c