CC3000 WiFi Shield Not working

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

CC3000 WiFi Shield Not working

Post by gailu »

Hi,

I purchased Adafruit CC3000 Wifi shield from Proto Central (Adafruit distributor) in BANNED this week. I am using latest github library and tried to run both smartConfigCreate and builttest sketch but with the same result. It stuck at

Code: Select all

Hello, CC3000!

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

Initialising the CC3000 ...
This seems to be similar problem as listed in thread viewtopic.php?f=31&t=57060 I followed different suggestions in the thread but it is not working. There is no final solution in thread and that worries me. My router is set to 802.11g and SSID password encryption etc are correct in buildtest sketch.

I tried to dig in to library by enabling logs in Adafruit_CC3000.cpp by compile flag (#define DEBUGPRINT_F(x) Serial.print(x)) and I can say that it is stuck in wlan_start(patchReq); inside Adafruit_CC3000::begin. wlan_start never returns. I get following prints

Code: Select all

ello, CC3000!

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

Initialising the CC3000 ...
init
start
There is an ioctl print after wlan_start() call and I am not getting that print that simply means that wlan_start is never returning.

Only thing that seems to be working on shield is the corner push button that resets the board

gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

Re: CC3000 WiFi Shield Not working

Post by gailu »

I have now enabled logs in ccspi.c and ReadWlanInterruptPin is getting called again and again that is where it is looping and not coming out of wlan_start(). Here is the log enabled ReadWlanInterruptPin() function

Code: Select all

long ReadWlanInterruptPin(void)
{
  long pinstatus = 0;
  DEBUGPRINT_F("\tCC3000: ReadWlanInterruptPin - ");
  pinstatus = digitalRead(g_irqPin);
  DEBUGPRINT_F(pinstatus);
  DEBUGPRINT_F("\n\r");

  return(pinstatus);
}

Code: Select all

Hello, CC3000!

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

Initialising the CC3000 ...
        CC3000: init_spi
        CC3000: Finished init_spi
init
start
        CC3000: SpiOpen CC3000: WlanInterruptEnable.
        CC3000: Finished SpiOpen
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        ...

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 WiFi Shield Not working

Post by tdicola »

Thanks for grabbing the detailed debug info, that helps a lot to try troubleshooting further. It looks like the code is waiting for the interrupt pin to drop from high to low, this is a signal that the CC3000 is ready to send data to the microcontroller. Since this is happening in the very first call to try talking to the CC3000 lets check if there are some simple things that might be causing the CC3000 to not turn on or communicate with the Arduino.

One thing to check first is the wiring and solder connections. Can you grab some pictures of the shield and it's solder joints? Also what kind of Arduino are you using with the board, is it an Uno, Leonardo, Mega, etc?

The second thing to check is power, if there isn't enough power the CC3000 won't be able to fully turn on and could behave like how you see. When power is applied to the Arduino, does the green power LED on the CC3000 turn on? Does the light ever dim noticeably? If you have a multimeter handy what's the voltage on the 5V pin of the Arduino? This is good to check to see if the voltage is dropping too low because the power supply isn't strong enough (ideally should be about 1A, like a powering a Raspberry Pi).

gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

Re: CC3000 WiFi Shield Not working

Post by gailu »

Hi,

Sorry I took some time to verify the soldering as that is the only piece I have done. I got it verified with other electronic guy taking it to a TV repairing shop. Breakout may require wiring shield doesn't seem to require any wiring and after soldering it plugs in to arduino smoothly. I believe soldering is OK. I am using seeeduno V3.0, it is 100% compatible with Arduino duemilanove. You may say that shield is not tested with this but I see no reason why it should not work. I checked pin mapping and they all seems to be right.

I do not have multimeter. Actually I am not an electronic person, I write software and do not know how to debug electronics. I have used various shield before mostly comes with soldered stackable header. This is the first shield where I have to solder pins after receiving it.

Also I would like to bring in to notice that if I change IRQ pin from 2 to 3 (#define ADAFRUIT_CC3000_IRQ 3) it hangs during prints (CC3000: ReadWlanInterruptPin - 1 message) after printing around 20 times.

Yes the power LED is on, but it never dim noticeably. Does that give any clue? Attaching a picture. Its not very clear but that is the best my Moto E is able to take.
Attachments
IMG_20140722_123944462.zip
(818.23 KiB) Downloaded 33 times

gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

Re: CC3000 WiFi Shield Not working

Post by gailu »

I managed to move forward by adding delay in wlan.cpp as below. However now it stuck in SimpleLink_Init_Start.

Delay

Code: Select all

		// wait till the IRQ line goes low
		while(tSLInformation.ReadWlanInterruptPin() != 0)
		{
            delay(100);
		}
New Logs

Code: Select all

Hello, CC3000!

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

Initialising the CC3000 ...
        CC3000: init_spi
        CC3000: Finished init_spi
init
start
        CC3000: SpiOpen CC3000: WlanInterruptEnable.
        CC3000: Finished SpiOpen
        CC3000: ReadWlanInterruptPin - 1
        CC3000: ReadWlanInterruptPin - 1
        CC3000: Entering SPI_IRQ
        CC3000: Leaving SPI_IRQ
        CC3000: ReadWlanInterruptPin - 0
SimpleLink start
        CC3000: SpiWrite
        CC3000: SpiWriteFirst
        CC3000: SpiWriteDataSynchronous Start

        CC3000: SpiWriteDataSynchronous End
        CC3000: SpiWriteDataSynchronous Start

        CC3000: SpiWriteDataSynchronous End

gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

Re: CC3000 WiFi Shield Not working

Post by gailu »

BTW, May I know if it ever worked with ATMEGA328. I see a post on TI forum http://e2e.ti.com/support/wireless_conn ... 15960.aspx but only suggestion there is to upgrade firmware.
I am not able to determine the firmware on the CC3000, it stuck before that and problem seems to be related to SPI and not sure how to upgrade firmware on shield as the communication is not established.

gailu
 
Posts: 6
Joined: Fri Jul 18, 2014 8:09 am

Re: CC3000 WiFi Shield Not working

Post by gailu »

Problem Solved.

It was due to Voltage level set to 3.3v on the Seeeduno V3. Setting it to 5V made it work without any further issue.

Thanks for your help and support.

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 WiFi Shield Not working

Post by tdicola »

Oh good to hear it was an easy fix, thanks for the followup on the solution.

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

Return to “Arduino Shields from Adafruit”