2007-05-13 11:59:46

by Dick

[permalink] [raw]
Subject: [Bluez-users] dbus.DBusException: org.bluez.input.Error.AlreadyExists: Input Already exists

Hi all,

I'm trying the new input service with my Logitech dinovo desktop but I can't get
it working. I've read http://wiki.bluez.org/wiki/HOWTO/InputDevices and
manufactured/stolen the following python script:

import dbus
bus = dbus.SystemBus()
bmgr = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
'org.bluez.Manager')
bus_id = bmgr.ActivateService('input')

# All input messages should be sent to this address
print bus_id

imgr = dbus.Interface(bus.get_object(bus_id, '/org/bluez/input'),
'org.bluez.input.Manager')

# device creation
#path = imgr.CreateDevice('00:07:61:69:27:XX')
path = imgr.CreateDevice('00:07:61:68:CA:XX')
idev = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.input.Device')

# host initiated connection
print idev.GetName()
idev.Connect()

This results in:

:1.30
Logitech Bluetooth Keyboard
Traceback (most recent call last):
File "test.py", line 19, in ?
idev.Connect()
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 169, in __call__
reply_message = self._connection.send_message_with_reply_and_block(message,
timeout)
dbus.DBusException: org.bluez.input.Error.ConnectionAttemptFailed: Host is down

I've tried some fiddling with the connect button and rm-/insmod-ed hidp (from
linux-2.6.21).

Could someone please give me some hints?

Thanks,
Dick


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2007-05-14 17:07:09

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] dbus.DBusException: org.bluez.input.Error.AlreadyExists: Input Already exists

Hi Dick,

> I'm trying the new input service with my Logitech dinovo desktop but I can't get
> it working. I've read http://wiki.bluez.org/wiki/HOWTO/InputDevices and
> manufactured/stolen the following python script:
>
> import dbus
> bus = dbus.SystemBus()
> bmgr = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
> 'org.bluez.Manager')
> bus_id = bmgr.ActivateService('input')
>
> # All input messages should be sent to this address
> print bus_id
>
> imgr = dbus.Interface(bus.get_object(bus_id, '/org/bluez/input'),
> 'org.bluez.input.Manager')
>
> # device creation
> #path = imgr.CreateDevice('00:07:61:69:27:XX')
> path = imgr.CreateDevice('00:07:61:68:CA:XX')
> idev = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.input.Device')
>
> # host initiated connection
> print idev.GetName()
> idev.Connect()
>
> This results in:
>
> :1.30
> Logitech Bluetooth Keyboard
> Traceback (most recent call last):
> File "test.py", line 19, in ?
> idev.Connect()
> File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 169, in __call__
> reply_message = self._connection.send_message_with_reply_and_block(message,
> timeout)
> dbus.DBusException: org.bluez.input.Error.ConnectionAttemptFailed: Host is down
>
> I've tried some fiddling with the connect button and rm-/insmod-ed hidp (from
> linux-2.6.21).
>
> Could someone please give me some hints?

no need to call Connect(), because HID devices will re-connect to you.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users