SparkFun WiFi Shield - CC3000

This is a shield for the CC3000 WiFi Module. The CC3000 from TI (Texas Instruments) is a self-contained wireless network processor that makes incorporating internet connectivity into your project simple. Instead of the more standard UART communication method, the CC3000 module utilizes an SPI interface allowing you, the user, to control the flow of data as you please. What makes the CC3000 unique is its ability to associate to a WiFi access point using a cell phone app in the Texas Instruments process called SmartConfig.

This shield even provides an optional feature that allows you to attach an external antenna, just in case you need a little extra power. This is a handy feature if you want to route an antenna to the outside of an enclosure or to increase your WiFi gain. The CC3000 Shield has a standard Arduino shield layout with 2 rows of pins on either side. The right-side headers have been broken out on the shield if you want to solder headers or wires for easy prototyping in the area right of the microSD card slot. We have even designed this board so that the CC3000 is on the back of the shield reducing the chance of interference from the barrel jack or USB connector.

Note: The CC3000 WiFi Shield comes as a stand-alone board. Headers will need to be purchased separately, check the related items below!

  • Supply Voltage: 4.5V - 12V
  • Host Interface: SPI @ 16MHZ
  • Throughput (TCP): ~4Mbps
  • IEEE 802.11 b/g Compliant
  • WEP, WPA/WPA2 (AES and TKIP - Personal) Security Modes
  • FCC, IC, CE, and TELEC Certified
  • Prototyping Area
  • Onboard WIMAX Antenna
  • Optional External Antenna Connection

SparkFun WiFi Shield - CC3000 Product Help and Resources

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

2 Soldering

Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

2 Programming

Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #767701 / about 8 years ago / 1

    Hello Has anyone made this (or the breakout) work with STM32 on mbed??? Apparently there are several libraries (so I suppose it works) and even one (only one) video on youtube of this working BUT I cant make it work. (and googling it seems a lot of other people can not either) So far I have been able to identify the problem to the INT pin.

    One user on the breakout comments said that grounds should be joined but come on, in the shield they are already so this is not the problem I guess.

    I also noticed that different than on the Arduino UNO, SCK is not working for mbed...

    Can anybody help. I have already spent two weeks trying to make your product work without any luck

    • Can you get the mbed ping example to work? If not, where does it fail? Also, what firmware version do you have loaded on the CC3000 (the mbed library claims to need at least v1.11)?

      • Member #767701 / about 8 years ago / 1

        Thanks for the reply. I got it working. just for reference how do I know what firmware version do i have? The key to make it work was that I have to update ALL libraries before compiling the programs. ALL libraries should be up to date in order to make it work.

        • Glad to hear it works! You can call the getFirmwareVersion () function in the library to get the version.

          EDIT: Oops, that's for the Arduino library. Maybe try read_sp_version()

  • Member #767701 / about 8 years ago / 1

    Hello. I would like to ask if there is anything like this product (or the breakout) that can run on 3.3V not 5V?? Any advice will be very much appreciated

    • David38 / about 8 years ago / 1

      All the chips on this board already run on 3.3V not 5V. According to the schematic, U1 on this "SparkFun WiFi Shield - CC3000" is a LM1117 3.3V regulator that converts the "Supply Voltage: 4.5V - 12V" to the 3.3 V actually used by the CC3000 chip and the other two chips. If someone adds jumper wire from a 3.3V power source to the Vout "tab" of that LM1117, it looks like this board would work fine (I haven't actually tested this) with any 3.3V Arduino such as the "Arduino Pro 328 - 3.3V/8MHz", the "Arduino Due", the "Mega Pro 3.3V", etc.

      • Member #767701 / about 8 years ago / 1

        So it is actually a 3.3V system with supply of 5V converted through a regulator? interesting... I have actually worked with a system like this. Quick question, is there a way to supply just 3.3V to this bypassing the regulator? or what would you suggest if I want to interface it to a micro that is already running on 3.3V like the STM32 nucleo?

        • The CC3000 shield does not have a pin connected to 3.3V, so you would have to solder a wire to the large pin/tab on the LM1117 (as David38 mentioned). The CC3000 breakout does have a 3.3V pin, so you could power it without having to tack a wire to a component on the board.

    • The CC3000 breakout will run on 3.3V. In my experience, the CC3000 is a pain to use in comparison to newer products like ESP8266 Thing or Thing Dev Board, which also run on 3.3V.

      • Member #767701 / about 8 years ago / 1

        Thank you for the interesting reply and recommendation. I will look into those products as well. Quick question though. does this mean that I can connect the CC3000 directly to a processor like the STM32?? how about the shield... I believe that is just a breakout enhance with arduino-like connections and a SD....

        • Correct. The CC3000 uses SPI to communicate, so any microcontroller or microprocessor that can use SPI will be able to talk to the CC3000. The breakout and shield, like you said, just add a few features, like level shifting and voltage regulation, to make it easier to use with an Arduino.

  • Member #659937 / about 8 years ago * / 1

    I'm having quite a bit of trouble connecting to my house's wifi.. It used to work really well for a while, but now it doesn't do very well. I ran the connection test, and it worked, but when I ran the Web Client example, it stalls at the "Performing HTTP Get of: www.example.com" Must it be a problem with the WiFi? The network works pretty well on my laptop/phone. I'm ultimately using the shield to perform a post to Thingspeak. I didn't change the code that much, but with this code, it doesn't even connect to the WiFi as it does in the Web Client. Any help?

    My code below:

    #include <SFE_CC3000.h>
    #include <SFE_CC3000_Callbacks.h>
    #include <SFE_CC3000_Client.h>
    #include <SFE_CC3000_SPI.h>
    
    
    /****************************************************************
    WebClient.ino
    CC3000 WebClient Test
    Shawn Hymel @ SparkFun Electronics
    March 1, 2014
    https://github.com/sparkfun/SFE_CC3000_Library
    
    Manually connects to a WiFi network and performs an HTTP GET
    request on a web page. Prints the contents of the page to
    the serial console.
    
    The security mode is defined by one of the following:
    WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA, WLAN_SEC_WPA2
    
    Hardware Connections:
    
     Uno Pin    CC3000 Board    Function
    
     +5V        VCC or +5V      5V
     GND        GND             GND
     2          INT             Interrupt
     7          EN              WiFi Enable
     10         CS              SPI Chip Select
     11         MOSI            SPI MOSI
     12         MISO            SPI MISO
     13         SCK             SPI Clock
    
    Resources:
    Include SPI.h, SFE_CC3000.h, and SFE_CC3000_Client.h
    
    Development environment specifics:
    Written in Arduino 1.0.5
    Tested with Arduino UNO R3
    
    This code is beerware; if you see me (or any other SparkFun 
    employee) at the local, and you've found our code helpful, please
    buy us a round!
    
    Distributed as-is; no warranty is given.
    ****************************************************************/
    
    #include <SPI.h>
    
    
    // Pins
    #define CC3000_INT      2   // Needs to be an interrupt pin (D2/D3)
    #define CC3000_EN       7   // Can be any digital pin
    #define CC3000_CS       10  // Preferred is pin 10 on Uno
    
    // Connection info data lengths
    #define IP_ADDR_LEN     4   // Length of IP address in bytes
    
    // Constants
    char ap_ssid[] = "IFH Lounge";                  // SSID of network
    char ap_password[] = "ifhJanuary";          // Password of network
    unsigned int ap_security = WLAN_SEC_WPA2; // Security of network
    unsigned int timeout = 3000000;             // Milliseconds
    char server[] = "api.thingspeak.com";        // Remote host site
    String writeAPIKey = "4JRIMA3GJF3PIQKE";            // API Key for Thingspeak
    const int updateThingSpeakInterval = 15 * 1000; //Time Interval
    
    
    long lastConnectionTime=0;
    boolean lastConnected = false;
    int failedCounter = 0;
    int test = 0;
    
    // Global Variables
    SFE_CC3000 wifi = SFE_CC3000(CC3000_INT, CC3000_EN, CC3000_CS);
    SFE_CC3000_Client client = SFE_CC3000_Client(wifi);
    
    void setup() {
    
      ConnectionInfo connection_info;
      int i;
    
      // Initialize Serial port
      Serial.begin(115200);
      Serial.println();
      Serial.println("---------------------------");
      Serial.println("SparkFun CC3000 - Thingspeak");
      Serial.println("---------------------------");
    
      // Initialize CC3000 (configure SPI communications)
      if ( wifi.init() ) {
        Serial.println("CC3000 initialization complete");
      } else {
        Serial.println("Something went wrong during CC3000 init!");
      }
    
      // Connect using DHCP
      Serial.print("Connecting to SSID: ");
      Serial.println(ap_ssid);
      if(!wifi.connect(ap_ssid, ap_security, ap_password, timeout)) {
        Serial.println("Error: Could not connect to AP");
      }
    
    }
    
    void loop(){
      test=3;
    
      if (client.available()){
        char c = client.read();
        //Serial.print(c);
    
      }
    
      if (!client.connected() && lastConnected)
      {
        Serial.println("...disconnected");
        Serial.println();
    
        client.stop();
      }
    
      if(!client.connected() && (millis() - lastConnectionTime > updateThingSpeakInterval)){
        updateThingSpeak("field1="+ String(test,DEC));
      }
    
      if (failedCounter > 3){
        wifi.connect(ap_ssid, ap_security, ap_password, timeout);
      }
    
      lastConnected = client.connected();
    
    }
    
    void updateThingSpeak(String tsData){ //this block of lines basically accesses the Thingspeak channel in the required format
      if (client.connect(server, 80)){
        client.print("POST /update HTTP/1.1\n");
        client.print("Host: api.thingspeak.com\n");
        client.print("Connection: close\n");
        client.print("X-THINGSPEAKAPIKEY: "+writeAPIKey+ "\n");
        client.print("Content-Type: application/x-www-form-urlencoded\n");
        client.print("Content-Length: ");
        client.print(tsData.length());
        client.print("\n\n");
    
        client.print(tsData);
    
        lastConnectionTime = millis();
    
        if (client.connected()){
          Serial.println("Connected to Thingspeak...");
          Serial.println();
          failedCounter = 0;
        }
    
        else{
          failedCounter++;
    
          Serial.println("Connection to ThingSpeak failed ("+String(failedCounter, DEC)+")");
          Serial.println();
        }
       }
       else{
        failedCounter++;
    
        Serial.println("Connection to ThingSpeak failed ("+String(failedCounter, DEC)+")");
        Serial.println();
    
        lastConnectionTime = millis();
       }
      }
    

  • Dragon88 / about 10 years ago * / 4

    SmartConfig not working for you? Do you have a 5 GHz network? This chip is 802.11b/g only, and does not do 5 GHz. Once you get the board connected to the AP, that's actually not an issue at all thanks to mixed mode. However, you cannot use the SmartConfig app from a device on 5 GHz because the CC3000 cannot see those packets, even if it can see the 2.4 GHz channel from the AP. There are possible workarounds, including disabling 5 GHz on the router, or the phone/tablet. Unfortunately, not all devices give you an option to disable 5 GHz (why would you want to, right?). I have possibly the most restrictive combination of devices (iPhone and Airport Extreme) and I was still able to make SmartConfig work using this procedure: Go into Airport Utility, edit the Airport, Wireless, Options. Select the option to give the 5 GHz network a DIFFERENT name (very important that it's a different ssid). Let the router restart. Everything on your network just dropped to 2.4 GHz, even if you don't realize it, because the saved profiles they all have are now for the 2.4 GHz channel only. Run the SmartConfig procedure and it should work. Now go back to Airport Utility and undo what you did, returning the network to the single, original ssid for 2.4 and 5 GHz. The CC3000 still has a saved profile that is valid for the mixed mode network, and all of your devices are back to 5 GHz. Easy! You should be able to adapt this procedure to other types of routers. As a final note, I should say that the real issue here is lack of 802.11n support in the CC3000. The 5 GHz issue is only part of the problem, and potentially you could have an 802.11n 2.4GHz device that the CC3000 still cannot see. Ideally you should force 802.11n off completely to run SmartConfig. However, getting your network to 2.4 GHz is a good first step toward a solution, and worked perfectly for me with no further steps required. Hope this helps someone.

  • dvdnhm / about 10 years ago / 2

    I got my shield today and tried immediately.

    I tested the board 1st:

    SparkFun CC3000 - Board Test

    CC3000 initialization complete Firmware version: 1.24 MAC address: 70:FF:76:01:30:1E Finished board test

    Scanned the networks:

    SparkFun CC3000 - Scan Test

    CC3000 initialization complete Scanning APs. Waiting for scan to complete. Access Points found:

    SSID: dnhm MAC address: 20:AA:4B:08:AA:CC RSSI: 58 Security: WPA2

    SSID: dnhm-guest MAC address: 20:AA:4B:08:AA:CE RSSI: 58 Security: Unsecured

    Finished scan test

    Set the SSID and the password and tried to connect:

    SparkFun CC3000 - Connection Test

    CC3000 initialization complete Connecting to: dnhm Error: Could not connect to AP Error: Could not obtain connection details Error: Could not disconnect from network Finished connection test


    SparkFun CC3000 - Connection Test

    CC3000 initialization complete Connecting to: dnhm-guest Error: Could not connect to AP Error: Could not obtain connection details Error: Could not disconnect from network Finished connection test

    It did not connect none of the connections, I reserved an IP address on the router for the mac address, but nothing changed. I turned on logs on the router (Linksys e2500) and no log record. I use wpa2 so I kept the security setting as it is. I also have a 5ghz ssid and it does not show up. So I did not try test that one.

    I also tried the smart config example, but it says:

    SparkFun CC3000 - SmartConfig

    CC3000 initialization complete Starting SmartConfig Send connection details from app now! Waiting to connect... Error: Could not connect with SmartConfig Error: Could not obtain connection details Looking up IP address of: www.sparkfun.com Error: Could not lookup host by name Pinging 0.0.0.0 3 times... Error: no ping response Error: Could not disconnect from network Finished SmartConfig test

    obviously the board works (It can find the networks), what should I do as next step to troubleshoot this?

    Thanks

    • Kevin Zhu / about 10 years ago / 1

      This is very similar (if not the same) to the problem I'm having

      • It seems that both of you are having connection issues. Generally, if you can see the WAP with scan (and you seem to have a good signal strength), you can connect to it. It might take a few tries, though. Every CC3000 board that we sell has been tested by having it connect to an access point and ping a remote site. My suspicion is that there is something in the router configuration that does not want to play with the CC3000. You are using WPA2, the correct password, and have it set to DHCP, correct? (Just making sure - it seems that way based on the ScanTest and ConnectionTest results).

        If you want to see where the code is failing exactly, you can start digging in the library and putting in breakpoints or Serial debug statements. I would start with connect() in SFE_CC3000.cpp.

        Additionally, there is always the possibility that something got damaged in transit. If you think this might be the case, send an email to TechSupport@sparkfun.com and they can help you troubleshoot potentially damaged components. If it was damaged, they can definitely help you get a replacement.

        • Member #624184 / about 9 years ago / 1

          Was there ever a resolution to this? I got a CC3000 board in the mail today and I am having the exact problem. The scan test finds numerous AP's, including my NETGEAR24, but any test that involves connection returns the same "CC3000 initialization complete Connecting to: NETGEAR24 Error: Could not connect to AP Error: Could not obtain connection details Error: Could not disconnect from network Finished connection test" messages in the serial monitor.
          Thanks...

  • Qtechknow / about 10 years ago / 2

    Hi,

    I’m really interested in this board, does anyone know if the library / shield works with the Arduino Leonardo / ATmega32u4? I asked about the Adafruit library, but they said that they only had support for the UNO / MEGA, not the Leonardo or Due. They said it had something to do with the SPI pins (for this shield I would have to solder on the ISP pins) - but I’m not sure. Has anyone tested this board + library with the Arduino Leonardo?

    Thanks, Quin

    • I updated the library and tested it with a Leonardo. Seems that everything is working. You definitely need the ISP pins for SPI.

    • You will need to use the ISP pins on the Leonardo for SPI (the shield has space for a 2x3 header for these pins). Right now, the library does not support the 32u4, but that is something I will look at fixing on Monday.,

      • Qtechknow / about 10 years ago / 1

        Awesome! I really like the idea of using a low cost WiFi chip with the lower - priced Leonardo! thanks!

  • George Hawkins / about 10 years ago / 2

    TI's SmartConfig process is interesting - it tries to solve a difficult IoT problem - how to communicate your network name and password to a device with no screen or keyboard. Initially all your CC3000 can see is lots of nearby wifi traffic that it doesn't know how to decrypt. How can a smart phone app communicate the necessary network name and passphrase to the CC3000? Shawn mentions (in the product video) that it involves a corrupt UDP packet. This isn't actually the case. If you're interested in what's going on then it's explained (by me) in this Electronics StackExchange answer. The important thing to note is that anyone interested, not just your CC3000, can easily recover the network name and passphrase sent using Smart Config unless you use the little mentioned AES key feature (which involves a pre-shared key that has to be coded into your MCU sketch).

    • Great write up on the CC3000....thanks for sharing! It seems that I misunderstood how it uses UDP packets for the connection process. There is a mode in SmartConfig for a pre-shared key, and yes, you'd have to enable it in the sketch. I don't have that feature working yet in the library, but I have noticed that if you include TI's AES functions, it quickly eats up a lot of the program space in the poor 328.

  • Member #499644 / about 10 years ago / 2

    Hi guys! i'm going to buy this shield, but i don't know if it's compatible with mega 2560.

    • Most shields that are UNO compatible will work with the MEGA 2560, but I don't know about this one because it communicates via SPI.

      • Member #499644 / about 10 years ago * / 1

        That's why I was asking. I have the cc3000 shield from adafruit, but it's broken and my project need to conect to internet.

        That one has a few jumpers in the backside that enable it for working with the mega. That one is more expensive than this one, maybe it's beacuse the jumpers and mega compatibility

        • TatankaWilly / about 10 years ago / 1

          It should be compatible. Connect the ISP header on the shield with the ISP header (the six pin bundle in a 3x2 configuration near the back of the shield and smack dab in the middle of the MEGA) and they should work as advertised. Oh, and don't forget the SD and CC3000 chip select wires. It looks like they are using D8 for SD card and D10 for CC3000 (which why they didn't use D4 for SD select like the standard Ethernet shield is beyond me). Connect D8 on MEGA with D8 on the shield, and D10 on MEGA with D10 on shield.

          • Member #499644 / about 10 years ago / 1

            ok, thanks for your anwer. but it would be better if there is direct conectivity trough the board. thanks

  • Zio / about 10 years ago / 2

    It would be really cool if there was a hole on the board large enough to screw the external antenna to - no need for a second mounting bracket

    • That was actually the original design. The problem is that the U.FL pigtail had to make some awkward angles to get to the connector and usually just popped off.

  • Member #659937 / about 9 years ago / 1

    Hey guys, I'm trying to use this with the college wifi and the two options for connecting to the internet are: -WPA2 Enterprise (I need to enter a username and password -Open (in this one, when you sign in it opens a web page that requires you to type a username and password)

    The next closest option is: -Open (in this one, when you sign in it opens a web page that requires you to click the "connect" button)

    Is it possible for me to connect to any with this shield? If so, how would I do that? Thank you!

    • I honestly have not had much success getting the CC3000 (or other embedded WiFi projects) on to enterprise networks like that. You might be able to run something like Wireshark to see what exactly is happening when you click that "connect" button. If it's a series of HTTP commands, you can probably replicate it in code on the Arduino. Not trivial, but it's the only way I can think of :(

      • Member #659937 / about 9 years ago / 1

        So I saw someone else mention in another forum that I can go to network support and have them allow the CC3000 based on the MAC address? Is that feasible? I'm not even sure I understand what the MAC address is/how to connect via that? Sorry I'm ignorant as far as the Arduino goes..

        • No worries :) a MAC address is hard coded into the network device (such as the CC3000 in this case). So, the MAC address is unique to the device. You can find it by calling the getMacAddress() function. If the network support people are receptive (sometimes they are, and sometimes they're not...can't have everyone adding strange devices to the network ;), you can ask them to add the CC3000 to the network and give them that MAC address. They might not be willing to do it, but it's worth a shot.

  • Member #712269 / about 9 years ago / 1

    Is there by any chance a fritzing part for this shield?

  • Aristarco / about 9 years ago / 1

    Seasoned wifi shield users: Is this board easier to use than the WiFly shield? I've been using the WiFly shield for some time now and it works great for me. Is this shield any better? Easier to configure, easier to make it work? Any thoughts on this? Thank you in advance.

  • Member #394763 / about 9 years ago * / 1

    antenna select will be better with jumper/switch.

  • Member #126758 / about 9 years ago / 1

    Is this board based off of anyones shield schematic?

  • KD5PFF / about 9 years ago / 1

    I am attempting to use this shield with the redboard and basic wifi webserver that shows the value of analog pins. Whenever I power up it tells me that the shield is not present. I am not sure what I am missing!? I have tired dumping the code through 1.0.2 and 1.0.5. Any help is greatly appreciated. Ultimately I am planning to turn this into a wifi weather station using the weather shield. Thanks!!! (forgive me if the code pasted below doesn't look right in the forum... first time to post code here)

    /* WiFi Web Server

    A simple web server that shows the value of the analog input pins. using a WiFi shield.

    This example is written for a network using WPA encryption. For WEP or WPA, change the Wifi.begin() call accordingly.

    Circuit: * WiFi shield attached * Analog inputs attached to pins A0 through A5 (optional)

    created 13 July 2010 by dlf (Metodo2 srl) modified 31 May 2012 by Tom Igoe

    */

    include <SPI.h>

    include <WiFi.h>

    IPAddress ip(192, 168, 10, 53);

    char ssid[] = "private"; // your network SSID (name) char pass[] = "private"; // your network password //int keyIndex = 0; // your network key Index number (needed only for WEP)

    int status = WL_IDLE_STATUS;

    WiFiServer server(80);

    void setup() { //Initialize serial and wait for port to open: Serial.begin(9600); delay(3000); //while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only //}

    // check for the presence of the shield: if (WiFi.status() == WL_NO_SHIELD) { Serial.println("WiFi shield not present"); // don't continue: while(true);}

    // WiFi.config(ip);

    // attempt to connect to Wifi network: while ( status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
    

    } server.begin(); // you're connected now, so print out the status: printWifiStatus(); }

    void loop() { // listen for incoming clients WiFiClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); // output the value of each analog input pin for (int analogChannel = 0; analogChannel < 6; analogChannel++) { int sensorReading = analogRead(analogChannel); client.print("analog input "); client.print(analogChannel); client.print(" is "); client.print(sensorReading); client.println("<br />");
    } client.println("</html>"); break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1);

    // close the connection:
    client.stop();
    Serial.println("client disonnected");
    

    } }

    void printWifiStatus() { // print the SSID of the network you're attached to: Serial.print("SSID: "); Serial.println(WiFi.SSID());

    // print your WiFi shield's IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip);

    // print the received signal strength: long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.print(rssi); Serial.println(" dBm"); }

    • You cannot use Wifi.h with this board, as Wifi.h specifically supports Arduino's WiFi shield (not the CC3000). You will need to use a CC3000 library (such as SFE_CC3000_Library) to use an Arduino with this shield.

      SFE_CC3000_Library does not support web servers (only clients) at this time. There are other web server libraries out there that support the CC3000, or you can try making your own.

  • Cloudedturtle / about 9 years ago / 1

    Any suggestions on how to upgrade the firmware on this board? It looks like 1.14 includes a number of fixes for TCP/UDP functionality. Have there been any tests to ensure client library compatibility?

    • There are ways to update the CC3000 firmware. You can follow TI's site here. You will need one of their MSP430 boards.

      Alternatively, others have been working on ways to update the firmware with Arduino, such as on this blog.

  • Member #616581 / about 9 years ago / 1

    Has anyone had any success grabbing internet time via NTP? I think i have solved the compatibility issues with Time.h via changing the long to unsigned long...... on the line for time t. Unfortunately, trying to integrate adafruit's NTP code is proving harder than i can handle due to the function to grab ip address of the server: getHostByName. I tried making it lower case and changing the prefix to "wifi", but i cant seem to get it to compile:

    unsigned long getTime(void) {
    

    uint8_t buf[48]; unsigned long ip, startTime, t = 0L;

    Serial.print(F("Locating time server..."));

    // Hostname to IP lookup; use NTP pool (rotates through servers) if(cc3000.getHostByName("pool.ntp.org", &ip)) { static const char PROGMEM timeReqA[] = { 227, 0, 6, 236 }, timeReqB[] = { 49, 78, 49, 52 };

    Serial.println(F("\r\nAttempting connection..."));
    startTime = millis();
    do {
      client = cc3000.connectUDP(ip, 123);
    } while((!client.connected()) &&
            ((millis() - startTime) < connectTimeout));
    
    if(client.connected()) {
      Serial.print(F("connected!\r\nIssuing request..."));
    
      // Assemble and issue request packet
      memset(buf, 0, sizeof(buf));
      memcpy_P( buf    , timeReqA, sizeof(timeReqA));
      memcpy_P(&buf[12], timeReqB, sizeof(timeReqB));
      client.write(buf, sizeof(buf));
    
      Serial.print(F("\r\nAwaiting response..."));
      memset(buf, 0, sizeof(buf));
      startTime = millis();
      while((!client.available()) &&
            ((millis() - startTime) < responseTimeout));
      if(client.available()) {
        client.read(buf, sizeof(buf));
        t = (((unsigned long)buf[40] << 24) |
             ((unsigned long)buf[41] << 16) |
             ((unsigned long)buf[42] <<  8) |
              (unsigned long)buf[43]) - 2208988800UL;
        Serial.print(F("OK\r\n"));
      }
      client.close();
    }
    

    } if(!t) Serial.println(F("error")); return t; }

  • Kelly Lofgreen / about 9 years ago / 1

    I'm having issues...I've got an Arduino Uno R3- this shield is connected on all the headers. I can only see output on serial port if I change to 9600 baud. It seems to work randomly..sometimes in hangs on wifi.init (doesn't return anything), sometimes it hangs on wifi.connect, no timeout error. I've seen it connect a few times, but it's very inconsistent. Smartconfig works sometimes, but I haven't seen it make it all the way through the program - last time in finished all the ping test, but then hung on wifi.disconnect. Any tips?

    • I have had success with the CC3000 and the UNO R3. The default baud should be 15200. Do you have anything else connected that could be using/interfering with the UART?

      • Kelly Lofgreen / about 9 years ago / 1

        Ok, got 15200 working..just needed to change it in the serial viewer. No, there's nothing else connected to this. I'm concerned that it's often hanging on wifi.init...connection issues aside, shouldn't it be getting past initialization? My router is an N router, but it's b/g compatible (Netgear wireless N). I'm not sure if it's 5ghz, nor do I see any way to turn it off. But before I try to figure that out, I'd like to see this thing initialize more consistently.

        • There's an example called "BoardTest" that just initializes. Give that a shot - that should work almost every time if the shield is connected properly.

          • Kelly Lofgreen / about 9 years ago / 1

            Shawn, Thanks for the help on this. I tried BoardTest as you suggest. Seems that sometimes it finishes the test and works great, and sometimes the wifi fuctions hang without returning. I see this on all the examples I try..even got SmartConfig to work, and connected to my network with pigs sent & received, but only sometimes. It only works without hanging about 25% of the time. I will run a program, it will work, then I will run again, and it won't work. It seems to have the best chance of working if I disconnect and reconnect the device from serial port/power. Again, this is just a simple Arduino R3 + CC3000 wifi shield - nothing else connected. I have verified electrical connection on all the required connections mentioned in ConnectionTest, namely 5V, GND, 2, 7, 10, 11, 12, and 13. If you can suggest how to troubleshoot this, it would be a great help.

            • That sounds like a WiFi connection issue. Can you run ScanTest a few times and share the results? What kind of signal strength are you getting from your CC3000 to your AP?

              • Kelly Lofgreen / about 9 years ago / 1

                Thanks. Here are the results of 5 runs of ScanTest:

                Trial 1: hung on wifi.init <close/re-open Arduino IDE, reload ScanTest> Trial 2: hung at search for AP's <close/re-open Arduino IDE, disconnect/reconnect device, reload ScanTest>

                Trial 3: Success. (I deleted all networks found, except mine)

                SparkFun CC3000 - Scan Test

                CC3000 initialization complete Scanning APs. Waiting for scan to complete. Access Points found:

                SSID: MIZZOU MAC address: C0:3F:0E:10:0D:66 RSSI: 83 Security: WPA2

                Finished scan test

                <close & re-open serial output window, ie. just ran the program again> Trial 4: Exact same result <close & re-open serial output window, ie. just ran the program again> Trial 5: Exact same result

                Note that at first it was hanging, then when I disconnected & reconnected, it seems to work much more consistently.

                In my opinion, this doesn't seem like a wifi connectivity/network issue. The fact that BoardTest exhibits the same sporadic behavior (and doesn't run any connection functions) suggests that it's a device or PC/device issue. Also, the device is literally sitting next to my wifi router, so I'd be surprised if it's signal strength issue. Other thoughts? Thanks again for your help!

                • The fact that it's hanging at random places makes me think it could be a hardware issue. Contact techsupport@sparkfun and they can help you narrow down what the problem is. If you’re eligible for a replacement, they can also assist you with that.

  • Member #621726 / about 9 years ago / 1

    Is there anybody here with a working web server sample, using the sparkfun CC3000 shield?

  • MartinLarka / about 9 years ago / 1

    I am trying to get my Spark fun RedBoard to work with this CC3000 shield. But I can not get it to work. When I run the "ping test" to www.sparkfun.com, the ip adress found is 0.0.0.0, but www.example.com works fine.

    However, when I run the "web client" I only get "Could not make a tcp connection". I have tried connecting to different sites both local and on the internet.

    Could the problem be that I have not connected the 2x3 ISP connector between the shield and the board?

    Thank you!

    /Martin

    • The ISP connector should not be necessary with the RedBoard. When you run the WebClient example, what IP address is your RedBoard/CC3000 getting?

  • Member #617962 / about 9 years ago / 1

    I did the tutorial fine, now I’m trying to post data to a different server. How do I post the timestamp at the time a request is sent? Is there anyway to do it without Time.h (from Arduino) or even better is there a way to do it WITH Time.h , cause currently the SFE_CC3000 library is not compatible with Time.h .

  • Member #58953 / about 9 years ago / 1

    Any luck anyone using this for MQTT?

    • I don't know much about MQTT. Is it REST-based? If so, the CC3000 will work. I got the CC3000 working with AT&T's M2X.

      • Member #58953 / about 9 years ago / 1

        MQTT

        Thank you very much! AT&T’s M2X is an awesome service and I'm going to use it for sure, but currently I'm more interested in Lelylan, which improves controlling a device from M2X funtionality.

  • Leppik / about 10 years ago / 1

    I'm trying to use this CC3000 shield with the RedBoard in a project which also requires a couple of servos.

    I can get the WiFi to work perfectly on its own, and the servos also are fine on their own. But as soon as I try to both use WiFi and run the servos in the same program, weird things start to happen. Sometimes it works but the servos chatter every time there's a network request; sometimes the CC3000 initialization never returns; sometimes it's just really flaky.

    I'm thinking the Servo library somehow interferes with the CC3000 library, or there's a hardware conflict somewhere. Has anyone else had this problem? Any suggestions?

    • Are you using a SPI for anything else in addition to the CC3000 (e.g. a servo controller)? I just updated the library, as there was a conflict with trying to talk to SD cards with the CC3000 library loaded.

      I've heard that there are conflicts with other libraries, as some interrupts do not play nicely with the CC3000 library. Hardware wise, the CC3000 is using pin 2 for external interrupts - I don't know if that affects you.

  • WadeB / about 10 years ago / 1

    I’ve built a replacement driver for the CC3000, https://github.com/wadetb/tinyhci. It’s roughly half the size.

    It doesn’t offer the C++ interface of the SFE library, instead it’s at the socket level. But if someone wanted to, the SFE library could be ported to sit on top of it.

  • Kevin Zhu / about 10 years ago / 1

    I'm working with an 802.11g router running the WebClient sketch. My phone and laptop can connect to the wifi just fine by WebClient keeps giving me this.


    SparkFun CC3000 - WebClient

    CC3000 initialization complete Connecting to SSID: MK1 Error: Could not connect to AP Error: Could not obtain connection details Performing HTTP GET of: www.example.com Error: Could not make a TCP connection

    Error: Could not close socket Error: Could not disconnect from network Finished WebClient test

    I've tried different routers and different settings but none of them work. On the other hand, I am able to connect to my iPhone 5 hotspot. I'm not sure what I'm doing wrong. Some help?

    Thanks!

    • The problem is definitely in the connection process. Could you verify a few things for me:

      1) Run the ScanTest sketch and paste the results here

      2) Your SSID (MK1) and password are correct in the sketch

      3) What is your WiFi security (Open, WEP, WPA, WPA2, etc.)?

      • Kevin Zhu / about 10 years ago / 1

        Hey Shawn! The ScanTest works fine (I don't have the board on me currently) and lists all the SSIDs that my computer would normally see. No warning or error messages at all. I'm certain the SSID and password are correct, as I have entered the same on my laptop and phone just to check. I've tried switching the WiFi security from WPA to WPA2 but none of them work. Thanks for helping me work this out!

        • When you type in the password, are you using a regular password or a hexadecimal key (it'll probably be 64 digits long)?

          Also, have you tried the SmartConfig demo? You might have some luck with that, as you are using your phone to send the password directly to the CC3000 rather than through the Arduino.

          • Kevin Zhu / about 10 years ago / 1

            I'm using a regular password of alphanumeric characters (26 characters long) SmartConfig does not work for me either ):

  • Member #561630 / about 10 years ago / 1

    Hi, I just use CC3000 for testing wifi, but when I run WebClient sample, it seems not working. It can not initialize because I only saw below text:


    SparkFun CC3000 - WebClient

    And nothing else.

    Hope everyone can help me to solve this issue.

    Thanks,

    • That seems like you are running out of RAM on the Arduino. Could you check a few things for me:

      • Are you using an ATmega328p version of an Arduino?
      • If you remove the shield and run the WebClient program, what happens?
      • What happens when you run the BoardTest program?

      • Member #561630 / about 10 years ago / 1

        ATmega328p I'm using Arduino Mega 2560 board. Is it ok? When I removed the shield, the result is still the same. And no difference with BoardTest.

        • The Arduino Mega is not based on the 328p - it uses an ATmega 2560 as the processor. As a result, the SPI pins are not on pins 10-13, they are on 50-53, which the shield does not cover. So, you'll need to add a 2x3 female header to the "ISP" port in order to connect to the Mega's ISP port (which has the SPI lines). Additionally, you'll need to update to the newest version of the library - I had to make a fix to allow for non-default chip select (CS) pins (so, yeah, thanks for helping find that bug :).

          • Member #561630 / about 10 years ago / 1

            Thanks for your instructions, I will try it now.

  • Member #568124 / about 10 years ago / 1

    Hi, everyone, I have some problem, I can initialize Serial Port, but the device cannot Initialize CC3000 and Connect using DHCP I am using souce from example library Anyone can Help?

      • Which demo program are you using?
      • How far are you getting in the program? Do you see "Something went wrong during CC3000 init!" or does it get to "Connecting to: <SSID>" and then it hangs?
  • Member #544260 / about 10 years ago / 1

    hi guys can i use the adafuit library which is used often in the project that i have fount in the internet ? also can i use it as a web server like this project http://www.openhomeautomation.net/wireless-relay-arduino-wifi/ ? thanks

    • Yes, the Adafruit library will work with this shield. You will need to change a few of the pins to get it to work with their example sketches. The Adafruit library supports the ability to be a web server, so in theory, it should work. Please let me know if you get it working!

  • Does the CC3000 support Class A subnets yet? Also does it support hidden SSID'S? I've never been able to get it to work on a Class A subnet. I've always had to set up a separate network and make it a class B or C subnet.

    • Not sure about Class A subnets. I have not tried it, and there's nothing in the release notes about it. If you do have any luck with it, please let us know.

      According to TI's Notes, there's one small peice about fixing an issue related to hidden SSIDs on a specific router. Based on that, I would imagine that it can handle hidden SSIDs.

  • mayor / about 10 years ago / 1

    Hi Shawn, wondering why you chose to add the 74125 in your design?

    • Do you mean the 74HC4050? If so, that acts as a 5V to 3.3V level shifter. The CC3000 is not tolerant of 5V logic.

      • mayor / about 10 years ago / 1

        I see the 74HC4050 as a level shifter; I am wondering about the 74AHC1G125 between the CC3000 SPI out and the uC MISO ? Is this in case there is more than one SPI slave? While I'm here, also wondering about the use of two ground planes? I am thinking about building my own single-sided CC3000 board, and wonder if I can get away without stitching around the antenna area.

        Thanks!

        • The 74AHC1G125 is indeed for allowing the CC3000 to work with more than 1 SPI slave. For some reason, TI does not tri-state the MISO pin whenever CS is asserted, which can (and does) put out garbage on the MISO line when you're trying to talk to other devices. The 74AHC1G125 is a band-aid that tri-states the CC3000's MISO pin whenever CS is held low.

          If you're doing your own layout, I recommend carefully reading TI's datasheet: http://www.ti.com/lit/ds/symlink/cc3000.pdf. While you'll probably get away with only 1 layer, TI highly recommends having a ground plane under the CC3000 and antenna feed line (I'm not an RF expert, so someone with more RF expertise would probably have a better answer as to why).

          • mayor / about 10 years ago / 1

            Ah, I assume you are referring to this: "For best results, the RF trace ground layer must be the ground layer immediately below the RF trace. The ground layer must be solid."

            Hmmm, not looking forward to creating home-made vias...

            Thanks for the help!

            • That's correct - I'm guessing you also saw their pictures of suggested layouts.

              I don't blame you: home made 2-layer boards would not be fun. However, I've had some good luck with cheap PCB prototyping places. I suggest:

              For "Made in USA," see https://oshpark.com

              If you don't mind "Made in China," see http://imall.iteadstudio.com/open-pcb/pcb-prototyping.html

              I've used both and can't complain about either.

              • mayor / about 10 years ago / 1

                Thanks Shawn, I'll consider those, but I want to make sure I have a working protoype before I outsource boards. You've been very helpful, I appreciate it!

                • Not a problem. Good luck!

                  • mayor / about 10 years ago / 1

                    Hi again Shawn, just wondering about something on your board. I'm done with my design, but wondered what steps you had taken to ensure 50 Ohm impedance on the RF trace? TI recommends doing microstrip calculations. Your trace is 48 mils wide, which for 1Oz FR4 results in ~0.7mm thickness. I am trying to find the right compromise; a 0.8 mm thick board gives me a 56mil trace!

                    In short, what thickness is your board (and weight?) and how critical, as far as you know, is getting the impedance spot on?

                    Thanks in advance!

                    • The CC3000 boards use 1 oz copper. And like you found, I definitely followed TI's recommendation for microstrip calculations. However, to get a 50 Ohm impedance, I really should be using a 0.118" thick trace (!). Since that's not feasible, I made it is wide as possible and short as possible to connect the components. It resulted in about 88 Ohms, which isn't ideal, but gets the job done.

                      • mayor / about 10 years ago / 1

                        Good stuff! Thanks. I was worried I'd have to use a 0.6mm thick PCB.

  • vicatcu / about 10 years ago / 1

    What CC3000 firmware versions does the SFE_CC3000_Library support?

    • The library should support 1.10 and up. The shield and breakout boards should be shipping with 1.24. It looks like TI released 1.26, so if you would like to update, check out their patch programming guide here: http://processors.wiki.ti.com/index.php/CC3000_Patch_Programmer

  • No headers and no jumpers to work with the SPI bus on the mega? I know this is only a personal opinion and I love spark fun I just ordered 2 orders from you in the last month =) but I think this is lacking the competition this time around.

    • TatankaWilly / about 10 years ago / 1

      Actually I appreciate the fact there are no headers. I spent hours pulling the headers off of some Ethernet cards when I needed to wire directly to an Arduino MEGA without stacking them.

      • I agree I don't like them populated on the shield but I still like them included in the box/bag.

        • Member #621726 / about 9 years ago / 1

          Hey TatakaWilly.... I am able to coonect with he sample "ConnectionTest" sketch. Do you have a sample web server sketch, by any chance?..... I have been looking around with no luck..

  • Zio / about 10 years ago / 1

    What is the incentive of using this over the Yun?

  • Member #500723 / about 10 years ago / 1

    Would this shield make it possible to reprogram the arduino over the air?

    • As it is, it cannot. The CC3000 uses the SPI bus, and Arduino programming happens over UART. However, it is possible to create a bridge (from another Arduino, perhaps) that takes in SPI data from the CC3000 and uses it to re-program your target Arduino.

  • ag3c / about 10 years ago / 1

    "Eagle Files" link is incorrect, points to the same schematic PDF as the first link. Please fix?

  • Garfieldboy / about 10 years ago / 1

    Ahhh, so Sparkfun is the reason why the TI boosterpack is out of stock everywhere !!! YOU bought all the modules!!!

  • Dragon88 / about 10 years ago / 1

    Please make and sell the little laser-cut adapter for the external antenna. I'm sure it would be useful for other things too.

  • cnd isysun / about 10 years ago / 1

    hey It is great to see CC3000 under sparkfun finally.... I am wondering how do you process reflow soldering for this specific component like CC3000. Because reflow soldering of such larger component with LGA and metal cover is very different from "black components" with extended legs. How do you set temperature profile for Oven? Would you like to show us about soldering from your production team. A 3 min video would be great for it.

  • I'm a bit confused by your spec's above. It appears your supply Voltage in straight from the data sheet of the CC3000. Since you are using a 5-3.3V LDO shouldn't you supply voltage for this board be based on those numbers. With that said shouldn't this "Shield" be capable of over 5V in? and not 4.8? Looking at the data sheet of the LDO it is rated for up to 20V max 15V recommended max, and your shift register should be good for 5V tolerant pins such as a standard Arduino.

Customer Reviews

3.6 out of 5

Based on 7 ratings:

Currently viewing all customer reviews.

3 of 3 found this helpful:

Does not work uncustomized with the OSEPP Mega 2560 R3

Could not get the CC3000 to initialize with any of the SFE_CC3000.h libraries plugged into an OSEPP Mega 2560 R3 Arduino board. Tried everything software possible but no luck.....

The shield has a dual parallel header row for all the digital and comms pins passed up from the Arduino and the INT, EN and CS lines are hardwired to pins 2,7 and 10 respectively.

To solve the issue: I installed stack-able headers on the outer edges to match the footprint of the Ardiono and a male header in the parallel header row. I installed a stackable 3x2 header on the underside of the board in the ISP header so it plugs diretly into the ICSP on the Arduino board so that MISO, SCK and MOSI gets connected via this route. I cut the link tracks between the parallel header pads for the SCK, MISO, MOSI, SDCS, EN and INT lines so I can assign them to what ever I pins I want.

As soon as I assigned INT, EN and CS to Pins 3,22 and 24 respectively the module started working.

I suggest an upgraded design which includes a 7 bit dip switch that allows the user to disconnect any of the hardwired lines between the two headers as they wish, or at least 0R jumpers that can be removed if needed. This will make for much wider compatibility across the different Arduino boards.

Works fine now...

Hi, Sorry for the trouble. And thank you for the notes on how you worked around the issue. I'll pass along your suggestions for possible revisions. Thanks

4 of 4 found this helpful:

Working, but fit is weird

The shield is working as expected, but it doesn't fit well over an Arduino Uno R3. The shield is ~1/8" too long on the left side (side the SD card reader is on) and that hits the USB and power jack of the Uno such that the shield can't sit flush to the Uno's headers. Still, the Stackable Header Kit (PRT-11417) pins are long enough to allow for this flexibility, it just makes the shield+Uno connection a little wobbly.

Just wont stay connected

I am trying to use a RedBoard with Blynk and the CC3000 shield, and it drops connection after a matter of minutes to hours. I've been working with the Blynk community and their consistent advice is to avoid the CC3000 because it is just not stable for long-running projects. I'm fed up with tweaking my code, searching for workarounds, and delving into the fine details of this board. It just isn't stable.

Hello!

You can reach out to our technical support department here: https://www.sparkfun.com/technical_assistance I am sure they would be happy to assist you to the best of their abilities.

Easy startup; difficult customization

I was pleased at how easy it is to get the WiFi talking to the access point. Beyond that, I still have not figured out how to modify the usage. For instance, I want to perform peer-to-peer linking. I am slowly getting the impression that it can't be done, but I'm not sure yet.

CC3000 review

I am using the CC3000 board as a platform from which I am able to connect my Arduino Mega( which has various sensors attached) to my hosted db. The data is then processed and displayed on my site. So far the CC3000 has performed well with the exception that I thought the on-board antenna would be more powerful than it is, having read the board description on its web page. I had to buy an external duck antenna in order to make wireless connections that I am able to make with my Sammy phone, tablet, and Dell laptop. I really thought the board should at least be able to equal the wireless connectivity capabilities of those products, as it is to be used in similar connection situations. Also, I would like to see better documentation on the library functions. I am somewhat new to programming in the Arduino 'verse, including all the associated microprocessor add-on devices like the CC3000. I guess I should say I am not so familiar with C++, or C. I use PHP, JQuery, and the other usual Web app languages. For me, better library documentation would go a long way - time I have to take looking at functions to determine what is going on is wasted time, it's more like reverse engineering than being able to read a well documented API, take Java as an example. Having said all that, maybe I am missing the boat on some good documentation!! If there is some good stuff out there could you please point me to it? Overall I am happy with the board, perhaps it is just my ignorance and inexperience with the platform that has me grousing!

One thing I would like to say is that so far my experience with customer service has been VERY good! Some of the best in the industry!

Works Great!

Excellent product, works as advertised once I found the correct connections for use on an Arduino Mega.

Very happy with this!

I was able to get this shield up and running super quick. After a bit of work getting it to connect with my WiFi, I was able to push sensor data easily to data.sparkfun.com. Very easy to use!