Problems connecting to device

David Leangen linux at
Tue Jun 13 23:46:32 PDT 2006


I apologize if I am asking a basic question, but I have tried a few
different things now and keep getting the exception as follows:

  org.freedesktop.DBus$Error$UnknownMethod: Method "GetPropertyString"
  with signature "s" on interface "org.freedesktop.Hal.Device" doesn't

I think I must be overlooking something fundamental...

I am using the java binding from the freedesktop site to try to connect
to a USB device. The goal is simply to read a file on the device. 

This is a basic example of how I am using the API:

  final DBus dbus =
(DBus)dbusConnection.getRemoteObject( "org.freedesktop.DBus",
"/org/freedesktop/DBus", DBus.class );
  final String[] names = dbus.ListNames();
  for ( String name : names )
     System.out.println( name );
     if( !"org.freedesktop.DBus".equals( name ) )
        final Device device =
(Device)dbusConnection.getRemoteObject( name,
"/org/freedesktop/Hal/Device", Device.class );
        final String prop = device.GetPropertyString( "info.bus" );
        System.out.println( prop );
  catch ( DBusException e )
    throwException( e );

Any ideas why this is not working for me?

Thank you so much!


More information about the dbus mailing list