OpenWrt Forum Archive

Topic: Missing passkey-agent in bluez-utils

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everyone!

First off, thanks to all who contribute to OpenWrt it's a great Linux disto.

My problem ist, that I can't connect/pair to a bluetooth device which requires a PIN. Trough /etc/bluetooth/rfcomm.conf I am binding /dev/rfcomm0, but  as I try to open rfcomm0 with minicom it says "minicom: cannot open /dev/rfcomm0: Connection refused". The bluetooth device is a btm-222 in client mode and OpenWrt should be master.

If I start hcid with the options -n -d it givs me the following errors:

hcid[2018]: pin_code_request (sba=00:0B:0D:62:23:FA, dba=00:12:6F:03:6F:37)
hcid[2018]: call_passkey_agent(): no agent available

As I understand the "passkey" option from hcid.conf is only for incoming connections. Did I get this right?

From google I learned that for outgoing bluetooth connections there should be a passkey-agent which serves the pin for outgoing connections. According to [1] the passkey-agent was removed from bluez-utils. Is there an other way of defining the pin for outgoing bluetooth connections?

[1] - https://dev.openwrt.org/changeset/11222 … s/Makefile

Thanks
mo

(Last edited by motze on 5 Jun 2009, 14:19)

I got it. Had to install ...

opkg install python dbus-python python-bluez python-gobject

... create a Simple Passkey agent in python explained at http://wiki.bluez.org/wiki/PasskeyAgent and call it like ./pyagent "00:12:6F:03:6F:37/654321".

The output from hcid:

hcid[2374]: Default passkey agent (:1.25, /root/pyagent) registered
hcid[2374]: pin_code_request (sba=00:0B:0D:62:23:FA, dba=00:12:6F:03:6F:37)
hcid[2374]: Calling PasskeyAgent.Request: name=:1.25, path=/root/pyagent
hcid[2374]: hcid_dbus_new_auth_request
hcid[2374]: link_key_notify (sba=00:0B:0D:62:23:FA, dba=00:12:6F:03:6F:37)
hcid[2374]: hcid_dbus_bonding_process_complete: status=00
hcid[2374]: adapter_get_device(00:12:6F:03:6F:37)
hcid[2374]: adapter_create_device(00:12:6F:03:6F:37)
hcid[2374]: Creating device /hci0/dev_00_12_6F_03_6F_37
hcid[2374]: hcid_dbus_bonding_process_complete: removing temporary flag
hcid[2374]: link_key_request (sba=00:0B:0D:62:23:FA, dba=00:12:6F:03:6F:37)
hcid[2374]: kernel auth requirements = 0x00
hcid[2374]: stored link key type = 0x00

(Last edited by motze on 5 Jun 2009, 16:01)

How did you enable in hcid.conf to acceept your passkey_agent?

Can you also share exact python script you used because current one I see on archived pages needs additional packages and fails to run for me:
http://web.archive.org/web/201003030414 … sskeyAgent

Please share info on how you got it working. Thanks.

(Last edited by valentt on 10 Dec 2013, 21:23)

The discussion might have continued from here.