Re: pySerial Windows write problem
- From: Peter Hansen <peter@xxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 21:46:32 -0400
Bob Greschke wrote:
I didn't write the C++ program, but it looks like it never closes the serial port. It opens it when it starts up, then keeps it open until it quits. Tsk tsk tsk. Sloppy. Maybe they did that to cover up this problem. :)
Actually, I'm curious why you don't do the same. I'd call it very unusual (in my experience) to have a program open and close a serial port repeatedly. Among other things, this means that the DSR/DTR lines are toggling high and low repeatedly, and that alone could cause undesirable behaviour in certain devices.
In none of my own serial-based programs (perhaps a few dozen such to date) have I ever opened and closed a port other than at startup and shutdown (just as your C++ program does). Unless you've got a good reason to do otherwise, if this solves your problem it's certainly the most direct approach to do so.
-Peter .
- Follow-Ups:
- Re: pySerial Windows write problem
- From: Bob Greschke
- Re: pySerial Windows write problem
- References:
- pySerial Windows write problem
- From: Bob Greschke
- Re: pySerial Windows write problem
- From: Peter Hansen
- Re: pySerial Windows write problem
- From: Bob Greschke
- pySerial Windows write problem
- Prev by Date: Re: Rich Graphics?
- Next by Date: Re: Ten Essential Development Practices
- Previous by thread: Re: pySerial Windows write problem
- Next by thread: Re: pySerial Windows write problem
- Index(es):
Relevant Pages
|