title: Arduino stops sending data to the serial port after a long time period
body: <p>I am using an <a href="http://arduino.cc/en/Main/ArduinoBoardUno" rel="noreferrer">Arduino Uno rev2</a> device as a permanently connected device that sometimes sends signals to a PC (Windows 7 x64). Code compiled with Arduino 1.0 software from arduino.cc</p>
  
  <p>Topic on arduino.cc, <em><a href="http://arduino.cc/forum/index.php/topic,81822.0.html" rel="noreferrer">Arduino stops sending data to Serial after a long time period</a></em></p>
  
  <p><a href="http://pastebin.com/mrvXQUtx" rel="noreferrer">Souce code</a></p>
  
  <p>It works perfectly but sometimes, after a long period of time, the PC stops receiving data from the Arduino device. It is not a PC software issue, as all software(putty, telnet, etc..) acts the same - I can send data TO the Arduino (the device responds to commands); I just can't receive it back.</p>
  
  <p>A similar problem was described here in <em><a href="http://arduino.cc/forum/index.php?topic=77828.0" rel="noreferrer">Serial communication stops after long periods.</a></em>, but no solution was suggested.</p>
  
  <p>Disconnecting/connecting the device solved the issue temporarily, but this can't be a solution, as the device is supposed to be used permanently and fully automatically.</p>
  
  <p>Using board reset button that resets program &amp; all values to it's start wont help. Data does not start to be being received by PC. </p>
  
  <p>Notes:</p>
  
  <ol>
  <li><p>millis() rollover bug is not reproducable on Arduino Uno board with Arduino 1.0 software - I guess this was fixed and millis() now do really rollover only in 50 days, like it is said in documentation. Besides code has <a href="http://pastebin.com/8yDn6czm" rel="noreferrer">millis() independent code</a> that is not responding too.</p></li>
  <li><p>LED that is blinking during sending data to PC still blinks.</p></li>
  <li><p>Strings usage could increase memory usage, but this program is way too small for that to be a problem. No additional memory was used after 10+ hours of program running, so I'm not really going to bother with replacing Strings with something else, as Serial port problem is far more major.</p></li>
  </ol>
  
  <p>If you think that the problem is in arduino program bug, please think of how to explain TX blinking &amp; reset not helping.</p>