30 second cutoff with TCP client after latest spark_disable_cloud update [SOLVED]

@satishgn @bko – I’m including both of you because this may be an extension of the discussion at Can I Turn the CC3000 Off, where you were both very knowledgeable and helpful.

I’ve tested and I’m using the recent updates that allow the #include "spark_disable_cloud.h" update, and they work as described. For some background, I’m running a TCP client that connects to a local Node.js TCP server and sends data from a couple sensors to the TCP server. From a high level, I use a UDP broadcast packet from the server out to the local network that the SparkCore will read to “discover” the IP of my server. The Core will then connect to the server via TCP and begin transmitting data from the sensors over TCP. I have WiFi enabled, but Spark Cloud disabled.

The issue I’m having is that now, after 30 seconds of transmission, my TCP connection to the server drops. It’s as close to 30 seconds as I can measure, every time. This is regardless of my “sample rate” that I use for my loop delay (right now, about 33ms).

Is there a chance that some of the other services (such as TCP) rely on the “heartbeat” that was maintained with the cloud prior to the recent changes that @satishgn committed recently? I did not have these issues prior to this update. But prior to the update, I was reliant on the connection to the Spark Cloud, which I have no dropped and now just use WiFi.

As tends to happen, after you get desperate enough to post a question - the next thing you do immediately after posting will fix the problem. There must be some universal law that states this.

Anyhow - the solution was in regards to the UDP buffer getting full, as @bko suggested here: I’m having a problem getting UDP traffic from my spark cores. By turning off my UDP listener once the Core had connected over TCP, the problem was resolved.

Rather than delete this post out of embarrassment, I’ll leave this here for anyone else that runs into this.


Glad! it got resolved :smile:

Where I work, I have a friend that talks about explaining your problem to a colleague as “using an intelligent post” as in, you explain and the other person just sits there like a wooden post. Generally the person explaining it figures the problem out mid-way through.

I am glad I could be part of your “post” today!