What did I screw up? (SparkCore seemed dead even after cold reset; until factory reset)

I had built some hardware on my Spark Core (a DHT22 sensor) and a switch. I had it in the other room and was running some code on it. I made some changes flashed a new program on it and everything was working. Then I decided I’d try running the TCPServer code from the SparkCore API pages. I enabled it and it was working fine. I connected with one connection and it was working. I tried making a second connection and I have no idea what happened, but the second connection did not work, my first connection also died. I was no longer able to access my sparkcore from the API website. I went over to it and looked and the network LED wasn’t on, and the LED for D7 was enabled. I tried the RST, MODE buttons, nada, I’ve unplugged it and plugged it back in, but nothing seems to work. My computer doesn’t recognize it via USB either.

Any suggestions or did I fry it somehow? It had been working fine all day with the code I was using (until I added the networking code and connected to it twice).


A factory reset resolved it…any idea what I did?

I don’t know, but it sounds like there could be a bug with the TCPserver code… if you run it again and do the same steps with connection 1 then 2 clients and it locks up again… I’m sure that it can likely be reproduced by the Spark Team. Care to try again?

1 Like

Hey guys, pretty sure I know what’s going on here.

Basically, this is a bug that long blocking code can keep the Core from being able to communicate with the Cloud. An unsuccessful attempt to open a TCP socket would block in this way (the CC3000 connect() function blocks).

The solution is decoupling the user code and the Spark code so that they don’t block each other; this should be implemented in the next two weeks.


Thanks! What sort of update on our end would we need to get this change once it is available or would we just reflash our application?

Nothing to do on your end; updates are pushed out seamlessly when you flash new software. We’ve already been pushing out bug fixes and new features silently - one of the advantages of compiling in the cloud :smile:

We’ll announce the new features/fixes here in the forum and on our new blog:

Cool :slight_smile: Of course there are downsides, if you want to do anything with a security setup, you are now broadcasting everything over the internet… Not to say it’s absolutely insecure, but it’s less secure than just using a wifi on an arduino/arm and everything in your “intranet.”