tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Detecting available ports

On Thu, 15 Oct 2009 02:30:30 -0400
Jacques Pelletier <> wrote:

> Hi, 
> For an application using GTK, I want to fill a combo-box with the list of 
> available serial/parallel ports.
> Is there a way in NetBSD to detect these ports? Is there a mechanism to catch 
> the event of adding a USB to serial converter?

Possibly that such a GTK application could obtain that information via
hald(8) and dbus, but I honestly don't know if hald on NetBSD really
broadcasts the events you need, or if NetBSD itself provides a means
for hald to obtain these other than via dmesg(8).

I see no device event in kqueue(2), drvctl(4) is undocumented so source
would have to be looked at to know if it can provide live updates
(used by drvctl(8) currently, yet "strings /usr/pkg/sbin/hald | grep
drvctl" shows matches.  I have no experience with hald however, never
having enabled that daemon on my systems)...

Home | Main Index | Thread Index | Old Index