Timed loss of serial port in Arduino IDE

Status
Not open for further replies.

TelephoneBill

Well-known member
I'm using Arduino 1.8.4 and Teensyduino 1.40 under Win7 64 bit enterprise.

I have been doing some experiments with a Teensy 3.1 board and I run these for many hours. Using the serial monitor in the Arduino IDE, I send short (5 bytes) ad-hoc bespoke commands to the Teensy and receive periodic data back (approx 300 bytes) in 1 second burst displays every second. I normally leave the monitor window open.

The serial monitor works well at the beginning of the experiment - in excess of 30 minutes etc. But if I leave the experiment running for a few hours, then I often find that the monitor port has closed itself (says "offline").

If I then close (only) the monitor window and try re-open it, then it fails to re-open again. But if I terminate the Arduino IDE and then re-open both the IDE and the monitor window, it re-establishes connection with the serial port and I see 1 second data burst displays again correctly.

---

It looks to me as though the monitor has a "receive buffer" and maybe the cause of the port closure is the buffer overflowing with accumulated data ??

Does anyone agree with this reasoning, or have any alternative explanantion ?? If agreement, what default size is the buffer likely to be and can I increase it?
 
What I’ve seen with WiFi usb sticks could apply here, too: Check the energy saving settings of the internal usb hubs in the device manager and uncheck “Windows may disable this device to save energy”
 
What I’ve seen with WiFi usb sticks could apply here, too: Check the energy saving settings of the internal usb hubs in the device manager and uncheck “Windows may disable this device to save energy”

Yes - this seems to be the source of the trouble. I did as you suggested and now my experiments run (apparently) ad infinitum. Many thanks.
 
the arduino serial monitor tends to slow down and potentially lock up or exit after a given time if theres tons of bursts and huge and/or polling data flowing constantly for long periods.
 
Status
Not open for further replies.
Back
Top