Dropping the connection to spark cloud

I have connected up both my spark cores without any problem and managed to load the blink LED project. It all works fine. But after a period of time, exact time not sure yet but approx. 30mins. the project stops running and the Cyan LED is flashing. Again not sure if it is just;
• Flashing cyan: Connecting to Spark Cloud
• High-speed flashing cyan: Spark Cloud handshake

If I reset the Spark Core it goes through the reset very quickly and connects back up to;
Breathing cyan: Connected to Spark Cloud

and the project immediately starts running.

My questions are;
Is anybody else having this issue?
Why does the project stop running once it looses the spark cloud connection?
this project is a simple LED blink project which is stored on the Core and does not require any interaction with the cloud.
Hoping I can get some assistance with this.
p.s. I am totally new to this type of programming, so it may well be operator error.

1 Like

Hi @Infinnissy - you’re correct that your application code doesn’t run while the Core is connecting. That’s because the code for opening a TCP socket with the CC3000 Wi-Fi module blocks.

We are working on methods to get around this so your application code will run smoothly and not be interrupted by connectivity issues, but it’s a non-trivial fix.


Hi @zach. Is there a good reason why it keeps dropping the Spark cloud connection?
• Flashing cyan: Connecting to Spark Cloud
The only way I can get the code running again is to press the reset and then it connects to Spark cloud again fairly quickly.
Have tried powering off a laptop through USB lead and also using separate USB PSU.
The problem occurs on both cores and at different times. i.e. one core is connected while the other disconnects from Spark Cloud.

Hi @Infinnissy,

The core attempts to ping the server about once every 15 seconds or so. If a few of these requests fail, the core assumes it’s been disconnected, and tries reconnecting to the cloud. I’m not sure if you’ve flashed code from the web IDE recently (which would give you more current code), or if you’re using tinker, but it’s possible recent bugfixes might help this issue. The core should reconnect without issue, so this sounds like a bug in the firmware, but I’m guessing something about the access point is triggering this (dropping connections, etc).

Can you tell us which access point you’re using?

The code was flashed from the web IDE last night and it was still dropping its spark cloud connection on both cores.
My access point is a Cbus wiser unit WHC5911.

@Infinnissy not sure why you’re seeing connectivity issues, but it seems like it might have something to do with your local network settings. Do you have access to another access point that you could test to see if you encounter the same behavior? If we can confirm that it’s your access point then we can dig in further.

I see the same behaviour running tinker.

After some amount of time, the core starts flashing cyan and stops receiving commands from the web interface.

No discernible pattern yet.

I have now tried the Core in two other locations on two other access points. unfortunately it exhibits the same fault and drops off the Spark cloud.
I don’t believe it is the access point now.


thanks guys, will test on our network and see what we encounter. will get back to you all soon.

In the meantime, if anyone is able to generate a tcpdump, that would be helpful for debugging.

Mine has been doing the same thing, It’ll run about 2 hours then whatever code was running will freeze and I’ll get a flashing cyan. Night before last it ran 12 hours with no problems. Sometimes it’ll do it after 30 minutes several times in a row, sometimes it’ll go 4, 6 or 8 hours, but it always does it. I thought maybe it’s my internet connection, so I ran ping in the background on my MacBook Air and after about an hour the Core went into flashing cyan mode again, checked the ping readout and had zero dropped packets.

Using the older Apple Airport Utility, I was able to view signal strength and data throughput to the core over time, it always stayed connected with a strong signal and during the flashing cyan phase, it was still connected.

Do you want a tcpdump from the Core, or what? How would I do that?


When I’m on my work wifi (three Aruba 105 access points using the same SSID), the connection drops and the core goes into pulsing cyan mode within about 5 minutes. On my home wifi (1 linksys e4200 and 1 netgear AP using the same SSID), the connection lasts much longer (hours) but may still eventually kick over to the pulsing cyan mode. My sketch just blinks the led on pin d7, and is still running when there is no connection to the cloud. Another interesting point is that my sketch is also outputting information via Serial.println. When the cloud connection drops, I stop receiving data on the usb connection even though the sketch is still running and blinking the LED.

I’m also not seeing any actual wifi network connection issues, as I can still ping the cores from another computer on the same network.

1 Like

Working on capturing tcpdump now…

Film at 11.


Interesting… How many of us experiencing the disconnections are on WiFi networks that have multiple access points or repeaters on the same SSID?

I have a previous generation Apple Time Capsule on my ground floor, acting as a router and the primary AP. Plus a previous generation AirPort Express upstairs in my lab acting as a signal extender and ethernet bridge (so I can hook ethernet stuff up at my desk). Finally there’s a two-generations old AirPort Extreme in the garage acting as a signal extender and ethernet bridge/switch.

I’m wondering if the Spark Core is briefly getting a better signal from one of our other APs (on the same SSID) and trying to associate with it, but failing, because it’s tied to a specific AP and not the SSID in general.

I’ve seen that happen before with some wireless enabled devices before. I can think of one case with a Canon All-in-One; when you setup WiFi from the printer’s front panel, it’ll give a list of MAC addresses for all the Access Points it can see on whatever SSID you’re trying to associate with. Once that’s locked it, it will only associate with that AP.

Aside from understanding the technical details of how Smart Config works, I don’t know much about the inner workings of the CC3000 (aside from interfacing it to an MCU and whatever else was in the basic datasheet), so I’m not sure if the above theory is applicable, but I thought I’d throw it out there.

I’m also having similar issues, and I also have a wifi repeater setup. My base AP is an Apple AirPort Extreme (2-3 gens old) with an Airport Express (1-2 gens old). I may try unplugging the Express tomorrow to see if that alleviates the problems. I’ll report back with my findings!

I’m not using any repeaters and have only a single access point. Also when I tried it on other access points they were in completely different locations and also single access points. So I don’t think it is just down to multiple access points and repeaters.

I setup a guest network on my Time Capsule about 5H ago when I wrote that last message and hooked the Spark Core to it. So far, no drops!

I wonder if we’ve figured it out? Hmmm…

I unplugged my AirPort Express on the way out the door this morning. 30-45 minutes later, my Spark is offline again. I’ll try the guest network fix when I get home this evening.

Naturally, now I’m running tcpdump to capture packets, the test has been running for ~14 hours and the core hasn’t dropped yet (or if it has, it has reconnected and I have not missed any events.)

For the record, this network has a single AP, no repeaters or anything cute.

Testing will continue…

1 Like

I have a pcap file of the problem, sadly the forum won’t support uploading .pcap files, so I will email it.

I created a guest network off of my AirPort Extreme. For some reason, I couldn’t get the Spark to connect until I plugged it into my computer and configured it via serial. We’re breathing cyan now. The only thing connected to the guest network is the Spark. I’ll post any updates in a few hours (or sooner if it still drops).

1 Like