E.enableWatchdog(10);
var eth = require("WIZnet").connect();
eth.setIP({
ip : "192.168.254.248",
dns : "208.67.222.222",
gateway: "192.168.254.100" });
var http = require("http");
http.get("http://www.espruino.com", function(res) {
res.on('data', function(data) {
console.log(data);
});
});
Works up to a point. If I execute the get 6 times (one after another) .. manually .. so I wait for the get to complete .. they all work and pull the html back correctly.
The 7th time (always) I get "ERROR: No Free Sockets Found" and about 5 seconds later, the Espruino COM port disconnects from the PC. Have to reboot. I sometimes see a huge number of SPI TimeOut on TX messages before the COM port dies, but most often not.
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 still cannot get DHCP to behave .. this code
Works up to a point. If I execute the get 6 times (one after another) .. manually .. so I wait for the get to complete .. they all work and pull the html back correctly.
The 7th time (always) I get "ERROR: No Free Sockets Found" and about 5 seconds later, the Espruino COM port disconnects from the PC. Have to reboot. I sometimes see a huge number of SPI TimeOut on TX messages before the COM port dies, but most often not.