linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Łukasz Rymanowski" <lukasz.rymanowski@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Cc: "Łukasz Rymanowski" <lukasz.rymanowski@codecoup.pl>
Subject: [PATCH v3 3/9] unit/test-gatt: Extend large-db
Date: Fri, 18 Mar 2016 14:08:12 +0100	[thread overview]
Message-ID: <1458306498-28151-4-git-send-email-lukasz.rymanowski@codecoup.pl> (raw)
In-Reply-To: <1458306498-28151-1-git-send-email-lukasz.rymanowski@codecoup.pl>

This patch adds characteristic extended descriptor to characteristic
handle 0x0081. Also fixes testes using this.

We need this to make script pass when following patches start
to look into this descriptor on reliable write session
---
 unit/test-gatt.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index e63adb9..dd29eef 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -223,7 +223,7 @@ struct context {
 			0x60, 0x00, 0x6B, 0x00, 0x0B, 0xA0),		\
 		raw_pdu(0x10, 0x6C, 0x00, 0xff, 0xff, 0x00, 0x28),	\
 		raw_pdu(0x11, 0x06, 0x70, 0x00, 0x76, 0x00, 0x0B, 0xA0,	\
-			0x80, 0x00, 0x85, 0x00, 0x0B, 0xA0),		\
+			0x80, 0x00, 0x86, 0x00, 0x0B, 0xA0),		\
 		raw_pdu(0x10, 0x86, 0x00, 0xff, 0xff, 0x00, 0x28),	\
 		raw_pdu(0x11, 0x14, 0x90, 0x00, 0x96, 0x00,		\
 			0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01,	\
@@ -1614,7 +1614,7 @@ static struct gatt_db *make_test_spec_small_db(void)
 static struct gatt_db *make_test_spec_large_db_1(void)
 {
 	const struct att_handle_spec specs[] = {
-		PRIMARY_SERVICE(0x0080, "a00b", 6),
+		PRIMARY_SERVICE(0x0080, "a00b", 7),
 		CHARACTERISTIC(0xb008, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE,
 					BT_GATT_CHRC_PROP_READ |
 					BT_GATT_CHRC_PROP_WRITE,
@@ -1623,6 +1623,8 @@ static struct gatt_db *make_test_spec_large_db_1(void)
 		DESCRIPTOR(0xb016, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x02),
 		DESCRIPTOR(0xb017, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE |
 						BT_ATT_PERM_ENCRYPT, 0x03),
+		DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x01,
+									0x00),
 
 		SECONDARY_SERVICE(0x0001, "a00d", 6),
 		INCLUDE(0x0080),
@@ -2438,7 +2440,7 @@ int main(int argc, char *argv[])
 				0xa0),
 			raw_pdu(0x07, 0x30, 0x00, 0x32, 0x00, 0x50, 0x00, 0x52,
 				0x00, 0x60, 0x00, 0x6b, 0x00, 0x70, 0x00, 0x76,
-				0x00, 0x80, 0x00, 0x85, 0x00),
+				0x00, 0x80, 0x00, 0x86, 0x00),
 			raw_pdu(0x06, 0x86, 0x00, 0xff, 0xff, 0x00, 0x28, 0x0b,
 				0xa0),
 			raw_pdu(0x01, 0x06, 0x86, 0x00, 0x0a));
@@ -2514,7 +2516,7 @@ int main(int argc, char *argv[])
 			ts_large_db_1, NULL,
 			raw_pdu(0x03, 0x00, 0x02),
 			raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x02, 0x28),
-			raw_pdu(0x09, 0x08, 0x02, 0x00, 0x80, 0x00, 0x85, 0x00,
+			raw_pdu(0x09, 0x08, 0x02, 0x00, 0x80, 0x00, 0x86, 0x00,
 				0x0b, 0xa0, 0x21, 0x00, 0x01, 0x00, 0x06, 0x00,
 				0x0d, 0xa0),
 			raw_pdu(0x08, 0x22, 0x00, 0xff, 0xff, 0x02, 0x28),
-- 
2.5.0


  parent reply	other threads:[~2016-03-18 13:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 13:08 [PATCH v3 0/9] shared/gatt: Couple fixes and improvements Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 1/9] unit/test-gatt: Fix long write testcases Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 2/9] unit/test-gatt: Modify small-db Łukasz Rymanowski
2016-03-18 13:08 ` Łukasz Rymanowski [this message]
2016-03-18 13:08 ` [PATCH v3 4/9] unit/test-gatt: Fix long write test Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 5/9] shared/gatt-server: Fix handle error on execute write Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 6/9] shared/gatt-server: Add support for long write Łukasz Rymanowski
2016-03-22 15:03   ` Luiz Augusto von Dentz
2016-03-25 14:15     ` Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 7/9] shared/gatt-server: Support for reliable session nested with long Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 8/9] shared/gatt-db: Add API to get extended prop Łukasz Rymanowski
2016-03-18 13:08 ` [PATCH v3 9/9] shared/gatt-server: Check for ext. charact. prop. on reliable session Łukasz Rymanowski
2016-03-22 14:57 ` [PATCH v3 0/9] shared/gatt: Couple fixes and improvements Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458306498-28151-4-git-send-email-lukasz.rymanowski@codecoup.pl \
    --to=lukasz.rymanowski@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).