You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/06/15 02:28:09 UTC
[47/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Include
our_id_addr/type in conn desc.
BLE Host - Include our_id_addr/type in conn desc.
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/ad94ca6a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ad94ca6a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ad94ca6a
Branch: refs/heads/develop
Commit: ad94ca6a9f14ea452056898567f3d1c296bb0b0c
Parents: ed9fea6
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Jun 14 18:32:55 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Jun 14 19:24:38 2016 -0700
----------------------------------------------------------------------
apps/bletiny/src/misc.c | 3 +++
net/nimble/host/include/host/ble_gap.h | 2 ++
net/nimble/host/src/ble_gap.c | 2 ++
net/nimble/host/src/ble_hs_misc.c | 2 +-
net/nimble/host/src/ble_hs_priv.h | 2 +-
net/nimble/host/src/ble_sm.c | 2 +-
6 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/apps/bletiny/src/misc.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/misc.c b/apps/bletiny/src/misc.c
index b0c3ddb..e9f8eee 100644
--- a/apps/bletiny/src/misc.c
+++ b/apps/bletiny/src/misc.c
@@ -99,6 +99,9 @@ print_conn_desc(struct ble_gap_conn_desc *desc)
console_printf("handle=%d our_ota_addr_type=%d our_ota_addr=",
desc->conn_handle, desc->our_ota_addr_type);
print_addr(desc->our_ota_addr);
+ console_printf(" our_id_addr_type=%d our_id_addr=",
+ desc->our_id_addr_type);
+ print_addr(desc->our_id_addr);
console_printf(" peer_ota_addr_type=%d peer_ota_addr=",
desc->peer_ota_addr_type);
print_addr(desc->peer_ota_addr);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/net/nimble/host/include/host/ble_gap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gap.h b/net/nimble/host/include/host/ble_gap.h
index ba442d1..b7d2878 100644
--- a/net/nimble/host/include/host/ble_gap.h
+++ b/net/nimble/host/include/host/ble_gap.h
@@ -120,6 +120,7 @@ struct ble_gap_conn_desc {
struct ble_gap_sec_state sec_state;
uint8_t peer_ota_addr[6];
uint8_t peer_id_addr[6];
+ uint8_t our_id_addr[6];
uint8_t our_ota_addr[6];
uint16_t conn_handle;
uint16_t conn_itvl;
@@ -127,6 +128,7 @@ struct ble_gap_conn_desc {
uint16_t supervision_timeout;
uint8_t peer_ota_addr_type;
uint8_t peer_id_addr_type;
+ uint8_t our_id_addr_type;
uint8_t our_ota_addr_type;
};
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index 3e9a0de..25b043d 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -279,6 +279,8 @@ ble_gap_fill_conn_desc(struct ble_hs_conn *conn,
desc->our_ota_addr_type = addrs.our_ota_addr_type;
memcpy(desc->our_ota_addr, addrs.our_ota_addr, 6);
+ desc->our_id_addr_type = addrs.our_id_addr_type;
+ memcpy(desc->our_id_addr, addrs.our_id_addr, 6);
desc->peer_ota_addr_type = addrs.peer_ota_addr_type;
memcpy(desc->peer_ota_addr, addrs.peer_ota_addr, 6);
desc->peer_id_addr_type = addrs.peer_id_addr_type;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/net/nimble/host/src/ble_hs_misc.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_misc.c b/net/nimble/host/src/ble_hs_misc.c
index 29438ea..9575ae3 100644
--- a/net/nimble/host/src/ble_hs_misc.c
+++ b/net/nimble/host/src/ble_hs_misc.c
@@ -163,7 +163,7 @@ ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
}
uint8_t
-ble_hs_misc_addr_type_to_ident(uint8_t addr_type)
+ble_hs_misc_addr_type_to_id(uint8_t addr_type)
{
switch (addr_type) {
case BLE_ADDR_TYPE_PUBLIC:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/net/nimble/host/src/ble_hs_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_priv.h b/net/nimble/host/src/ble_hs_priv.h
index 11a34b6..d8e99f2 100644
--- a/net/nimble/host/src/ble_hs_priv.h
+++ b/net/nimble/host/src/ble_hs_priv.h
@@ -85,7 +85,7 @@ int ble_hs_misc_conn_chan_find(uint16_t conn_handle, uint16_t cid,
int ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
struct ble_hs_conn **out_conn,
struct ble_l2cap_chan **out_chan);
-uint8_t ble_hs_misc_addr_type_to_ident(uint8_t addr_type);
+uint8_t ble_hs_misc_addr_type_to_id(uint8_t addr_type);
void ble_hs_cfg_init(struct ble_hs_cfg *cfg);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad94ca6a/net/nimble/host/src/ble_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm.c b/net/nimble/host/src/ble_sm.c
index ceed1cd..601611e 100644
--- a/net/nimble/host/src/ble_sm.c
+++ b/net/nimble/host/src/ble_sm.c
@@ -562,7 +562,7 @@ ble_sm_persist_keys(struct ble_sm_proc *proc)
peer_addr_type = proc->peer_keys.addr_type;
memcpy(peer_addr, proc->peer_keys.addr, sizeof peer_addr);
} else {
- peer_addr_type = ble_hs_misc_addr_type_to_ident(conn->bhc_addr_type);
+ peer_addr_type = ble_hs_misc_addr_type_to_id(conn->bhc_addr_type);
memcpy(peer_addr, conn->bhc_addr, sizeof peer_addr);
}