9 years, 9 months ago.

cc3000 not connecting

I am using a Nucleo and cc3000 breakout shield to ping Google. The wifi passes the connect test but not the is_connected and returns blanks for the IPAddress etc, it also returns 0.0.0.0 for the Google IP and recieves 0 pings although it was working before. My code is below, can anyone help please?

#include "mbed.h"
#include "cc3000.h"
#include "main.h"

using namespace mbed_cc3000;

#if (MY_BOARD == WIFI_SHEILD_ADAFRUIT)
cc3000 wifi(PB_3, PB_4, PB_6, SPI(PA_7, PA_6, PA_5), "SSID", "password", WPA2, false); //irq, en, cs, spi, irq-port
Serial pc(PA_11, PA_12); // tx, rx
#endif

int main() 
{
    pc.printf("CC3000 ping demo. \r\n");

    wifi.init();
    if (wifi.connect(5000) == false) 
    {
        pc.printf("Failed to connect. Please verify connection details and try again. \r\n");
    } 
    else 
    {
        pc.printf("Connected \r\n\n");
    }
    
    bool conn = wifi.is_connected();
    bool dhcp = wifi.is_dhcp_configured();
    bool enabled = wifi.is_enabled();
    char *gate = wifi.getGateway();
    char *mac = wifi.getMACAddress();
    char *ip = wifi.getIPAddress();
    
    pc.printf("%d\r\n", conn);
    pc.printf("%d\r\n", dhcp);
    pc.printf("%d\r\n", enabled);
    pc.printf("%s\r\n", gate);
    pc.printf("%s\r\n", mac);
    pc.printf("%s\r\n", ip);
}

0xc0170: Syntax for code highlighting is '<<code>><</code>>'

Question relating to:

what is the firmware version of cc3000?

posted by Martin Kojtal 17 Jul 2014

2 Answers

9 years, 9 months ago.

I think you should update the latest version of CC3000 firmware.

I have updated everything but still no luck.

posted by Marcus Parker 17 Jul 2014

Do you know how to update the latest version of CC3000 firmware to diferent Nucleo?

posted by mei jie 19 Aug 2014

I can set irq,en,cs and SPI pins in patch programmer with arduino uno.But how can i set these in Nucleo?

posted by mei jie 19 Aug 2014
9 years, 9 months ago.

Marcus,

These are the type of problems you can get if the 5v supply to the CC3000, does not have enough current. I would suggest a 500mA 5v supply to be safe. A max current required for the CC3000 is approx 350mA (@ 3.3v from the onboard reg), it depends on the wifi path to the router. Or you maybe outside the range of the router.

Dave.

I've checked the power and nothing is wrong, its definitely within range as well. Whats strange is that another older program which has been updated works fine.

posted by Marcus Parker 21 Jul 2014