[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Detecting available ports
On October 16, 2009 03:32:27 am Matthew Mondor wrote:
> On Thu, 15 Oct 2009 02:30:30 -0400
> Jacques Pelletier <jpelletier%ieee.org@localhost> 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)...
I will probably leave aside for now, the detection of events such as adding an
USB to serial converter.
In Linux, there´s a way to scan the /proc or /sys directories for getting the
available serial ports. I would like to do the same on NetBSD. How can it be
Main Index |
Thread Index |