Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2008 19:43:10 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Chuck Robey <chuckr@telenix.org>
Cc:        FreeBSD GNOME Mailing List <FreeBSD-gnome@freebsd.org>
Subject:   Re: Hal or dbus info
Message-ID:  <1213659790.76836.18.camel@shumai.marcuscom.com>
In-Reply-To: <4856C040.9000601@telenix.org>
References:  <4856C040.9000601@telenix.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-WKREib+Iy0t/qGXHeS8C
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2008-06-16 at 15:34 -0400, Chuck Robey wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Anyone know, in the case of FreeBSD, how Hal gets (or, I suppose, dbus ge=
ts) the
> usb device info?  I am writing an Xorg Xinput driver for a USB graphic ta=
blet,
> and I need to instrument the Hal & dbus interface for it.  I think I will=
 be
> able to get away with (as far as a purely FreeBSD portion) using the uhid
> driver, so I don't need to write any FreeBSD driver.  However, using my t=
ools at
> hand, I get the feeling that hal doesn't get realtime data for usb pluggi=
ng info.

Hal reads the USB data from /dev/usb using the FreeBSD USB API.  It
learns about hot-plugged USB devices from devd.

>=20
> Reason I say that Hal knows usb is because I can use lshal, and list all =
of the
> current usb devices.  However, if I use dbus-monitor to watch teh dbus st=
ate in
> realtime, then I unplug & plug my graphic tablet, dbus monitor is slient =
about
> it, even if I wait 30 minutes.

You would need to monitor the system dbus channel.

>=20
> So, I want to find out what's the source of dbus's info about the state o=
f the
> USB devices.  It's gotta get this info somehow.  Alex Leidinger suggested=
 you
> (and I am running Gnome here, it's possible my Hal is learning all this v=
ia Gnome).

D-BUS really has nothing to do with this.  Hald is responsible for
learning about the various hardware components.  It only uses D-BUS to
communicate that data to clients.

>=20
> You see, if I'm not able to make myself happy with whatever I find, I may=
 well
> write some kind of a app to run from devfs or devd (which seems to know t=
his
> stuff in realtime) to tip off dbus.  However, if it's Gnome, maybe the
> possibility exists to configure Gnome to know more?

Hald already connects to devd, so it should receive realtime updates.
You might want to look at the hal API, and use the FreeBSD hald addons
as a guide (i.e. take a look at the storage addon).  You can use dbus
filters to pick up hal messages about various devices.

Joe

>=20
> So. help me please?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.4 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>=20
> iD8DBQFIVsBAz62J6PPcoOkRAjJcAJ91nREktRt/iYgPiSIINR0uksLF8ACaAsFT
> 3sfYPXhvDWfXPHo3X1rnZyU=3D
> =3DvBjG
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-gnome@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"
>=20
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-WKREib+Iy0t/qGXHeS8C
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkhW+o0ACgkQb2iPiv4Uz4f1ogCghzXANUjuQgDhJ3s52Yui4POa
JBoAnRV059moBwTO/s9FAvOgQHsTa1e/
=nQrU
-----END PGP SIGNATURE-----

--=-WKREib+Iy0t/qGXHeS8C--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1213659790.76836.18.camel>