I'm using WEP - how do I configure my HEX passphrase?

If your passphrase is a series of HEX digits, you can't simply enter it as a literal string. Instead you have to define is as an actual binary sequence.
For example, if your passphrase is 8899aabbccdd, you would define it as follows (note the 0x00 at the end!  It's important!):

//  #define WLAN_PASS       "8899aabbccdd"  //don't do it this way!
//do it this way:
const char WLAN_PASS = {0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0x00};
I'm using WEP and I tried that but it still doesn't work
Make sure you have WLAN_SECURITY defined as WEP:

#define WLAN_SECURITY   WLAN_SEC_WEP
What is the gain of the ceramic antenna? How does it compare to the external antennas?
We use the Johannson 2500AT44M0400 which has 0.5 dBi gain. Compare this to the external antennas with 2 dBi and 5dBi. Since antenna 'range' is not linear with the gain and antenna range has a lot to do with what else is transmitting or receiving, physical barriers, noise, etc. We can roughly say that the ceramic antenna has half the range of the 2dBi antenna, and the 5dBi antenna has double the range of the 2dBi antenna (roughly!)
There is no way to know the actual range you will get unless you experiment with your setup since there is so many variables, but the ceramic antenna gets about the same range we expect with an every day cellphone

How can I use the CC3000 with a static IP?

WiFi device IPs are dynamic 99% of the time, but it is possible to assign a static IP if your router permits it. Check out this forum post for how to go about it

I'm having difficulty seeing/connecting to my network...
If you have an '802.11n only' router please configure it to add 'b or g' support. The CC3000 is 802.11b or g only, it does not do 'n'!
I'm not in the USA and my CC3000 can't see my router

The CC3000 only operates on channels 1 through 11. Outside of the United States, you may be able to configure your router to a channel number outside of that range. Make sure your router is configured for a channel in the range 1 through 11.

My CC3000 sketch locks up when initializing the CC3000...

A lockup during initialization is a very common issue when there isn't enough power to supply both the Arduino and CC3000 board.  Make sure you're powering the Arduino from a 1 amp or higher rated external power supply.  Don't try to power the Arduino from a computer/laptop USB port because those ports typically can't provide enough power and will cause lockups!

If you're using an Arduino UNO you can plug in a 7-12 volt power supply to the barrel jack on the board.  A supply like this 9V 1amp wall wart is perfect for the Arduino UNO and CC3000.

Also if your Arduino supports changing the voltage of the digital I/O pins (like some 3rd party Arduino clones), make sure the voltage is set to 5 volts and not 3.3 volts.

My CC3000 sketch locks up after running for a while or under heavy load...

Unfortunately there is a well known internal issue with the CC3000 which can cause lock ups and instability over time or under heavy load.  This thread on the Spark Core forums dives deeply into the issue and investigation with Texas Instruments.  Ultimately the latest firmware version 1.13 was released with a potential fix for the stability problems.  If you'd like to upgrade to firmware version 1.13 see the page on firmware upgrades in this guide.

How do I set a static IP address?

By default the CC3000 is configured to get an IP address automatically from your router using DHCP.  In most cases this works well, however if you run into trouble getting an IP address or DNS server you should consider setting a static IP address and DNS server.

To set a static IP address make sure you have the latest version of the CC3000 library and load the buildtest example.  Scroll down to the commented section of code in the setup function which discusses setting a static IP address:

/*
uint32_t ipAddress = cc3000.IP2U32(192, 168, 1, 19);
uint32_t netMask = cc3000.IP2U32(255, 255, 255, 0);
uint32_t defaultGateway = cc3000.IP2U32(192, 168, 1, 1);
uint32_t dns = cc3000.IP2U32(8, 8, 4, 4);
if (!cc3000.setStaticIPAddress(ipAddress, netMask, defaultGateway, dns)) {
Serial.println(F("Failed to set static IP!"));
while(1);
}
*/

Remove the /* and */ comment delineators and fill in the IP address, net mask, default gateway, and DNS server values for your network. You might need to check your router's configuration page to find these details.

Run the buildtest sketch and the CC3000 should be configured to use the static IP address and configuration you assigned. You can actually remove or comment out the IP assignment code because the CC3000 will remember the configuration in its internal non-volatile storage.

If you'd ever like to enable DHCP again, load buildtest and uncomment the section below the static IP address configuration:

/*
if (!cc3000.setDHCP()) {
Serial.println(F("Failed to set DHCP!"));
while(1);
}
*/

How do I connect to a college/hotel/airport WiFi network that requires using a web page to authenticate?

Unfortunately these networks are difficult or sometimes impossible for the CC3000 to connect to because they require using a web browser to authenticate with the network.  However a couple options to pursue are:

  • Try contacting the network support team / administrator and see if they can allow the CC3000 onto the network based on its MAC address. When you run the buildtest sketch it will print out the CC3000 MAC address so you can copy it from there. This option is the easiest and most reliable way to get onto the network, but might not be available depending on the network's policies.
  • The second option is to clone the MAC address of a laptop or device you've gotten on the network already. For this you'll want to find the MAC address of the laptop/computer (usually in network settings, search online to get a direct answer depending on the OS you're using). Then uncomment and adjust the commented code in the setup function of the buildtest example which sets the MAC address of the CC3000. Fill in your laptop/computer's MAC address and run the sketch to have the CC3000 start using the provided MAC addres.  Unfortunately at this point you have to turn off the cloned laptop/computer or at least disconnect it from the network because two devices with the same MAC can't be on the network at the same time (they'll get confused and start seeing each other's traffic).
I'm using the IPAddress class or an example from the Ethernet library and it doesn't work, what's wrong?

The IPAddress class is not compatible with the IP addresses the CC3000 classes expect.  However you can switch to using the CC3000.IP2U32 function to generate an IP address.  See this line in the buildtest example for how to use this function, and what type to use to store the IP address (an unsigned 32-bit integer).  Unfortunately the Arduino compiler will try to convert an IPAddress into this type so ethernet library code might compile, but when the code actually runs it will fail because the data is not in the right order.  Stick to using the IP2U32 function!

This guide was first published on Sep 16, 2013. It was last updated on Sep 16, 2013.

This page (FAQ) was last updated on Oct 14, 2013.

Text editor powered by tinymce.