Patchwork [1/2] bluez4: Install simple-agent utility for pairing bluetooth devices

login
register
mail settings
Submitter Zhong Hongbo
Date Nov. 13, 2013, 10:08 a.m.
Message ID <1384337335-32231-2-git-send-email-hongbo.zhong@windriver.com>
Download mbox | patch
Permalink /patch/61611/
State New
Headers show

Comments

Zhong Hongbo - Nov. 13, 2013, 10:08 a.m.
From: Zhong Hongbo <hongbo.zhong@windriver.com>

Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
---
 meta/recipes-connectivity/bluez/bluez4_4.101.bb |    2 ++
 1 file changed, 2 insertions(+)
Phil Blundell - Nov. 13, 2013, 11:38 a.m.
On Wed, 2013-11-13 at 18:08 +0800, Zhong Hongbo wrote:
> From: Zhong Hongbo <hongbo.zhong@windriver.com>
> 
> Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
[...]
>  	install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
> +	install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent

What does simple-agent actually do?  Is it generally enough useful that
it should be installed unconditionally?

p.
Ross Burton - Nov. 13, 2013, 12:34 p.m.
On 13 November 2013 11:38, Phil Blundell <pb@pbcl.net> wrote:
> On Wed, 2013-11-13 at 18:08 +0800, Zhong Hongbo wrote:
>> From: Zhong Hongbo <hongbo.zhong@windriver.com>
>>
>> Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
> [...]
>>       install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
>> +     install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent
>
> What does simple-agent actually do?  Is it generally enough useful that
> it should be installed unconditionally?

It's a dumb agent for responding to incoming pairing requests, as it
works interactively from a terminal it's purely for testing purposes.
I'd prefer to see it (and probably more utilities) installed in
bluez4-tests as it's not generally useful.

Ross
Philip Balister - Nov. 13, 2013, 1:24 p.m.
On 11/13/2013 07:34 AM, Burton, Ross wrote:
> On 13 November 2013 11:38, Phil Blundell <pb@pbcl.net> wrote:
>> On Wed, 2013-11-13 at 18:08 +0800, Zhong Hongbo wrote:
>>> From: Zhong Hongbo <hongbo.zhong@windriver.com>
>>>
>>> Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
>> [...]
>>>       install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
>>> +     install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent
>>
>> What does simple-agent actually do?  Is it generally enough useful that
>> it should be installed unconditionally?
> 
> It's a dumb agent for responding to incoming pairing requests, as it
> works interactively from a terminal it's purely for testing purposes.
> I'd prefer to see it (and probably more utilities) installed in
> bluez4-tests as it's not generally useful.

I think it is also useful for console only devices.

Philip

> 
> Ross
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
>
Ross Burton - Nov. 13, 2013, 2:50 p.m.
On 13 November 2013 13:24, Philip Balister <philip@balister.org> wrote:
> On 11/13/2013 07:34 AM, Burton, Ross wrote:
>> On 13 November 2013 11:38, Phil Blundell <pb@pbcl.net> wrote:
>>> On Wed, 2013-11-13 at 18:08 +0800, Zhong Hongbo wrote:
>>>> From: Zhong Hongbo <hongbo.zhong@windriver.com>
>>>>
>>>> Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
>>> [...]
>>>>       install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
>>>> +     install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent
>>>
>>> What does simple-agent actually do?  Is it generally enough useful that
>>> it should be installed unconditionally?
>>
>> It's a dumb agent for responding to incoming pairing requests, as it
>> works interactively from a terminal it's purely for testing purposes.
>> I'd prefer to see it (and probably more utilities) installed in
>> bluez4-tests as it's not generally useful.
>
> I think it is also useful for console only devices.

Again, only for interactive use where the user is sitting at a shell
and has started the agent themselves.  You'd never use it in a
production environment.

Ross
Zhong Hongbo - Nov. 14, 2013, 3:29 a.m.
On 11/13/2013 08:34 PM, Burton, Ross wrote:
> On 13 November 2013 11:38, Phil Blundell <pb@pbcl.net> wrote:
>> On Wed, 2013-11-13 at 18:08 +0800, Zhong Hongbo wrote:
>>> From: Zhong Hongbo <hongbo.zhong@windriver.com>
>>>
>>> Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
>> [...]
>>>        install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
>>> +     install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent
>> What does simple-agent actually do?  Is it generally enough useful that
>> it should be installed unconditionally?
> It's a dumb agent for responding to incoming pairing requests, as it
> works interactively from a terminal it's purely for testing purposes.
> I'd prefer to see it (and probably more utilities) installed in
> bluez4-tests as it's not generally useful.
Agree.

But a issue is: How do place this test file?  On the /usr/bin directory? 
or /usb/bin/bluez? or others?

The below place the test to /usr/bin. as the following:

FILES_${PN}-test += "\
   ${bindir}/test-* \
   ${bindir}/simple-* \
   ${bindir}/agent \
   ${bindir}/attest \
   ${bindir}/avtest \
   ${bindir}/bdaddr \
   ${bindir}/btiotest \
   ${bindir}/gaptest \
   ${bindir}/hsmicro \
   ${bindir}/hsplay \
   ${bindir}/hstest \
   ${bindir}/ipctest \
   ${bindir}/l2test \
   ${bindir}/list-devices \
   ${bindir}/lmptest \
   ${bindir}/monitor-bluetooth \
   ${bindir}/mpris-player \
   ${bindir}/rctest \
   ${bindir}/scotest \
   ${bindir}/sdptest \
   ${bindir}/uuidtest \
"

Thanks,
Hongbo
>
> Ross
>
>

Patch

diff --git a/meta/recipes-connectivity/bluez/bluez4_4.101.bb b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
index d6c3e26..c3444ab 100644
--- a/meta/recipes-connectivity/bluez/bluez4_4.101.bb
+++ b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
@@ -18,6 +18,8 @@  do_install_append() {
 	install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
 	install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
 	install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
+	install -m 0755 ${S}/test/simple-agent ${D}/${bindir}/simple-agent
+
 	# at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
 	install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
 }