TCP Connection unstable

Hi everyone,

I have currently written a program that streams bytes on the Spark Core configured as a TCP Server (the client being a java program on my computer). These bytes are used to control an LED strip. My core is connected to the wifi network and at first, the bytes arrived but between 10 and 20s after the beginning of the stream, the core disconnect and blinks green. It’s like running the program disconnect the core from the network and I cannot understand why…

Has someone already experienced something similar? Could it be linked to an old firmware version?

Thanks for your help,

Marc

Are you servicing the cloud connection regularly (dropping out of loop() or call Particle.process()) or use SYSTEM_MODE(SEMI_AUTOMATIC)?

If not, that’s the cause

Seems to work thanks! Just being curious, why should I do that?

In the default SYSTEM_MODE(AUTOMATIC) the device needs to talk to the cloud at least once per 10sec otherwise it will stop executing the loop() and only try to reestablish the cloud connection.

1 Like

A post was merged into an existing topic: Issue streaming bytes via TCP