capability not found

John (J5) Palmieri johnp at redhat.com
Sun Jul 31 12:57:46 PDT 2005


On Sun, 2005-07-31 at 21:41 +0200, P. Durante wrote:
> On 7/31/05, John (J5) Palmieri <johnp at redhat.com> wrote:
> > On Sun, 2005-07-31 at 19:22 +0200, P. Durante wrote:
> > > Hi everybody,
> > > this thing is getting me nervous, the following code
> > >
> > > <->
> > > import dbus
> > > bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
> > > hal_service = bus.get_service("org.freedesktop.Hal")
> > > hal_manager = hal_service.get_object("/org/freedesktop/Hal/Manager","org.freedesktop.Hal.Manager")
> > > bt_devs = hal_manager.FindDeviceByCapability ("bluetooth_hci")
> > >
> > > for dev_uri in bt_devs:
> > >       dev = hal_service.get_object (dev_uri, "org.freedesktop.Hal.Device")
> > >       iface = dev.GetPropertyString ("bluetooth_hci.interface_name")
> > >       print "found hci bluetooth device "+ iface
> > > <->
> > >
> > > is supposed to print the name of the active hci devices (and when I
> > > run it, there's /sys/class/bluetooth/hci0 sitting in my sysfs)
> > > obviously it does not work, and shows anything, any ideas?
> > >
> > 
> > Please provide a link to the output of lshal (don't attach it because it
> > could be pretty big).  My guess is the property string or capability
> > string is wrong or the older hal doesn't support bluetooth.  Have you
> > tried it on newer versions of HAL (note newer version of the D-Bus
> > Python API's are quite different so you would need to change your
> > program slightly).
> > 
> > --
> > John (J5) Palmieri <johnp at redhat.com>
> > 
> > 
> 
> man, you were right, sorry I didn't know about the lshal command, you
> can find the output here
> 
> http://shackan.altervista.org/lshal.out
> 
> and as you can see, there's no bluetooth_hci capability, I knew the
> name of the cap was "bluetooth_hci" because I read it in
> /hal/hald/linux2/classdev.c from cvs, of course my version is much
> older (`dpkg -p hal`says 0.4.7) and probably doesn't have  it, the
> strange thing is that I can actually see that the hardware gets
> correctly attacched to sysfs under /sys/class/bluetooth/hci0, I
> realize I should compile the latest version but I fear this would
> conflict with apt-get (damn package managers) Is there a workaround to
> that ?
> 
> Thanks

You would also have to upgrade D-Bus and port your Python app to the
latest API.  I think Umbuntu might already have packages. I'm not sure
if it is in unstable. 

-- 
John (J5) Palmieri <johnp at redhat.com>

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list