Skip to contentSkip to conversation

dbus.DBusException: org.bluez.input.Error.AlreadyExists: Input Already exists

Bluez-users Dick 2 participants 6 messages May 13, 2007 – May 16, 2007 Bluetooth drivers

lore
Share & tools
lore

Dick

author
#0 lore raw

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

maintainer
#1 lore raw

Hi Dick,

Quoted 37 lines

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

Quoted 4 lines

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

author
#2 lore raw
Quoted 1 line · Marcel Holtmann <marcel <at> holtmann.org> writes:

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

Thank you very much for your answer, I've tried without Connect() but my dinovo keyboard and mouse seem to connect and after some seconds disconnect (as far as I can see with hcitool con).
Can I see why they are disconnected? I should be able to use the keyboard and mouse as input devices this way shouldn't I?

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

maintainer
#3 lore raw

Hi Dick,

Quoted 7 lines
Quoted 1 line

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

Thank you very much for your answer, I've tried without Connect() but my dinovo keyboard and mouse seem to connect and after some seconds disconnect (as far as I can see with hcitool con).
Can I see why they are disconnected? I should be able to use the keyboard and mouse as input devices this way shouldn't I?

run "hcidump -X -V" to see what actually happens.

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

author
#4 lore raw
Quoted 1 line · Marcel Holtmann <marcel <at> holtmann.org> writes:

run "hcidump -X -V" to see what actually happens.

Hi Marcel,

I've tried hcidump but its output doesn't help me ;) As far as I understand the output it in "Connection pending - Authorization pending" then "Connection successful" and finally in "Connection refused - PSM not supported" do you know what this means?

This is the tail of hcidump:

Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0221 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0221 flags 0x00 clen 4
      MTU 48 
Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 2 lines

ACL data: handle 12 flags 0x02 dlen 27
ACL data: handle 12 flags 0x01 dlen 13

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 28
      MTU 48 QoS 0x01 (Best effort) 
< ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0221 flags 0x00 result 0 clen 4
      Success
      MTU 48 
< ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0221 scid 0x0040
< ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0220 scid 0x0041
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 12 packets 4
< ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0042
Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0222 scid 0x0042 result 1 status 2
Connection pending - Authorization pending

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 12 mode 0x02 interval 32
    Mode: Sniff
Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0221 scid 0x0040
Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0220 scid 0x0041
Quoted 1 line

ACL data: handle 12 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0042 result 2 status 0
Connection refused - PSM not supported

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 12 packets 1

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 12 mode 0x00 interval 0
    Mode: Active
Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 12 reason 0x13
Reason: Remote User Terminated Connection

-------------------------------------------------------------------------
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

author
#5 lore raw

Okay problem solved with bluez-utils 3.10.1, thanks!

-------------------------------------------------------------------------
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