Recent

Author Topic: How to obtain a list of attached serial devices?  (Read 3782 times)

snafu

  • Newbie
  • Posts: 4
How to obtain a list of attached serial devices?
« 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.


Mike James

  • New Member
  • *
  • Posts: 23
Re: How to obtain a list of attached serial devices?
« Reply #1 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

-=mike=-

snafu

  • Newbie
  • Posts: 4
Re: How to obtain a list of attached serial devices?
« Reply #2 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