From owner-freebsd-gnome@FreeBSD.ORG Tue Jun 17 00:28:33 2008 Return-Path: Delivered-To: FreeBSD-gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32A210656B9 for ; Tue, 17 Jun 2008 00:28:33 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.5]) by mx1.freebsd.org (Postfix) with ESMTP id A0C108FC12 for ; Tue, 17 Jun 2008 00:28:33 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 10145 invoked from network); 17 Jun 2008 00:28:33 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 17 Jun 2008 00:28:32 -0000 Message-ID: <485702A9.2060209@telenix.org> Date: Mon, 16 Jun 2008 20:17:45 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Joe Marcus Clarke References: <4856C040.9000601@telenix.org> <1213659790.76836.18.camel@shumai.marcuscom.com> In-Reply-To: <1213659790.76836.18.camel@shumai.marcuscom.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD GNOME Mailing List Subject: Re: Hal or dbus info X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 00:28:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joe Marcus Clarke wrote: > On Mon, 2008-06-16 at 15:34 -0400, Chuck Robey wrote: > Anyone know, in the case of FreeBSD, how Hal gets (or, I suppose, dbus gets) the > usb device info? I am writing an Xorg Xinput driver for a USB graphic tablet, > 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 tools at > hand, I get the feeling that hal doesn't get realtime data for usb plugging info. > >> Hal reads the USB data from /dev/usb using the FreeBSD USB API. It >> learns about hot-plugged USB devices from devd. > > 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 state 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. > > So, I want to find out what's the source of dbus's info about the state of 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 via 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. > > 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 this > 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 Thanks, Joe. Between what I got in mail, and what I got in reading all three specs (hal, dbus, and policykit), and the Xinput-hotplugging wiki, I got everything I need now. You won't hear from me for a short while now, while I enjoy myself. Sure do appreciate everything I got. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIVwKpz62J6PPcoOkRAo0vAKCckX2A3enEsLvwK3C3rbgBdlQlXwCfaH20 OMQ5TGI0Qqqhm9u1nqwLtEI= =xosg -----END PGP SIGNATURE-----