2014-06-16 21:59:36

by Lukasz Rymanowski

[permalink] [raw]
Subject: [PATCH] android/gatt: Add test command for sign write

This is needed for some PTS test cases.
---
android/gatt.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index a19fe5c..943704a 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3674,6 +3674,11 @@ static uint8_t test_read_write(bdaddr_t *bdaddr, bt_uuid_t *uuid, uint16_t op,
case ATT_OP_EXEC_WRITE_REQ:
length = enc_exec_write_req(u2, pdu, mtu);
break;
+ case ATT_OP_SIGNED_WRITE_CMD:
+ if (signed_write_cmd(dev, u2, (uint8_t *) &u3, sizeof(u3)))
+ return HAL_STATUS_SUCCESS;
+ else
+ return HAL_STATUS_FAILED;
default:
error("gatt: Unknown operation type");

--
1.8.4



2014-06-17 09:23:38

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH] android/gatt: Add test command for sign write

Hi Ɓukasz,

On Monday 16 of June 2014 23:59:36 Lukasz Rymanowski wrote:
> This is needed for some PTS test cases.
> ---
> android/gatt.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index a19fe5c..943704a 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -3674,6 +3674,11 @@ static uint8_t test_read_write(bdaddr_t *bdaddr, bt_uuid_t *uuid, uint16_t op,
> case ATT_OP_EXEC_WRITE_REQ:
> length = enc_exec_write_req(u2, pdu, mtu);
> break;
> + case ATT_OP_SIGNED_WRITE_CMD:
> + if (signed_write_cmd(dev, u2, (uint8_t *) &u3, sizeof(u3)))
> + return HAL_STATUS_SUCCESS;
> + else
> + return HAL_STATUS_FAILED;
> default:
> error("gatt: Unknown operation type");
>
>

Patch applied, thanks.

--
Best regards,
Szymon Janc