I'm trying to send an email using an Arduino Uno and a Sparkfun CC3000. When I plugged in the arduino to the computer with the code I wrote for it, all wireless communication in the room I was in went down. This includes both computers that were there, my cell phone, even my Pebble Watch got disconnected. Any idea on why this happened and how to fix it? I replicated this numerous times to make sure it wasn't a fluke.

Here is my code

CC3000 Ping Test
Shawn Hymel @ SparkFun Electronics
February 1, 2014

Connects to the access point given by the SSID and password and
waits for a DHCP-assigned IP address. Pings the give website or
IP address and waits for a response.

The security mode is defined by one of the following:

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

Include SPI.h and SFE_CC3000.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>
#include <SFE_CC3000.h>
#include <SFE_CC3000_Client.h>
#include <Client.h>
#include <Temboo.h>
#include "TembooAccount.h" // Contains Temboo account information

// Pins
#define CC3000_INT      3   // Needs to be an interrupt pin (D2/D3)
#define CC3000_EN       9   // 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[] = "comcast";                  // SSID of network
char ap_password[] = "gooddays";          // Password of network
unsigned int ap_security = WLAN_SEC_WPA2; // Security of network
unsigned int timeout = 30000;             // Milliseconds
char remote_host[] = "www.sparkfun.com";  // Host to ping
unsigned int num_pings = 3;    // Number of times to ping

// Global Variables
SFE_CC3000 wifi = SFE_CC3000(CC3000_INT, CC3000_EN, CC3000_CS);
SFE_CC3000_Client client = SFE_CC3000_Client(wifi);

int numRuns = 1;   // Execution count, so this doesn't run forever
int maxRuns = 10;

void setup() {

  ConnectionInfo connection_info;
  IPAddress ip_addr;
  IPAddress remote_ip;
  PingReport ping_report = {0};
  int i;

  // Initialize Serial port
  Serial.println("SparkFun CC3000 - Ping Test");

  // Initialize CC3000 (configure SPI communications)
  if ( wifi.init() ) {
    Serial.println("CC3000 initialization complete");
  } else {
    Serial.println("Something went wrong during CC3000 init!");

  // Connect and wait for DHCP-assigned IP address
  Serial.print("Connecting to: ");
  if(!wifi.connect(ap_ssid, ap_security, ap_password, timeout)) {
    Serial.println("Error: Could not connect to AP");

  // Gather connection details and print IP address
  if ( !wifi.getConnectionInfo(connection_info) ) {
    Serial.println("Error: Could not obtain connection details");
  } else {
    Serial.print("IP Address: ");
    for (i = 0; i < IP_ADDR_LEN; i++) {
      if ( i < IP_ADDR_LEN - 1 ) {

  // Perform a DNS lookup to get the IP address of a host
  Serial.print("Looking up IP address of: ");
  if ( !wifi.dnsLookup(remote_host, &remote_ip) ) {
    Serial.println("Error: Could not lookup host by name");
  } else {
    Serial.print("IP address found: ");
    for (i = 0; i < IP_ADDR_LEN; i++) {
      Serial.print(remote_ip[i], DEC);
      if ( i < IP_ADDR_LEN - 1 ) {

  // Ping IP address of remote host
  Serial.print("Pinging ");
  for (i = 0; i < IP_ADDR_LEN; i++) {
    Serial.print(remote_ip[i], DEC);
    if ( i < IP_ADDR_LEN - 1 ) {
  Serial.print(" ");
  Serial.print(num_pings, DEC);
  Serial.println(" times...");
  if ( !wifi.ping(remote_ip, ping_report, 3, 56, 1000) ) {
    Serial.println("Error: no ping response");
  } else {
    Serial.print("Packets sent: ");
    Serial.print("Packets received: ");
    Serial.print("Min round time (ms): ");
    Serial.print("Max round time (ms): ");
    Serial.print("Avg round time (ms): ");

  // Disconnect
  if ( wifi.disconnect() ) {
  } else {
    Serial.println("Error: Could not disconnect from network");

  // Done!
  Serial.println("Finished ping test");

    TembooChoreo SendEmailChoreo(client);
void loop() {
  if (numRuns <= maxRuns) {
    Serial.println("Running SendEmail - Run #" + String(numRuns++));

    //TembooChoreo SendEmailChoreo(client);

    // Invoke the Temboo client

    // Set Temboo account credentials

    // Set profile to use for execution

    // Identify the Choreo to run

    // Run the Choreo; when results are available, print them to serial

    while(SendEmailChoreo.available()) {
      char c = SendEmailChoreo.read();

  delay(30000); // wait 30 seconds between SendEmail calls
  • 1
    It could be that your code is making it respond to all ARP WHOHAS requests with a big "ME!!!!" regardless. Impossible to say without seeing your code though. – Majenko May 15 '15 at 14:44
  • @Majenko, ok, I'll post my code – Bochur613 May 15 '15 at 15:56
  • Could you include in your answer the output you get in the serial monitor? – NULL May 19 '15 at 19:17
  • It would definitely be useful to see the serial printouts. I'm a little curious at how this works, I've used the Adafruit_CC3000 which works in a very similar way, although I've never tried to send emails from it before. Is it just me or are you connecting and disconnecting from the wifi in your setup(), and then trying to send an email from the loop()? Does this work? I would have thought not... – bladepanthera May 20 '15 at 10:40
  • I'll try to get a readout later but basically, sometimes the cc3000 will run a ping test, sometimes it won't connect. It can't do anything with consistency. – Bochur613 May 20 '15 at 13:08

Because of the limited information given any answers given will be by nature limited. However, I can suggest several troubleshooting tips.


  1. Verify that username and password used are exactly right(punctuation, spaces, etc.). Where you putcomcast you should put the name of the network not the name of the provider. I am not sure if you have done this or not.
  2. Make sure network is in fact WPA2.
  3. In order to debug the issue make sure if you are getting nothing through serial to set it to the baud rate of 115200.
  4. If you are using the breakout board make sure you correctly wired it and check any solder points: wiring
  5. Make sure you have the correct libraries installed. Also, try sample code from the examples. Libraries can be found here.

Many of these seem obvious but can through someone off. So try these and let me know the results. A lot of information about setup can be found here.

EDIT Try removing the

if ( wifi.disconnect() ) {
  } else {
    Serial.println("Error: Could not disconnect from network");

block. It appears that you are disconnecting before going into the main loop. This would obviously make it impossible to send an email. The reason pining would work sometimes would be that wifi.disconnect() is called sometimes but not all the time. To narrow the issue try an example code from the library.

|improve this answer|||||
  • all of that was checked and double checked. It's all correct – Bochur613 May 20 '15 at 13:08
  • See EDIT above. I really need more info about you setup to properly answer your question. – NULL May 20 '15 at 14:09

not a direct answer but the sparkfun hookup guide connects pin 8 (SDCS) to the chip select for the SD card. If this line is floating, I'm not sure of the impact.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.