CC3000 frequent disconnects from wifi

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
User avatar
jasperp
 
Posts: 50
Joined: Mon May 27, 2013 5:06 am

CC3000 frequent disconnects from wifi

Post by jasperp »

Hey

I have recently integrated a cc3000 wifi breakout into one of my larger projects.
In my case I wish to have the wifi connected on it 24/7 as its running a small webserver to control relays.

I have setup logging to the SD card to find out how often its disconnecting and reconnecting which its doing around 10 times per day!

This is annoying however a simple handler for re connecting was easy to implement but the bigger problem is at times the whole system crashes while trying to re connect, and it seems to be random (sometimes stays up for up to 24 hours but eventually locks up on one of the re connect attempts).

I have made sure the wifi board is running the latest firmware.

Can anyone point me towards likely causes for frequent disconnects? Or is this to be expected with the current release of the product?

The current way im doing a reconnect is as following (psudo code)
cc3000.reboot()
delay
cc3000.init() <----this is the connection routine
delay
cc3000server.begin() <---- start the web server up again

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

Re: CC3000 frequent disconnects from wifi

Post by tdicola »

Let's check a few things that can commonly cause CC3000 projects to crash or stop responding. One thing is power, what board is the CC3000 connected to (i.e. an Arduino Uno, Due, etc.) and how is the board powered? In particular are you powering the board from a USB port on a device like a computer or laptop?

A second thing would be running an older firmware--there were some issues with internal buffer exhaustion that TI has patched over time, so you might need to upgrade the firmware. First though to check the version, can you run the buildtest sketch example and copy its serial output here? One of the first things buildtest will do is print the firmware version.

User avatar
jasperp
 
Posts: 50
Joined: Mon May 27, 2013 5:06 am

Re: CC3000 frequent disconnects from wifi

Post by jasperp »

Im running the c3000 from an arduino Mega. It is also powering an Xbee series 1 breakout and radio, DS3231 RTC, 4 channel relay and 3.2' LCD screen all on 5v. The board is being powered via my PCs USB port.


I believe I have managed to prevent the crashing which occurs during "SOME" re connect attempts.

I was calling the method() wifi.checkConnection() twice in quite quick succession which I have since changed and have had the unit running for over 24hours...longer than it had previously lasted. The reason why I had been calling the method() twice was to check IF connected wifi, check for incoming HTTP request as well as then to check if the wifi required reconnecting. By re writing this logic im only calling this method() once.

I will know in a few days if the lock ups have gone away.

As long as I can have it reconnect without issue the disconnects are not a deal breaker.

Do you think the disconnects from wifi are due to power issues? What about signal strength? Is there a way in the library to check signal strength?

Note I am running the latest Ti firmware.

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

Re: CC3000 frequent disconnects from wifi

Post by tdicola »

I would try with an external power supply, the mega should be able to have a 7-12 volt supply plugged in to power it through its barrel jack. With a display, CC3000, relay board, etc. connected to a computer's USB supply I have a feeling it might be pushing the limits of the USB power too much. The USB spec officially only supports 500mA, and the Arduino + CC3000 alone can almost grab that much power when sending and receiving. Some devices allow more current through their USB ports, but it's tough to know for sure what the limits are. The best bet would be to use an external supply with about an amp or more capacity--that should support the mega, cc3000, display, relay board, etc.

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

Return to “Arduino Shields from Adafruit”