From 297234138891272565b7d24d997382164bc394a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alperen=20=C5=9Eener?= Date: Thu, 12 Oct 2023 16:27:47 +0200 Subject: [PATCH] tests: bluetooth: tester: add page number to response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PTS requires IUT to send requests with page number with 0xFF or the highest supported page number in order to retrieve all the composition data pages from the lower tester. This commit add the page number to the response, thus the upper tester can follow the last page number and send the next page request until page 0 is requested. Signed-off-by: Alperen Şener --- tests/bluetooth/tester/src/btp_mesh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/bluetooth/tester/src/btp_mesh.c b/tests/bluetooth/tester/src/btp_mesh.c index 1d6f696f72..c43f19f04c 100644 --- a/tests/bluetooth/tester/src/btp_mesh.c +++ b/tests/bluetooth/tester/src/btp_mesh.c @@ -2033,8 +2033,9 @@ static uint8_t composition_data_get(const void *cmd, uint16_t cmd_len, return BTP_STATUS_FAILED; } - memcpy(rp->data, comp->data, comp->len); - *rsp_len = comp->len; + rp->data[0] = page; + memcpy(rp->data + 1, comp->data, comp->len); + *rsp_len = comp->len + 1; return BTP_STATUS_SUCCESS; }