pyserial win32 port numbering

D

[david]

http://pyserial.sourceforge.net/

"port numbering starts at zero, no need to
know the port name in the user program"


But the implementation in SerialWin32 is
just
(Portnum +1)


So there is no 'start' to the port numbering at all:
there is no assurance that you will have a pySerial
serial port Zero, even if you have 57 Windows Serial
ports.


Renumbering the serial ports to start at zero would sort of make sense
if it was done in a semi-portable way - so you could move from one
machine with two serial ports to another machine with two serial ports.

In Windows, that requires enumerating the serial ports, and assigning a
logical pySerial port number to each.

This is going to become more of a problem, because Windows logo
compliant PC's by definition do not have a serial port 1 or 2 so the
pySerial logical port numbers are likely to start at 2 or 4.

It's already a problem on PC's that have PCI serial port cards (not ISA
serial port cards). The pySerial logical port numbering typically goes
something like 0, 4,5, mapping the Windows serial ports 1,5,6

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top