Socket creation returns -1

My core can not create socket returning -1, attempting to create…ideas?
Of course it does’n connect to server…

There are seven sockets available in the TI CC3000 and one is used by the cloud connection if you are using the cloud. Are you closing old sockets when you are done?

Another common problem is trying send data to host that the core cannot find the MAC address of via ARP and then all the internal packet buffers in the TI CC3000 become busy and new connections cannot be made until the ARP times out.

Socket creation returns -1, at firmware downloaded from git, after cc3000 patch has been applied.
Trying to understand the problem , I have disable firmware’s code, creating socket by my own code,
and then check if other sockets are opene or not.
No socket open , And still no socket can be created.
Some times (not many) core is working fine, but not for long.
I have found at least tow versions of cc3000 patch and test both…by nothing changes.

I would start with the factory reset procedure:

If Tinker (the default app) works OK, then you will know that the problem is software related.

I have done all reported procedures,what I have not mention is than using factory firmware core goes to CFOD,
even if cc3000 patch has been applied.

I would try to fix that first. You are not going to get far if you cannot run Tinker.

CFOD means “can’t connect to the cloud” and there are a variety reasons for that. Before the TI CC3000 patch, the number one reason was ARP problems on the TI part. After the patch there are still lots of reasons.

Is port 5683 open?

When you do the factory reset, do you get the flashing magenta loading of firmware from the cloud to work?

5683 is open…
I get the magenta…
I feel older trying all this…

I have try all possible ways to make it funtional.
I thing my case belongs to this “lots of” reasons you mention.
My core is not functional, no matter what I have tried to be so.

Maybe a better way is to tell us your use case and we can see how that can be done through some other means. :slight_smile:

The key point of what I am thinking is that cc3000 patches does not solve the problem, (at my core).
What I was going to do is to have a non cloud connected core, just connected to a local web server,
reengineering firmware and web server, simplifing or deleting every thing non usefull to me (like smart connect, encryption etc)
But before this, what makes me wondering is that I had only one successfull connection with spark cloud,
and then the story goes on.