2009-01-13 04:50:41

by Yao Ye

[permalink] [raw]
Subject: passkey agent in bluez4.X

Hi, bluez-users:
I have finished to boot up bluecore-4 on my pxa310, and can be
searched by other BT device.
But, the problem is it can't bind to any other device, because there
isn't a BlueZ agent running to answer pin requests.

How to start a BlueZ agent running to answer pin requests ?

In bluez-4.25/test, i found agent.c and agent command.
so, i run it on my pxa310 board, but it failed while other BT device
connect to it and request a pin code..
the debug info is as following.

[root@Linux /]#./agent 0000 &
bluetoothd[907]: pin_code_request (sba=77:88:66:22:33:44,
dba=00:1A:77:77:14:84)
bluetoothd[907]: hcid_dbus_new_auth_request
bluetoothd[907]: Agent replied with an error:
org.freedesktop.DBus.Error.Unknown Method, Method "RequestPinCode" with
signature "o" on interface "org.bluez.Agent" doesn't exist
bluetoothd[907]: adapter_get_device(00:1A:77:77:14:84)

I have changed device_path and agent_path in agent.c, but it still
doesn't work.
Could somebody know how to run a passkey agent in bluez4.X?
thanks a lot!

Best regards
YAO Ye


2009-01-13 13:27:30

by Yao Ye

[permalink] [raw]
Subject: RE: passkey agent in bluez4.X


My platform didn't support python, so I need a C version
agent.c/passkey-agent.c for bluez4.

I have tried http://thread.gmane.org/gmane.linux.bluez.kernel/813,
but it can't work.

I am a new user of bluez.
May I ask some help at this point ?
Regards.

-----Original Message-----
Hi,

test/agent.c seems to be outdated, but you can use test/simple-agent if
your platform supports python.



2009-01-13 13:08:30

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: passkey agent in bluez4.X

Hi,

test/agent.c seems to be outdated, but you can use test/simple-agent
if your platform supports python.

--
Luiz Augusto von Dentz
Engenheiro de Computa??o

2009-01-13 06:57:35

by Yao Ye

[permalink] [raw]
Subject: RE: define of DBUS_SYSTEM_CONFIG_FILE ?

I have fixed this problem !
It is defined in Makefile, not in config.h !

[root@localhost dbus-1.2.6-arm]# grep -r 'DBUS_SYSTEM_CONFIG_FILE' ./
./ChangeLog.pre-1-2: * dbus/Makefile.am (INCLUDES): move
DBUS_SYSTEM_CONFIG_FILE and
./dbus/Makefile.in:
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"
\
./dbus/Makefile:
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"
\
./dbus/Makefile.am:
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"
\
./dbus/dbus-sysdeps-unix.c: // _dbus_warn
("\nDBUS_SYSTEM_CONFIG_FILE= %s!\n", DBUS_SYSTEM_CONFIG_FILE);
./bus/Makefile.in:
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
./bus/Makefile: -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"
\
./bus/activation-helper.c:// if (!_dbus_string_append (&config_file,
DBUS_SYSTEM_CONFIG_FILE))
./bus/Makefile.am:
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"


2009-01-13 05:29:51

by Yao Ye

[permalink] [raw]
Subject: RE: passkey agent in bluez4.X

I have found a python version of simple-agent in /bluez4.25/test.
I am developing an embedded system project and don't want to make Python
a dependence.

so, I am looking for a C version of simple-agent application.
There's /bluez4.25/test/agent.c in the source tree.
However, it it's not up-to-date with the latest 4.x API ?

Could somebody know how to update agent.c ?

Best Regards,