Problems connecting to device

John (J5) Palmieri johnp at redhat.com
Wed Jun 14 09:00:51 PDT 2006


You need to talk to HAL not D-Bus.  D-Bus doesn't know anything about
HAL devices.  D-Bus is just a communications channel which HAL uses to
export information about devices on your system.

On Wed, 2006-06-14 at 15:46 +0900, David Leangen wrote:
> Hello!
> 
> 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
>   exist
> 
> 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 );
>       }
>     }
>     dbusConnection.disconnect();
>   }
>   catch ( DBusException e )
>   {
>     throwException( e );
>   }
> 
> 
> Any ideas why this is not working for me?
> 
> Thank you so much!
> 
> David
> 
> 
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
-- 



More information about the dbus mailing list