Re: pySerial Windows write problem



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
.



Relevant Pages

  • Re: pySerial Windows write problem
    ... > Bob Greschke wrote: ... >> But writing anything to the port ... It opens it when it starts up, then keeps it open until it quits. ... Tsk tsk tsk. ...
    (comp.lang.python)
  • RE: redhat-list Digest, Vol 4, Issue 38
    ... Re: Iptables: port 22 open only for my IP ... Windows Services for Unix 3.5 ... It does absolutely nothing if you have a rampant application on your Windows box that opens a port to the outside world. ...
    (RedHat)
  • Re: Enabling telnet, ftp, pop3 for root...
    ... MASIVE security improvement over just having an open port sitting there. ... only OPENS THE PORT! ... While I could be wrong on that, it's the most likely scenerio with three possible levels of security: low, if you're only using a password, mediocre if you're using a key protected by a password, and relatively high if you're using a key that you are protecting with a complex passphrase and swapping out routinely. ... Point being, when there are already such networks on the Internet -- and not just in the United States -- with a wide range of ISPs, it's not at all outside the realm of possibility that somebody has a box that is listening to all the traffic on your node and analyzing it. ...
    (alt.os.linux)
  • Re: USB device detection via query registry information
    ... Similarly vendors need to be given a hard time if they fail to provide a driver compatible with a new Windows version for products released in the last 3 years or offered for sale in the last 12 months. ... it correctly enforces exclusivity to the port ... serenum and sermouse are out-of-the-box XP as far as I can ... serenum opens the port, detects the device, ...
    (microsoft.public.development.device.drivers)
  • Re: OT: Trend Micro WFBS beta starting soon
    ... Trend firewall, even set to High, has inbound NetBIOS ports open. ... default 3389 port, web browsing, email, etc. ... it opens inbound NetBIOS connections until the laptop is rebooted. ...
    (microsoft.public.windows.server.sbs)