This patch adds Characteristic Extended descriptor to characteristic with handle 0x0002 nad 0x0014. Also fixes scripts using small-db. We need this as next patches will start to look into this descriptor on reliable write session. --- unit/test-gatt.c | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index 70b6de5..9554bcb 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -209,7 +209,7 @@ struct context { #define PRIMARY_DISC_SMALL_DB \ raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28), \ - raw_pdu(0x11, 0x06, 0x10, 0xF0, 0x17, 0xF0, 0x00, 0x18, \ + raw_pdu(0x11, 0x06, 0x10, 0xF0, 0x18, 0xF0, 0x00, 0x18, \ 0xFF, 0xFF, 0xFF, 0xFF, 0x0a, 0x18) #define PRIMARY_DISC_LARGE_DB_1 \ @@ -244,27 +244,29 @@ struct context { raw_pdu(0x01, 0x10, 0x11, 0x00, 0x0a) #define INCLUDE_DISC_SMALL_DB \ - raw_pdu(0x08, 0x10, 0xf0, 0x17, 0xf0, 0x02, 0x28), \ + raw_pdu(0x08, 0x10, 0xf0, 0x18, 0xf0, 0x02, 0x28), \ raw_pdu(0x09, 0x08, 0x11, 0xf0, 0x01, 0x00, 0x0f, 0x00, \ 0x0a, 0x18), \ - raw_pdu(0x08, 0x12, 0xf0, 0x17, 0xf0, 0x02, 0x28), \ + raw_pdu(0x08, 0x12, 0xf0, 0x18, 0xf0, 0x02, 0x28), \ raw_pdu(0x01, 0x08, 0x12, 0xf0, 0x0a), \ raw_pdu(0x08, 0x01, 0x00, 0x10, 0x00, 0x02, 0x28), \ raw_pdu(0x01, 0x08, 0x01, 0x00, 0x0a) #define CHARACTERISTIC_DISC_SMALL_DB \ - raw_pdu(0x08, 0x10, 0xf0, 0x17, 0xf0, 0x03, 0x28), \ + raw_pdu(0x08, 0x10, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, \ 0x2a), \ - raw_pdu(0x08, 0x13, 0xf0, 0x17, 0xf0, 0x03, 0x28), \ + raw_pdu(0x08, 0x13, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x02, 0x15, 0xf0, 0xef, \ 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, \ 0x00, 0x00, 0x00, 0x09, 0xB0, 0x00, 0x00), \ - raw_pdu(0x08, 0x15, 0xf0, 0x17, 0xf0, 0x03, 0x28), \ - raw_pdu(0x09, 0x07, 0x16, 0xf0, 0x02, 0x17, 0xf0, 0x01, \ + raw_pdu(0x08, 0x15, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ + raw_pdu(0x09, 0x07, 0x17, 0xf0, 0x02, 0x18, 0xf0, 0x01, \ 0x2a), \ - raw_pdu(0x08, 0x17, 0xf0, 0x17, 0xf0, 0x03, 0x28), \ - raw_pdu(0x01, 0x08, 0x17, 0xf0, 0x0a), \ + raw_pdu(0x08, 0x18, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ + raw_pdu(0x01, 0x08, 0x18, 0xf0, 0x0a), \ + raw_pdu(0x04, 0x16, 0xf0, 0x16, 0xf0), \ + raw_pdu(0x05, 0x01, 0x16, 0xf0, 0x00, 0x29), \ raw_pdu(0x08, 0x01, 0x00, 0x10, 0x00, 0x03, 0x28), \ raw_pdu(0x09, 0x07, 0x02, 0x00, 0x32, 0x03, 0x00, 0x29, \ 0x2a), \ @@ -1560,7 +1562,10 @@ static struct gatt_db *make_test_spec_small_db(void) BT_ATT_PERM_WRITE, 0x00, 0x00), DESCRIPTOR_STR(GATT_CHARAC_USER_DESC_UUID, BT_ATT_PERM_READ, "Manufacturer Name"), - PRIMARY_SERVICE(0xF010, GAP_UUID, 8), + DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x01, + 0x00), + + PRIMARY_SERVICE(0xF010, GAP_UUID, 9), INCLUDE(0x0001), CHARACTERISTIC_STR(GATT_CHARAC_DEVICE_NAME, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, @@ -1568,6 +1573,8 @@ static struct gatt_db *make_test_spec_small_db(void) CHARACTERISTIC(0000B009-0000-0000-0123-456789abcdef, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, BT_GATT_CHRC_PROP_READ, 0x09), + DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x01, + 0x00), CHARACTERISTIC(GATT_CHARAC_APPEARANCE, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, 0x00, 0x00), PRIMARY_SERVICE(0xFFFF, DEVICE_INFORMATION_UUID, 1), @@ -2419,7 +2426,7 @@ int main(int argc, char *argv[]) raw_pdu(0x03, 0x00, 0x02), raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x00, 0x18), - raw_pdu(0x07, 0x10, 0xf0, 0x17, 0xf0), + raw_pdu(0x07, 0x10, 0xf0, 0x18, 0xf0), raw_pdu(0x06, 0x18, 0xf0, 0xff, 0xff, 0x00, 0x28, 0x00, 0x18), raw_pdu(0x01, 0x06, 0x18, 0xf0, 0x0a)); @@ -2533,19 +2540,19 @@ int main(int argc, char *argv[]) define_test_server("/TP/GAD/SR/BV-04-C/small/1", test_server, ts_small_db, NULL, raw_pdu(0x03, 0x00, 0x02), - raw_pdu(0x08, 0x10, 0xf0, 0x17, 0xf0, 0x03, 0x28), + raw_pdu(0x08, 0x10, 0xf0, 0x18, 0xf0, 0x03, 0x28), raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, 0x2a), - raw_pdu(0x08, 0x13, 0xf0, 0x17, 0xf0, 0x03, 0x28), + raw_pdu(0x08, 0x13, 0xf0, 0x18, 0xf0, 0x03, 0x28), raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x02, 0x15, 0xf0, 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0xb0, 0x00, 0x00), - raw_pdu(0x08, 0x15, 0xf0, 0x17, 0xf0, 0x03, 0x28), - raw_pdu(0x09, 0x07, 0x16, 0xf0, 0x02, 0x17, 0xf0, 0x01, + raw_pdu(0x08, 0x15, 0xf0, 0x18, 0xf0, 0x03, 0x28), + raw_pdu(0x09, 0x07, 0x17, 0xf0, 0x02, 0x18, 0xf0, 0x01, 0x2a), - raw_pdu(0x08, 0x17, 0xf0, 0x17, 0xf0, 0x03, 0x28), - raw_pdu(0x01, 0x08, 0x17, 0xf0, 0x0a)); + raw_pdu(0x08, 0x18, 0xf0, 0x18, 0xf0, 0x03, 0x28), + raw_pdu(0x01, 0x08, 0x18, 0xf0, 0x0a)); define_test_server("/TP/GAD/SR/BV-04-C/small/2", test_server, ts_small_db, NULL, @@ -2594,11 +2601,11 @@ int main(int argc, char *argv[]) 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0xb0, 0x00, 0x00), - raw_pdu(0x08, 0x15, 0xf0, 0x17, 0xf0, 0x03, 0x28), - raw_pdu(0x09, 0x07, 0x16, 0xf0, 0x02, 0x17, 0xf0, 0x01, + raw_pdu(0x08, 0x15, 0xf0, 0x18, 0xf0, 0x03, 0x28), + raw_pdu(0x09, 0x07, 0x17, 0xf0, 0x02, 0x18, 0xf0, 0x01, 0x2a), - raw_pdu(0x08, 0x17, 0xf0, 0x17, 0xf0, 0x03, 0x28), - raw_pdu(0x01, 0x08, 0x17, 0xf0, 0x0a)); + raw_pdu(0x08, 0x18, 0xf0, 0x18, 0xf0, 0x03, 0x28), + raw_pdu(0x01, 0x08, 0x18, 0xf0, 0x0a)); define_test_server("/TP/GAD/SR/BV-05-C/small/2", test_server, ts_small_db, NULL, @@ -2798,7 +2805,7 @@ int main(int argc, char *argv[]) 0x00), raw_pdu(0x09, 0x03, 0x15, 0xF0, 0x09), raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0x01, 0x2a), - raw_pdu(0x09, 0x04, 0x17, 0xF0, 0x00, 0x00)); + raw_pdu(0x09, 0x04, 0x18, 0xF0, 0x00, 0x00)); define_test_server("/TP/GAR/SR/BV-03-C/large-1", test_server, ts_large_db_1, NULL, -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html