This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch new-master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 724dea122cadaa87c0d4345ff859d8026b9187e7 Author: Andrzej Kaczmarek <andrzej.kaczma...@codecoup.pl> AuthorDate: Fri Feb 23 20:23:04 2018 +0100 nimble/gap: Remove deprecated characteristics "Peripheal Privacy Flag" and "Reconnection Address" are not included in GAP spec since 4.1, so let's remove them. And they were not properly configured anyway... X-Original-Commit: 3e2a7295ab2a6be2e46319677ba0d19f4d36224b --- .../gap/include/services/gap/ble_svc_gap.h | 2 -- nimble/host/services/gap/src/ble_svc_gap.c | 27 ---------------------- 2 files changed, 29 deletions(-) diff --git a/nimble/host/services/gap/include/services/gap/ble_svc_gap.h b/nimble/host/services/gap/include/services/gap/ble_svc_gap.h index f64c4f6..b8dd196 100644 --- a/nimble/host/services/gap/include/services/gap/ble_svc_gap.h +++ b/nimble/host/services/gap/include/services/gap/ble_svc_gap.h @@ -27,8 +27,6 @@ extern "C" { #define BLE_SVC_GAP_UUID16 0x1800 #define BLE_SVC_GAP_CHR_UUID16_DEVICE_NAME 0x2a00 #define BLE_SVC_GAP_CHR_UUID16_APPEARANCE 0x2a01 -#define BLE_SVC_GAP_CHR_UUID16_PERIPH_PRIV_FLAG 0x2a02 -#define BLE_SVC_GAP_CHR_UUID16_RECONNECT_ADDR 0x2a03 #define BLE_SVC_GAP_CHR_UUID16_PERIPH_PREF_CONN_PARAMS 0x2a04 #define BLE_SVC_GAP_APPEARANCE_GEN_UNKNOWN 0 diff --git a/nimble/host/services/gap/src/ble_svc_gap.c b/nimble/host/services/gap/src/ble_svc_gap.c index 0ca195e..995534e 100644 --- a/nimble/host/services/gap/src/ble_svc_gap.c +++ b/nimble/host/services/gap/src/ble_svc_gap.c @@ -33,8 +33,6 @@ static const uint8_t ble_svc_gap_appearance[2] = { (MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE)) & 0xFF, ((MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE)) >> 8) & 0xFF }; -static uint8_t ble_svc_gap_privacy_flag; -static uint8_t ble_svc_gap_reconnect_addr[6]; static uint8_t ble_svc_gap_pref_conn_params[8]; static int @@ -57,16 +55,6 @@ static const struct ble_gatt_svc_def ble_svc_gap_defs[] = { .access_cb = ble_svc_gap_access, .flags = BLE_GATT_CHR_F_READ, }, { - /*** Characteristic: Peripheral Privacy Flag. */ - .uuid = BLE_UUID16_DECLARE(BLE_SVC_GAP_CHR_UUID16_PERIPH_PRIV_FLAG), - .access_cb = ble_svc_gap_access, - .flags = BLE_GATT_CHR_F_READ, - }, { - /*** Characteristic: Reconnection Address. */ - .uuid = BLE_UUID16_DECLARE(BLE_SVC_GAP_CHR_UUID16_RECONNECT_ADDR), - .access_cb = ble_svc_gap_access, - .flags = BLE_GATT_CHR_F_WRITE, - }, { /*** Characteristic: Peripheral Preferred Connection Parameters. */ .uuid = BLE_UUID16_DECLARE(BLE_SVC_GAP_CHR_UUID16_PERIPH_PREF_CONN_PARAMS), @@ -105,21 +93,6 @@ ble_svc_gap_access(uint16_t conn_handle, uint16_t attr_handle, sizeof ble_svc_gap_appearance); return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; - case BLE_SVC_GAP_CHR_UUID16_PERIPH_PRIV_FLAG: - assert(ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR); - rc = os_mbuf_append(ctxt->om, &ble_svc_gap_privacy_flag, - sizeof ble_svc_gap_privacy_flag); - return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; - - case BLE_SVC_GAP_CHR_UUID16_RECONNECT_ADDR: - assert(ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR); - if (OS_MBUF_PKTLEN(ctxt->om) != sizeof ble_svc_gap_reconnect_addr) { - return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN; - } - ble_hs_mbuf_to_flat(ctxt->om, ble_svc_gap_reconnect_addr, - sizeof ble_svc_gap_reconnect_addr, NULL); - return 0; - case BLE_SVC_GAP_CHR_UUID16_PERIPH_PREF_CONN_PARAMS: assert(ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR); rc = os_mbuf_append(ctxt->om, &ble_svc_gap_pref_conn_params, -- To stop receiving notification emails like this one, please contact a...@apache.org.