(Ugh.. this is actually "tomgidden", but I still can't get my browser to log me in reliably, and it looks like the cookie's expired. Oh well. Call me user6351.)
I've been trying to get the CC3000 running as an HTTP server using the example code, merging the CC3000 setup code with the HTTP server code:
var wlan = require('CC3000').connect();
wlan.connect("MY_SSID", "my_wpa_key", function (s) {
if(s == 'dhcp') {
console.log(wlan.getIP().ip);
require('http')
.createServer(function(req, res) {
res.writeHead(200);
res.end("Hello");
})
.listen(8080);
}
});
The connection initialises fine, and after a while, I get the "dhcp" followed by the IP address. I can also connect to the port from a remote machine, via telnet/nc and curl. However, nothing after that. Eventually curl will timeout. Best I can do is hit RST and start again.
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.
(Ugh.. this is actually "tomgidden", but I still can't get my browser to log me in reliably, and it looks like the cookie's expired. Oh well. Call me user6351.)
I've been trying to get the CC3000 running as an HTTP server using the example code, merging the CC3000 setup code with the HTTP server code:
The connection initialises fine, and after a while, I get the "dhcp" followed by the IP address. I can also connect to the port from a remote machine, via telnet/nc and curl. However, nothing after that. Eventually curl will timeout. Best I can do is hit RST and start again.
Any thoughts?
(This is on firmware 1v46)