cc3000 stucks on Initialising the CC3000 ...

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

cc3000 stucks on Initialising the CC3000 ...

Post by herone »

Hi!

I've bought a few months ago the adafruit cc3000 wifi shield, but I haven't used for a long long time. Now, I've added it to my project, and it doesn't work!!!

I'm adding my SSID and password to the sketch, and uploading it to my Mega 2560. When I open the terminal window,it says:

Code: Select all

Hello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes
Free RAM: 6870

Initialising the CC3000 ...
and it's stuck there.

I have check the ssid and password so many times, but it does nothing.

I've read a lot of times the info, i've searched in google for similar issues, but found nothing.

I've the jumpers in the back soldered, and i've check with a multimeter if there is continuity between mosi, miso and clk pins from the breadboad and the isp header and there is, so the soldering is right.

I can use the SD card. I've uploaded the datalogger example from http://arduino.cc/en/Tutorial/Datalogger and it doesn't work, so i don't know what is going on.

It's so important to me to have this working, because this is my final degree year and I need the wifi shield to acomplish 100% of my degree asigment.

User avatar
garyvdg
 
Posts: 91
Joined: Thu Jul 25, 2013 12:37 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by garyvdg »

If the printout you show is all you get, then there seems to be a problem with the MEGA initiating with the CC3000.
This could be due to a wiring or other physical connection problem. Are you using the CC300 Shield or the breakout board?
Also, please show the code you are using. There may be a conflict with the SD card settings.

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

Hi! thanks for your anwser. this post is the build test from the examples from de library.

Code: Select all

/*************************************************** 
  This is an example for the Adafruit CC3000 Wifi Breakout & Shield

  Designed specifically to work with the Adafruit WiFi products:
  ----> https://www.adafruit.com/products/1469

  Adafruit invests time and resources providing this open source code, 
  please support Adafruit and open-source hardware by purchasing 
  products from Adafruit!

  Written by Kevin Townsend & Limor Fried for Adafruit Industries.  
  BSD license, all text above must be included in any redistribution
 ****************************************************/

/*

This example does a full test of core connectivity:
* Initialization
* SSID Scan
* AP connection
* DHCP printout
* DNS lookup
* Ping
* Disconnect
It's a good idea to run this sketch when first setting up the
module.

*/

#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"

// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ   3  // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
                                         SPI_CLOCK_DIV2); // you can change this clock speed but DI

#define WLAN_SSID       "ONOEBB4"        // cannot be longer than 32 characters!
#define WLAN_PASS       "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_WPA2



/**************************************************************************/
/*!
    @brief  Sets up the HW and the CC3000 module (called automatically
            on startup)
*/
/**************************************************************************/
void setup(void)
{
  Serial.begin(115200);
  Serial.println(F("Hello, CC3000!\n")); 

  displayDriverMode();
  Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
  
  /* Initialise the module */
  Serial.println(F("\nInitialising the CC3000 ..."));
  if (!cc3000.begin())
  {
    Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
    while(1);
  }

  /* Optional: Update the Mac Address to a known value */
/*
  uint8_t macAddress[6] = { 0x08, 0x00, 0x28, 0x01, 0x79, 0xB7 };
   if (!cc3000.setMacAddress(macAddress))
   {
     Serial.println(F("Failed trying to update the MAC address"));
     while(1);
   }
*/
  
  uint16_t firmware = checkFirmwareVersion();
  if ((firmware != 0x113) && (firmware != 0x118)) {
    Serial.println(F("Wrong firmware version!"));
    for(;;);
  }
  
  displayMACAddress();
  
  /* Optional: Get the SSID list (not available in 'tiny' mode) */
#ifndef CC3000_TINY_DRIVER
  listSSIDResults();
#endif
  
  /* Delete any old connection data on the module */
  Serial.println(F("\nDeleting old connection profiles"));
  if (!cc3000.deleteProfiles()) {
    Serial.println(F("Failed!"));
    while(1);
  }

  /* Attempt to connect to an access point */
  char *ssid = WLAN_SSID;             /* Max 32 chars */
  Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
  
  /* NOTE: Secure connections are not available in 'Tiny' mode! */
  if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
    Serial.println(F("Failed!"));
    while(1);
  }
   
  Serial.println(F("Connected!"));
  
  /* Wait for DHCP to complete */
  Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP())
  {
    delay(100); // ToDo: Insert a DHCP timeout!
  }  

  /* Display the IP address DNS, Gateway, etc. */  
  while (! displayConnectionDetails()) {
    delay(1000);
  }
  
#ifndef CC3000_TINY_DRIVER
  /* Try looking up www.adafruit.com */
  uint32_t ip = 0;
  Serial.print(F("www.adafruit.com -> "));
  while  (ip  ==  0)  {
    if  (!  cc3000.getHostByName("www.adafruit.com", &ip))  {
      Serial.println(F("Couldn't resolve!"));
    }
    delay(500);
  }  
  cc3000.printIPdotsRev(ip);
  
  /* Do a quick ping test on adafruit.com */  
  Serial.print(F("\n\rPinging ")); cc3000.printIPdotsRev(ip); Serial.print("...");  
  uint8_t replies = cc3000.ping(ip, 5);
  Serial.print(replies); Serial.println(F(" replies"));
  if (replies)
    Serial.println(F("Ping successful!"));
#endif

  /* You need to make sure to clean up after yourself or the CC3000 can freak out */
  /* the next time you try to connect ... */
  Serial.println(F("\n\nClosing the connection"));
  cc3000.disconnect();
}

void loop(void)
{
  delay(1000);
}

/**************************************************************************/
/*!
    @brief  Displays the driver mode (tiny of normal), and the buffer
            size if tiny mode is not being used

    @note   The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
  #ifdef CC3000_TINY_DRIVER
    Serial.println(F("CC3000 is configure in 'Tiny' mode"));
  #else
    Serial.print(F("RX Buffer : "));
    Serial.print(CC3000_RX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
    Serial.print(F("TX Buffer : "));
    Serial.print(CC3000_TX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
  #endif
}

/**************************************************************************/
/*!
    @brief  Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
  uint8_t major, minor;
  uint16_t version;
  
#ifndef CC3000_TINY_DRIVER  
  if(!cc3000.getFirmwareVersion(&major, &minor))
  {
    Serial.println(F("Unable to retrieve the firmware version!\r\n"));
    version = 0;
  }
  else
  {
    Serial.print(F("Firmware V. : "));
    Serial.print(major); Serial.print(F(".")); Serial.println(minor);
    version = major; version <<= 8; version |= minor;
  }
#endif
  return version;
}

/**************************************************************************/
/*!
    @brief  Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
  uint8_t macAddress[6];
  
  if(!cc3000.getMacAddress(macAddress))
  {
    Serial.println(F("Unable to retrieve MAC Address!\r\n"));
  }
  else
  {
    Serial.print(F("MAC Address : "));
    cc3000.printHex((byte*)&macAddress, 6);
  }
}


/**************************************************************************/
/*!
    @brief  Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
  uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
  
  if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
  {
    Serial.println(F("Unable to retrieve the IP Address!\r\n"));
    return false;
  }
  else
  {
    Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
    Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
    Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
    Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
    Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
    Serial.println();
    return true;
  }
}

/**************************************************************************/
/*!
    @brief  Begins an SSID scan and prints out all the visible networks
*/
/**************************************************************************/

void listSSIDResults(void)
{
  uint8_t valid, rssi, sec, index;
  char ssidname[33]; 

  index = cc3000.startSSIDscan();

  Serial.print(F("Networks found: ")); Serial.println(index);
  Serial.println(F("================================================"));

  while (index) {
    index--;

    valid = cc3000.getNextSSID(&rssi, &sec, ssidname);
    
    Serial.print(F("SSID Name    : ")); Serial.print(ssidname);
    Serial.println();
    Serial.print(F("RSSI         : "));
    Serial.println(rssi);
    Serial.print(F("Security Mode: "));
    Serial.println(sec);
    Serial.println();
  }
  Serial.println(F("================================================"));

  cc3000.stopSSIDscan();
}

I have checked the wiring, but i don't think there is any issue...

I'm using the CC3000 shield, and I've solder the backside jumpers

User avatar
garyvdg
 
Posts: 91
Joined: Thu Jul 25, 2013 12:37 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by garyvdg »

Hello,

About half way through the Setup section, there is a bit of code for inserting a DHCP timeout value.

Code: Select all

Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP())
  {
    delay(5000); // ToDo: Insert a DHCP timeout!
  }  
By changing the value from 100 to 5000, I was able to make your code work with my set up -- an Arduino MEGA and CC3000 shield. Below is the serial monitor output I got.

Code: Select all

Hello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes
Free RAM: 6870

Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x59 0x84 0xA0
Started AP/SSID scan


Networks found: 7
================================================
SSID Name    : BELL170
RSSI         : 83
Security Mode: 2

SSID Name    : BEL
RSSI         : 46
Security Mode: 1

SSID Name    : Mitc@'s Wi-Fi Betwork
RSSI         : 51
Security Mode: 3

SSID Name    : ogers32588
RSSI         : 45
Security Mode: 3

SSID Name    : Barnaby
RSSI         : 39
Security Mode: 3

SSID Name    : @P-Print-56-ENVY 4500 series
RSSI         : 35
Security Mode: 3

SSID Name    : MARTIN
RSSI         : 39
Security Mode: 2

================================================

Deleting old connection profiles

Attempting to connect to BELL170
Started AP/SSID scan




Connecting to BELL170...Waiting to connect...Connected!
Request DHCP

IP Addr: 192.168.2.42
Netmask: 255.255.255.0
Gateway: 192.168.2.1
DHCPsrv: 192.168.2.1
DNSserv: 192.168.2.1
www.adafruit.com -> 207.58.139.247

Pinging 207.58.139.247...5 replies
Ping successful!


Closing the connection

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

Thanks for your answer, but it doesn't work for me....

I've changed the delay to 5000 and also to 10000 but it doesn't work.... it's really anoying... i'd paid a lot of money for a product that doesn't work....

User avatar
garyvdg
 
Posts: 91
Joined: Thu Jul 25, 2013 12:37 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by garyvdg »

Sounds you have like a hardware problem, which could be any number of things including faulty shield.
It may even be your modem or WIFI receiver/router. Have you tried re-setting it?
Also, if you have an Apple WIFI receiver, I have heard there may be some issues you would need to address.
Sorry, I can't help you more.

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

Thanks so much for your answers and effort!

I don't think is a problem with the modem, cause I've tested it on my gf's house, and it doesn't work also in there. (different routers)

I'll contact with a moderator or technical service, maybe i can return it and get another one....

grettings mate!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by adafruit_support_mike »

Could you post a photo of the shield and the way you have it connected to the Mega please?

Our standard return/replace period runs 30 days, and it sounds like we're well outside that. There are a couple of things to check when using the CC3000 shield with a Mega though, like correct routing of the SPI signals.

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

hi!

you can see the images in the links below:

https://www.dropbox.com/s/d5skmblevrfrven/IMAG1114.jpg

https://www.dropbox.com/s/j5qq6nmqfhlpzsr/IMAG1113.jpg

I know that i passed the time for returns, but I havn't tested it yet. Don't know how things work in USA, but here in Europe, we have at least 2 years of warranty...

User avatar
jonlab
 
Posts: 51
Joined: Mon Jun 03, 2013 4:15 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by jonlab »

Hi,

No offense, but your solder joints doesn't look that good...
Maybe try to clean that up to be sure you have reliable connections.

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

I i'll check it, but i've check continuity between mosi miso clk pins from the board to the scpi header and my multimeter says that there is continuity

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

I've just checked all the soldering and it's fine. I've resolder the backside jumpers for the mega.

I've also check if there is any short on the board between any pin, and there is no one.

So, nothing related to soldering... Also, i've used my project with the shield attached to the mega and it works fine...

Any suggestions? should i check anything else (hardware related)?

User avatar
garyvdg
 
Posts: 91
Joined: Thu Jul 25, 2013 12:37 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by garyvdg »

herone wrote: Also, i've used my project with the shield attached to the mega and it works fine...
This statement makes me wonder if you are trying to use the shield off, i.e., detached from, the Arduino board and that's when it's giving you the problem. If so, that's a different situation altogether.

herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: cc3000 stucks on Initialising the CC3000 ...

Post by herone »

I don't know if I've explained myself right. What I mean was that i've other project ( a home-domotic system) and it works just the same way with and without the shield on.

When I try to upload the build test sketch from examples/adafruit cc3000 library, i do it with the shield attached.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: cc3000 stucks on Initialising the CC3000 ...

Post by adafruit_support_mike »

To verify, are you saying the CC3000 shield has worked in the past, but won't connect now, even using the buildtest sketch?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”