2011-12-26 06:35:10

by Hemant Gupta

[permalink] [raw]
Subject: [PATCH BlueZ 0/1] Add support for KeyboardDisplay IO Capability

Without this patch if local device tries to set KeyboardDisplay IO
Capability, error is returned by BlueZ while registering the agent.

Hemant Gupta (1):
Add KeyboardDisplay IO Capability.

src/adapter.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)



2011-12-27 18:48:12

by Hemant Gupta

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/1] Add KeyboardDisplay IO Capability.

Hi Johan,

On Tue, Dec 27, 2011 at 3:45 PM, Johan Hedberg <[email protected]> wrote:
> Hi Hemant,
>
> On Mon, Dec 26, 2011, Hemant Gupta wrote:
>> This patch adds suppport for KeyboardDisplay IO capability in BlueZ.
>> ---
>> ?src/adapter.c | ? ?3 +++
>> ?1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/adapter.c b/src/adapter.c
>> index 2d9e368..3bdf525 100644
>> --- a/src/adapter.c
>> +++ b/src/adapter.c
>> @@ -74,6 +74,7 @@
>> ?#define IO_CAPABILITY_DISPLAYYESNO ? 0x01
>> ?#define IO_CAPABILITY_KEYBOARDONLY ? 0x02
>> ?#define IO_CAPABILITY_NOINPUTNOOUTPUT ? ? ? ?0x03
>> +#define IO_CAPABILITY_KEYBOARDDISPLAY ? ? ? ?0x04
>> ?#define IO_CAPABILITY_INVALID ? ? ? ? ? ? ? ?0xFF
>>
>> ?#define check_address(address) bachk(address)
>> @@ -1634,6 +1635,8 @@ static uint8_t parse_io_capability(const char *capability)
>> ? ? ? ? ? ? ? return IO_CAPABILITY_KEYBOARDONLY;
>> ? ? ? if (g_str_equal(capability, "NoInputNoOutput"))
>> ? ? ? ? ? ? ? return IO_CAPABILITY_NOINPUTNOOUTPUT;
>> + ? ? if (g_str_equal(capability, "KeyboardDisplay"))
>> + ? ? ? ? ? ? return IO_CAPABILITY_KEYBOARDDISPLAY;
>> ? ? ? return IO_CAPABILITY_INVALID;
>> ?}
>
> We will also need a patch to hciops to ensure that this is only used for
> SMP whereas for SSP KEYBOARDDISPLAY needs to be mapped to DISPLAYYESNO.
> Are you working on that? The same will also be needed for the mgmt code
> in the kernel, but I can do that part unless someone beats me to it.
>
Thanks for pointing this out. At the moment I had not worked on that
part but if no one else is working on it I will submit the patches for
same as well soon (most probably early next week).

> Johan



--
Best Regards
Hemant Gupta
ST-Ericsson India

2011-12-27 10:15:02

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/1] Add KeyboardDisplay IO Capability.

Hi Hemant,

On Mon, Dec 26, 2011, Hemant Gupta wrote:
> This patch adds suppport for KeyboardDisplay IO capability in BlueZ.
> ---
> src/adapter.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 2d9e368..3bdf525 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -74,6 +74,7 @@
> #define IO_CAPABILITY_DISPLAYYESNO 0x01
> #define IO_CAPABILITY_KEYBOARDONLY 0x02
> #define IO_CAPABILITY_NOINPUTNOOUTPUT 0x03
> +#define IO_CAPABILITY_KEYBOARDDISPLAY 0x04
> #define IO_CAPABILITY_INVALID 0xFF
>
> #define check_address(address) bachk(address)
> @@ -1634,6 +1635,8 @@ static uint8_t parse_io_capability(const char *capability)
> return IO_CAPABILITY_KEYBOARDONLY;
> if (g_str_equal(capability, "NoInputNoOutput"))
> return IO_CAPABILITY_NOINPUTNOOUTPUT;
> + if (g_str_equal(capability, "KeyboardDisplay"))
> + return IO_CAPABILITY_KEYBOARDDISPLAY;
> return IO_CAPABILITY_INVALID;
> }

We will also need a patch to hciops to ensure that this is only used for
SMP whereas for SSP KEYBOARDDISPLAY needs to be mapped to DISPLAYYESNO.
Are you working on that? The same will also be needed for the mgmt code
in the kernel, but I can do that part unless someone beats me to it.

Johan

2011-12-26 06:35:11

by Hemant Gupta

[permalink] [raw]
Subject: [PATCH BlueZ 1/1] Add KeyboardDisplay IO Capability.

This patch adds suppport for KeyboardDisplay IO capability in BlueZ.
---
src/adapter.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 2d9e368..3bdf525 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -74,6 +74,7 @@
#define IO_CAPABILITY_DISPLAYYESNO 0x01
#define IO_CAPABILITY_KEYBOARDONLY 0x02
#define IO_CAPABILITY_NOINPUTNOOUTPUT 0x03
+#define IO_CAPABILITY_KEYBOARDDISPLAY 0x04
#define IO_CAPABILITY_INVALID 0xFF

#define check_address(address) bachk(address)
@@ -1634,6 +1635,8 @@ static uint8_t parse_io_capability(const char *capability)
return IO_CAPABILITY_KEYBOARDONLY;
if (g_str_equal(capability, "NoInputNoOutput"))
return IO_CAPABILITY_NOINPUTNOOUTPUT;
+ if (g_str_equal(capability, "KeyboardDisplay"))
+ return IO_CAPABILITY_KEYBOARDDISPLAY;
return IO_CAPABILITY_INVALID;
}

--
1.6.6.1