I am trying to talk to my Teensy using serial commands, but after several successful queries and responses, I see a Write Error, and then the Port can't be opened until I physically disconnect and reconnect the USB cable.
This behavior occurs on Windows 7 both through the Arduino serial monitor and through a putty session with the Teensy's port, as captured in the pictures below. Occasionally I can repon the serial monitor or putty session after the error without getting a com port error, but it disappears often enough that it's a problem.
It also happens on ubuntu 12.04 when I use the screen command (screen /dev/ttyACM0 9600) in a terminal session; I query the Teensy and get a response several times, but eventually the screen session terminates right after I send a query (displays [screen is terminating]). I don't get a "com port error" on this OS -- I can use the screen command again without reconnecting the cord.
I've pared my code down to an edited version of the mac address program in this post: http://forum.pjrc.com/threads/91-teensy-3-MAC-address . My version, which I will attach to this post, edits the main loop to wait for a query from the user (a "?") before printing out the mac address. Eventually I will be interfacing with the Teensy through pyserial, and will be using this query/response technique for a variety of functions. I've narrowed down this problematic behavior to this simple code though, so I'd like to debug this first.
Other information:
This behavior occurs on multiple Teensy boards.
If I have my device manager on Windows open when the write error occurs, I can see it (the device manager) refresh, which indicates that the com port has closed/disappeared. However, the Teensy is still visible on the same com port in the device manager list -- but I still can't talk to it without reconnecting the cable.
This is my first project using Teensy, and I'd appreciate any help or advice. Is it a timing issue, or does it have to do with the transmit buffering on the Teensy's side? Thanks in advance!
This behavior occurs on Windows 7 both through the Arduino serial monitor and through a putty session with the Teensy's port, as captured in the pictures below. Occasionally I can repon the serial monitor or putty session after the error without getting a com port error, but it disappears often enough that it's a problem.
It also happens on ubuntu 12.04 when I use the screen command (screen /dev/ttyACM0 9600) in a terminal session; I query the Teensy and get a response several times, but eventually the screen session terminates right after I send a query (displays [screen is terminating]). I don't get a "com port error" on this OS -- I can use the screen command again without reconnecting the cord.
I've pared my code down to an edited version of the mac address program in this post: http://forum.pjrc.com/threads/91-teensy-3-MAC-address . My version, which I will attach to this post, edits the main loop to wait for a query from the user (a "?") before printing out the mac address. Eventually I will be interfacing with the Teensy through pyserial, and will be using this query/response technique for a variety of functions. I've narrowed down this problematic behavior to this simple code though, so I'd like to debug this first.
Other information:
This behavior occurs on multiple Teensy boards.
If I have my device manager on Windows open when the write error occurs, I can see it (the device manager) refresh, which indicates that the com port has closed/disappeared. However, the Teensy is still visible on the same com port in the device manager list -- but I still can't talk to it without reconnecting the cable.
This is my first project using Teensy, and I'd appreciate any help or advice. Is it a timing issue, or does it have to do with the transmit buffering on the Teensy's side? Thanks in advance!