CC3000 not working

Posted on
  • Hello,

    is there a known error when using the Espruino board version 1.3 with the software version 1.7 and the Adafruit CC3000 Wifi board.

    I'm just trying to start the simple Web Server example but nothing is working. Only the Espruino freezes and I have to press the reset button to use it again.

  • What software version 1.7 are you referring to? Do you mean Espruino firmware v71?

    There should be no issue using the CC3k in that situation.

    Is it wired correctly? Specifically, you'll get unpredictable and generally bad results if you try to power the CC3k off the 3.3v power supply on the Espruino - you need VIN on the CC3k connected to VBat, and 3v3 on CC3k not connected to anything. The Espruino's 3.3v regulator can't provide enough power to the CC3k, and if you try, it'll pull the Espruino's 3.3v supply low enough to crash the Espruino board

    Have you verified that you have the connection parameters correct? Does the example of making an http request work?

    The CC3000 can block for a very long time while trying to connect to a wireless network, particularly if it's failing to do so due to incorrect connection options (note that presently the espruino firmware only supports WPA secured networks, not unsecured or WEP (which might as well be unsecured))

  • Yes, I mean the Espruino firmware, I just updated it and process.version says, 1v70, so I assume that the firmware is v70 and not v71.

    I checked again, and everything is wired up correctly.

    The connection parameters are also correct. The http request example is also not working.

    Could a possible problem be my wifi password? It contains a !, but I think this shouldn't prevent the CC3000 board to connect to my wifi.

  • Everything @DrAzzy said, except the latest is version 1v70, not 1v71 :)

    Wifi will tend to hang if the board is not wired correctly - sadly it's just a side effect of the drivers that TI supply.

    Also I believe you can connect to unsecured wifi by just leaving the passwords as undefined.

  • Can you add some print statements to your code to see where it is hanging? If it is hanging before you get to connect to the wifi network then you'll know it isn't your password.

  • I just tested something else and noticed, that it works if i wrap all the wifi code in a function like this:

    var wlan;
    
    function init(){
      wlan = require("CC3000").connect();
      wlan.connect( "AccessPointName", "WPA2key", function (s) { 
        if (s=="dhcp") {
          require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
            res.on('data', function(data) {
              console.log(">" + data);
            });
          });
        }
      });
    }
    
    init();
    

    It would be good if this gets reflected in the CC3000 manual.

  • Thanks for letting us know - you mean typing:

      var wlan = require("CC3000").connect();
      wlan.connect( "AccessPointName", "WPA2key", function (s) { 
        if (s=="dhcp") {
          require("http").get("http://www.pur3.co.­uk/hello.txt", function(res) {
            res.on('data', function(data) {
              console.log(">" + data);
            });
          });
        }
      });
    

    Does not work for you at all, or just does not work after you have save()d it to the board?

    When I've done that before I was pretty sure that it worked, but it took a few seconds before the prompt appeared again, as the two connect functions take a while to execute.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

CC3000 not working

Posted by Avatar for dervondenbergen @dervondenbergen

Actions