Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everybody.
I'm writting an app for desktop and embedded linux and I need to get information about the multiserial port, and I need to know which port is been used (by a printer, por example).
The multiserial I'm using is an Altera Corporation Device 0004, and I just need to tell how many ports are there and how many is been used.
any ideas?
PS: I know if the multiserial is there by lspci, and to know the information I need I'm thinking about using setserial, but I'm having some trouble to do that.
Tks for the post Michaelk, but I don't need to identify the devices, I just need to know
how many of those ports are conected to something ...
The output of the program would be something like:
You Have an an Altera Corporation Device 0004
Total Ports: 4
Ports Conected to any device: 3
Ports Avaliable: 1
--
ya see, I think it's pretty much easy than the know what is the device conected.
tks
Again it depends on the hardware. For devices that use hardware flow control you could check for the status of the CTS,DSR, DCD or RI signals. However, there are special serial cables that have hardware loopback for flow control on the PC side so this method not work. I do not know if you can check the status of the RX or TX signals if the device is not continuously sending data. So for devices that may only use the min number of wires i.e. TX,RX and GND not sure if there is any method to detect the device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.