Issues with client.connect

I have two spark cores that I am using for different projects. One of them (we’ll call it core A) I am able to setup the URL like this:

const char * pushingbox_serverName  = "api.pushingbox.com";

and send the data like this:

if (client.connect(pushingbox_serverName, 80)) {

Core B is failing to make a connection like this. I was able to get it to work with this code:

byte server2[] = { 213, 186, 33, 19 };

if (client.connect(server2, 80)) {

Why is there a difference? I believe I bought core B several months before core A. Is it possible it has an earlier firmware and would that even make a difference?

Thanks for any insight into this matter.

Your core B has old CC3000 firmware on it I bet. You need to go ahead and flash the deep update or the latest CC3000 patch. I’d look here https://github.com/spark/spark-cli for pointers on doing either of those

You are probably right. I can do the update cc3000 in CLI using:

spark flash 0123456789ABCDEFGHI cc3000

It runs through all that but that didn’t fix the issue. So I looked into doing the deep update but the core will not go into DFU mode. When doing the button sequence (Hold down the MODE button, tap on the RESET button and wait for three seconds to enter Bootloader mode) It just blinks green for 10 seconds then white for the reset. I have another core that is my test one that I purchased later on and that will go directly into DFU mode (blink yellow) when doing the same thing.

If you really are having trouble going into DFU mode but can still flash firmware then you can actually code the firmware to go into DFU mode itself. See http://community.spark.io/t/how-to-set-wifi-data-for-customers-using-embedded-spark-core/8636/32

it sounds like you have a DNS resolution issue, it happens sometimes and we are not sure why…

some people have fixed it by reflashing the cc3k a few times.

a search for DNS should bring up a few posts about the issue and a awesome tool to test here thanks to @mtnscott

if the flashing doesn’t fix the problem there is a work-around here (also available as a library in the webIDE)