TCP-Socket failure

18 Mar 2011

Hi everybody,

I've got a curois problem with my mbed. Here is what I do: I use the mbed as a controller for an "AmbiLight"-system like you know it from Philips. Therefor I wrote an app for my mac, which reads the color from the screen and sends it to the mbed. It's also possible to set a single color with a simple color picker. The color-data is transferred to the mbed via network. The network communication is based on the TCP/IP socket, where the mbed is the host and the mac (or iPhone) is the client. And as long as I just select a color it works fast and reliably.

But I have one big problem with this: When the data rate is high (e.g. when I'm watching a movie the app samples the screen with 25 Hz or more) suddenly the socket connection kind of "brakes down" and it's not possible to send any data until I reset the mbed. I came up with several ideas how to fix that (using smaller packets, checking if the mbed runs out of memory, limiting the data rate to 10 Hz, reading the errorflags also did not offer any information) but nothing seems to work. The funny thing is, the mbed still works even when it's not reachable through the network. I see that, because a connected LCD shows date and time correctly and a "seconds"-led is flashing perfectly.

Does anybody have an idea, what's wrong and how I can fix that? I would be very thankful for every kind of help, because I'm really out of ideas.

Best regards, Matthias