We’re using the latest version (1.5.8) and the latest openwrt-yun firmware and we think there’s a problem with the connect method of the YunClient.
Problem is quite simple, after 256 connect failures, the Python bridge enters an infinite loop and stop responding at all (you can check the method “connect” of the SocketServer bridge class). This is a source code that can replicate the problem:
Actually the solution is quite simple, but need a rework on the Bridge or the YunClient class.
It would be nice to find a workaround also for current and previous versions...
I made a pull request with this fix and tomorrow it will be available in the nightly build IDE.
In the meanwhile you can replace this line by yourself and start testing it.
I'm having a similar problem but AFTER 256 CONNECT Success... it fails?
I'm running Arduion 1.6.5. I checked the cpp file and it looks correct as per above.
I added a client.stop(); before reaching 256 sends and it seemed to work for a minute and then failed again as follows... It freezes the Arduino at "connecting...." and does not go to to the else statement and print "failed"... manually resetting (pressing the atmel 32u4 button doesn't fix) nor does power cycling the board. Reprogramming the board works.
I was having an oddly similar issue using an ethernet shield communicating to the same server although it was a time based crash (after 25.25 minutes). As a cheap fix I included a softwareReboot() routine that seemed to fix it but I'd rather not drop the data.