Get about serial ports full info.

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Get about serial ports full info.

Postby kuzulis » 23 Nov 2011, 08:22

Hello.

How can I get of programming way from OS information about of interest to me the serial port.
The information should include:
- Device name ([FILE]/dev/...[/FILE])
- Manufacturer string
- Product description string

For example, I have a USB/Serial converter PL2303.

And I know that the name of the device [FILE]/dev/cuaU0[/FILE], and product and manufactures string I can get by using a tool [FILE]usbconfig[/FILE].

But now imagine the situation that we have in [FILE]/dev[/FILE] certain device. And we must determine whether the device serial port, and if so - then get his product and mfg description (if available).

A similar question for PCI devices.

For example, in Linux, MacOSX, Windows, I did it. Now on queue FreeBSD.

The main problem is that I can not logically connect two parts:
1. I can separately in [FILE]/dev[/FILE] to find the right serial device, sorting through, for example, the mask "[FILE]cu[/FILE]" all devices.
2. I can separately list the USB (or PCI) devices and their description (use, example [FILE]usbconfig[/FILE]).

BUT! I can not logically link the information of claim 1 and claim 2, ie I do not know what device [FILE]/dev/cuaU0[/FILE] refers to ugen XY, And so on.

Is it possible make a programming way for FreeBSD 8.2 (or later)?
Or where can I go for expert advice?

---
Best regards,
Denis
kuzulis
Junior Member
 
Posts: 1
Joined: 23 Nov 2011, 07:24

Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests