Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 4 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:
2 Answers
10 years, 4 months ago.
I think you should update the latest version of CC3000 firmware.
10 years, 4 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.
what is the firmware version of cc3000?
posted by Martin Kojtal 17 Jul 2014