You are reading a single comment by @Carlos and its replies. Click here to read the full conversation.
  • This is what I am getting back from the console:

    >echo(0);
    Initialising CC3000
    Connecting...
    Done.
    =undefined
    

    I guess what I am missing is the ability to respond to errors or just get a better feedback based on the connection status. What I mean is something like this:

    console.log("Initialising CC3000");
    var wlan = require("CC3000").connect();
    console.log("Connecting...");
    wlan.connect( "AccessPointName", "WPA2key", function (s) { 
      console.log(s);
      if (s=="dhcp") {
        require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
          res.on('data', function(data) {
            console.log(">" + data);
          });
        });
      }
    });
    wlan.on('error', function(e){
      console.log('Cannot connect to access point');
      console.log('Error: ' + e.message);
    });
    console.log("Done.");
    

    Otherwise, I have no idea what is going on with my module.

About

Avatar for Carlos @Carlos started