Lazarus

Programming => General => Topic started by: snafu on April 06, 2010, 07:25:58 pm

Title: How to obtain a list of attached serial devices?
Post by: snafu on April 06, 2010, 07:25:58 pm
Hello,

How do I programmatically determine what serial devices are currently attached to a linux system?

Thanks.

Title: Re: How to obtain a list of attached serial devices?
Post by: Mike James on April 07, 2010, 09:07:22 am
Have a look at this example in D - called ports() - it tests each potential serial port in turn to see if it is valid.

http://www.dsource.org/projects/tango/browser/trunk/tango/io/device/SerialPort.d (http://www.dsource.org/projects/tango/browser/trunk/tango/io/device/SerialPort.d)

-=mike=-
Title: Re: How to obtain a list of attached serial devices?
Post by: snafu on April 07, 2010, 03:33:35 pm
I was leaning toward having to check every port...

That link will do nicely.
Thanks for that.  :D
TinyPortal © 2005-2018