<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Aug 31, 2010 at 12:15 PM, ik <span dir="ltr"><<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">You can use the sysfs for example. It's "actual" path inthe file system that represent information about the system of Linux, so any real COM port will have a directory with the device name and inside information about the port itself.<br>
<br>I do not know regarding COM how it will look like, but for example for ethernet it looks like this (just for the sake of understanding):<br>/sys/class/net/<br><br>For COM I guess it will be /sys/class/tty/ (Not sure tough, I do not have a machine with COM at all to check it on).<br>
</div></blockquote><div>i have many files under /sys/class/tty which are not serial ports<br>i also have 4 which are ttyS0..ttyS3, although i do not have any serial port connected<br>and there is no link to the actual dev (although there is a file which includes the major and minor device numbers)<br>
<br>thanks,<br>erez.<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr">
<br>Ido<br clear="all"><a href="http://ik.homelinux.org/" target="_blank">http://ik.homelinux.org/</a><br>
<br><br><div class="gmail_quote">2010/8/31 Erez D <span dir="ltr"><<a href="mailto:erez0001@gmail.com" target="_blank">erez0001@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">
<div dir="ltr">hi<br><br>I am looking for a simple way to know which serial ports i have.<br>I want to have a list of all serial ports, either onboard, via usb, via bluetooth etc ...<br>I'm looking for a better way than scanning /dev/ttyS* /dev/ttyUSB* /dev/usb/... etc ...<br>
<br><br>In cygwin I just look under /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DEVICEMAP/SERIALCOMM/<br>is there somthing similiar in linux (probably somewhere in /proc) ?<br><br>thanks,<br>erez.<br><br></div>
<br></div></div>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>