[Lazarus] Usage of Serial in a testing program?

Bo Berglund bo.berglund at gmail.com
Mon Sep 10 22:29:16 CEST 2018

On Mon, 10 Sep 2018 19:44:22 +0200, Giuliano Colla via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto:
>> This seems only to deal with ports 1..9, what about the higher
>> numbered ports 10..255?
>> And would it not be a long execution time for testing all 255 possible
>> com ports on Windows?
>In my experience both Linux and Windows if you connect a new serial 
>device do set a port number just higher than the previous one already there.

On Windows7 at least every time you attach a serial2usb dongle into a
different USB port than before it creates a new COM port with a higher
number. And this port is sticky on the PC too, it remains "taken".
So after a few years (my laptop is from 2011) it stacks up and even
though I have currently only attached 6 such converters (one is a
4-way) the com port numbers are 29-30-31-32-33-34...

>This means that you'll have to deal with higher numbers only if you have 
>more than 9 serial lines in your platform, which is a bit unlikely. Not 
>to consider the likelihood of a platform with 200 serial lines!

I would eventually get there if I continue to unplug and re-plug these

Bo Berglund
Developer in Sweden

More information about the Lazarus mailing list