# Issues with client.connect

**URL:** <https://community.particle.io/t/issues-with-client-connect/9477>\
**Category:** Troubleshooting\
**Created:** [January 19, 2015, 7:50pm UTC](https://community.particle.io/t/issues-with-client-connect/9477 "2015-01-19T19:50:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyler785](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tyler785](https://community.particle.io/u/tyler785)\
**Post date:** [January 19, 2015, 7:50pm UTC](https://community.particle.io/t/issues-with-client-connect/9477/1 "2015-01-19T19:50:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![harrisonhjones](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/harrisonhjones/32/4132_2.png) [@harrisonhjones](https://community.particle.io/u/harrisonhjones)\
**Post date:** [January 19, 2015, 9:05pm UTC](https://community.particle.io/t/issues-with-client-connect/9477/2 "2015-01-19T21:05:37Z")

</div>

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](https://github.com/spark/spark-cli) for pointers on doing either of those

---

<div class="post-metadata">

**Author:** ![tyler785](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tyler785](https://community.particle.io/u/tyler785)\
**Post date:** [January 20, 2015, 3:03am UTC](https://community.particle.io/t/issues-with-client-connect/9477/3 "2015-01-20T03:03:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![harrisonhjones](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/harrisonhjones/32/4132_2.png) [@harrisonhjones](https://community.particle.io/u/harrisonhjones)\
**Post date:** [January 20, 2015, 3:34am UTC](https://community.particle.io/t/issues-with-client-connect/9477/4 "2015-01-20T03:34:20Z")

</div>

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](http://community.spark.io/t/how-to-set-wifi-data-for-customers-using-embedded-spark-core/8636/32)

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [January 20, 2015, 9:44am UTC](https://community.particle.io/t/issues-with-client-connect/9477/5 "2015-01-20T09:44:47Z")

</div>

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

> **[DNSTest tool - testing your core internet connection](https://community.particle.io/t/problem-with-core-networking-and-dns-try-this-tool/7667)**
>
> I am starting a thread in the Troubleshooting section for resolving an issue with Cores that are not able to resolve DNS properly. The typical behavior is the calls to TCPConnect will fail when using a hostname, but work when using a IP address. In...

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

> **[\[Submission\] DNS lookup (alternate getHostByName)](https://community.particle.io/t/submission-dns-lookup-alternate-gethostbyname/5427)**
>
> I couldn’t get the inbuilt DNS lookup to work when using TCP Client on a very slow internet connection, so i ported the arduino ethernet library. May also be useful if you want to specify your own DNS server. Ive included a very simple example code,...
