Patches fixing this issues were already merged.
---
android/pts-gatt.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/android/pts-gatt.txt b/android/pts-gatt.txt
index 167a6dc..43e1c8a 100644
--- a/android/pts-gatt.txt
+++ b/android/pts-gatt.txt
@@ -729,12 +729,12 @@ TC_GAW_CL_BI_36_C PASS haltest:
gattc get_descriptor
gattc write_descriptor 2 <long_value>
gattc disconnect
-TC_GAW_SR_BV_01_C FAIL haltest:
+TC_GAW_SR_BV_01_C PASS haltest:
gatts add_service
gatts add_characteristic:
<properties> 4 <permissions> 17
gatts start_service
-TC_GAW_SR_BV_02_C FAIL haltest:
+TC_GAW_SR_BV_02_C PASS haltest:
gatts add service
gatts add_characteristics:
<properties> 66 <permisions> 145
@@ -743,7 +743,7 @@ TC_GAW_SR_BV_02_C FAIL haltest:
gatts send_response: (twice)
NOTE: gatts_request_write_cb shall be called
(verify it)
-TC_GAW_SR_BI_01_C FAIL haltest:
+TC_GAW_SR_BI_01_C PASS haltest:
gatts add_service
gatts add_characteristic:
<properties> 68
--
1.9.1
Hi Jakub,
On Wednesday 10 of December 2014 10:57:06 Jakub Tyszkowski wrote:
> Patches fixing this issues were already merged.
> ---
> android/pts-gatt.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/android/pts-gatt.txt b/android/pts-gatt.txt
> index 167a6dc..43e1c8a 100644
> --- a/android/pts-gatt.txt
> +++ b/android/pts-gatt.txt
> @@ -729,12 +729,12 @@ TC_GAW_CL_BI_36_C PASS haltest:
> gattc get_descriptor
> gattc write_descriptor 2 <long_value>
> gattc disconnect
> -TC_GAW_SR_BV_01_C FAIL haltest:
> +TC_GAW_SR_BV_01_C PASS haltest:
> gatts add_service
> gatts add_characteristic:
> <properties> 4 <permissions> 17
> gatts start_service
> -TC_GAW_SR_BV_02_C FAIL haltest:
> +TC_GAW_SR_BV_02_C PASS haltest:
> gatts add service
> gatts add_characteristics:
> <properties> 66 <permisions> 145
> @@ -743,7 +743,7 @@ TC_GAW_SR_BV_02_C FAIL haltest:
> gatts send_response: (twice)
> NOTE: gatts_request_write_cb shall be called
> (verify it)
> -TC_GAW_SR_BI_01_C FAIL haltest:
> +TC_GAW_SR_BI_01_C PASS haltest:
> gatts add_service
> gatts add_characteristic:
> <properties> 68
Applied, thanks.
--
BR
Szymon Janc
This fixes TC_GAW_SR_BI_07_C and probably few other cases.
---
android/gatt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/gatt.c b/android/gatt.c
index f39a66b..e24feb7 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -6448,7 +6448,7 @@ static uint8_t write_prep_request(const uint8_t *cmd, uint16_t cmd_len,
data->value = g_memdup(value, vlen);
data->length = vlen;
- if (!gatt_db_attribute_write(attrib, 0, value, vlen, cmd[0],
+ if (!gatt_db_attribute_write(attrib, offset, value, vlen, cmd[0],
&dev->bdaddr, attribute_write_cb,
data)) {
queue_remove(dev->pending_requests, data);
--
1.9.1
For execute write no write callback is called thus we have to change its
state directly in app's response handler.
This fixes not sending execute write responses in TC_GAW_SR_BI_07_C.
---
android/gatt.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/android/gatt.c b/android/gatt.c
index ac45ffc..f39a66b 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -5530,6 +5530,8 @@ static void handle_server_send_response(const void *buf, uint16_t len)
}
if (transaction->opcode == ATT_OP_EXEC_WRITE_REQ) {
+ struct pending_request *req;
+
conn->wait_execute_write = false;
/* Check for execute response from all server applications */
@@ -5537,6 +5539,14 @@ static void handle_server_send_response(const void *buf, uint16_t len)
goto done;
/*
+ * This is usually done through db write callback but for
+ * execute write we dont have the attribute or handle to call
+ * gatt_db_attribute_write().
+ */
+ req = queue_peek_head(conn->device->pending_requests);
+ req->state = REQUEST_DONE;
+
+ /*
* FIXME: Handle situation when not all server applications
* respond with a success.
*/
--
1.9.1