Forum > General

How to obtain a list of attached serial devices?

(1/1)

snafu:
Hello,

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

Thanks.

Mike James:
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

-=mike=-

snafu:
I was leaning toward having to check every port...

That link will do nicely.
Thanks for that.  :D

Navigation

[0] Message Index

Go to full version