capability not found

John (J5) Palmieri johnp at redhat.com
Sun Jul 31 10:42:45 PDT 2005


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>

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



More information about the Hal mailing list