nimble: added missing descriptors With this patch it is possible to pass TC_GAW_SR_BV_08_C, TC_GAW_SR_BV_09_C, TC_GAW_SR_BV_27_C.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/fae2eb35 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/fae2eb35 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/fae2eb35 Branch: refs/heads/develop Commit: fae2eb35c088aaa0f4ea3b9280932821fb80d3f7 Parents: e0421ec Author: MichaÅ Narajowski <[email protected]> Authored: Fri Dec 30 16:42:27 2016 +0100 Committer: MichaÅ Narajowski <[email protected]> Committed: Fri Dec 30 16:42:27 2016 +0100 ---------------------------------------------------------------------- apps/bletiny/src/gatt_svr.c | 20 ++++++++++++++++---- net/nimble/host/pts/pts-gatt.txt | 8 ++++---- 2 files changed, 20 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fae2eb35/apps/bletiny/src/gatt_svr.c ---------------------------------------------------------------------- diff --git a/apps/bletiny/src/gatt_svr.c b/apps/bletiny/src/gatt_svr.c index 5c69d8b..96f7aa8 100644 --- a/apps/bletiny/src/gatt_svr.c +++ b/apps/bletiny/src/gatt_svr.c @@ -42,8 +42,9 @@ #define PTS_CHR_READ_WRITE_AUTHEN 0x0008 #define PTS_DSC_READ 0x0009 #define PTS_DSC_WRITE 0x000a -#define PTS_DSC_READ_WRITE_ENC 0x000b -#define PTS_DSC_READ_WRITE_AUTHEN 0x000c +#define PTS_DSC_READ_WRITE 0x000b +#define PTS_DSC_READ_WRITE_ENC 0x000c +#define PTS_DSC_READ_WRITE_AUTHEN 0x000d #define PTS_LONG_SVC 0x0011 #define PTS_LONG_CHR_READ 0x0012 @@ -54,8 +55,9 @@ #define PTS_LONG_CHR_READ_WRITE_AUTHEN 0x0017 #define PTS_LONG_DSC_READ 0x0018 #define PTS_LONG_DSC_WRITE 0x0019 -#define PTS_LONG_DSC_READ_WRITE_ENC 0x001a -#define PTS_LONG_DSC_READ_WRITE_AUTHEN 0x001b +#define PTS_LONG_DSC_READ_WRITE 0x001a +#define PTS_LONG_DSC_READ_WRITE_ENC 0x001b +#define PTS_LONG_DSC_READ_WRITE_AUTHEN 0x001c /** * The vendor specific security test service consists of two characteristics: @@ -155,6 +157,10 @@ static const struct ble_gatt_svc_def gatt_svr_svcs[] = { .access_cb = gatt_svr_access_test, .att_flags = BLE_ATT_F_WRITE, }, { + .uuid128 = PTS_UUID(PTS_DSC_READ_WRITE), + .access_cb = gatt_svr_access_test, + .att_flags = BLE_ATT_F_READ | BLE_ATT_F_WRITE, + }, { .uuid128 = PTS_UUID(PTS_DSC_READ_WRITE_ENC), .access_cb = gatt_svr_access_test, .att_flags = BLE_ATT_F_READ | BLE_ATT_F_READ_ENC | @@ -212,6 +218,10 @@ static const struct ble_gatt_svc_def gatt_svr_svcs[] = { .access_cb = gatt_svr_long_access_test, .att_flags = BLE_ATT_F_WRITE, }, { + .uuid128 = PTS_UUID(PTS_LONG_DSC_READ_WRITE), + .access_cb = gatt_svr_long_access_test, + .att_flags = BLE_ATT_F_READ | BLE_ATT_F_WRITE, + }, { .uuid128 = PTS_UUID(PTS_LONG_DSC_READ_WRITE_ENC), .access_cb = gatt_svr_long_access_test, .att_flags = BLE_ATT_F_READ | BLE_ATT_F_READ_ENC | @@ -400,6 +410,7 @@ gatt_svr_access_test(uint16_t conn_handle, uint16_t attr_handle, &gatt_svr_pts_static_val, NULL); return rc; + case PTS_DSC_READ_WRITE: case PTS_DSC_READ_WRITE_ENC: case PTS_DSC_READ_WRITE_AUTHEN: if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_DSC) { @@ -472,6 +483,7 @@ gatt_svr_long_access_test(uint16_t conn_handle, uint16_t attr_handle, &gatt_svr_pts_static_long_val, NULL); return rc; + case PTS_LONG_DSC_READ_WRITE: case PTS_LONG_DSC_READ_WRITE_ENC: case PTS_LONG_DSC_READ_WRITE_AUTHEN: if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_DSC) { http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fae2eb35/net/nimble/host/pts/pts-gatt.txt ---------------------------------------------------------------------- diff --git a/net/nimble/host/pts/pts-gatt.txt b/net/nimble/host/pts/pts-gatt.txt index a9c86d4..ee22812 100644 --- a/net/nimble/host/pts/pts-gatt.txt +++ b/net/nimble/host/pts/pts-gatt.txt @@ -391,7 +391,7 @@ TC_GAW_SR_BI_17_C N/A TC_GAW_SR_BI_18_C PASS b adv TC_GAW_SR_BI_19_C INC TC_GAW_SR_BV_07_C PASS b adv -TC_GAW_CL_BV_08_C INC - ATT Write returned an error. +TC_GAW_SR_BV_08_C PASS b adv TC_GAW_SR_BI_20_C PASS b adv <enter ffff> TC_GAW_SR_BI_21_C PASS b adv @@ -399,19 +399,19 @@ TC_GAW_SR_BI_21_C PASS b adv TC_GAW_SR_BI_22_C N/A TC_GAW_SR_BI_23_C PASS b adv TC_GAW_SR_BI_24_C INC -TC_GAW_SR_BV_09_C INC - cltReadCfm value convert to struct failed. +TC_GAW_SR_BV_09_C PASS b adv TC_GAW_SR_BI_25_C PASS b adv <enter ffff> TC_GAW_SR_BI_26_C PASS b adv <enter dsc value handle without WRITE flag> -TC_GAW_SR_BI_27_C INC - cltReadCfm value convert to struct failed. +TC_GAW_SR_BI_27_C PASS b adv TC_GAW_SR_BI_29_C N/A TC_GAW_SR_BI_30_C PASS TC_GAW_SR_BI_31_C INC TC_GAW_SR_BI_32_C PASS b adv TC_GAW_SR_BI_33_C PASS b adv TC_GAW_SR_BI_34_C PASS b adv -TC_GAW_SR_BI_35_C INC - cltReadCfm value convert to struct failed. +TC_GAW_SR_BI_35_C PASS b adv ------------------------------------------------------------------------------- TC_GAN_CL_BV_01_C PASS b conn peer_addr=<addr>
