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/08/13 01:18:35 UTC

[2/7] incubator-mynewt-core git commit: BLE apps - Handle GAP MTU event.

BLE apps - Handle GAP MTU event.


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/63911e83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/63911e83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/63911e83

Branch: refs/heads/develop
Commit: 63911e836ea1b3251e72f49e578d2921fc3baa84
Parents: 032d0a7
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Aug 12 18:15:01 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Aug 12 18:16:35 2016 -0700

----------------------------------------------------------------------
 apps/blecent/src/main.c | 7 +++++++
 apps/bleprph/src/main.c | 7 +++++++
 apps/bletiny/src/main.c | 7 +++++++
 apps/bleuart/src/main.c | 1 -
 4 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/63911e83/apps/blecent/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blecent/src/main.c b/apps/blecent/src/main.c
index 384338a..7056cc6 100755
--- a/apps/blecent/src/main.c
+++ b/apps/blecent/src/main.c
@@ -446,6 +446,13 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
         /* Attribute data is contained in event->notify_rx.attr_data. */
         return 0;
 
+    case BLE_GAP_EVENT_MTU:
+        BLECENT_LOG(INFO, "mtu update event; conn_handle=%d cid=%d mtu=%d\n",
+                    event->mtu.conn_handle,
+                    event->mtu.channel_id,
+                    event->mtu.value);
+        return 0;
+
     default:
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/63911e83/apps/bleprph/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleprph/src/main.c b/apps/bleprph/src/main.c
index b08b077..0233bc1 100755
--- a/apps/bleprph/src/main.c
+++ b/apps/bleprph/src/main.c
@@ -265,6 +265,13 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
                     event->subscribe.prev_indicate,
                     event->subscribe.cur_indicate);
         return 0;
+
+    case BLE_GAP_EVENT_MTU:
+        BLEPRPH_LOG(INFO, "mtu update event; conn_handle=%d cid=%d mtu=%d\n",
+                    event->mtu.conn_handle,
+                    event->mtu.channel_id,
+                    event->mtu.value);
+        return 0;
     }
 
     return 0;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/63911e83/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index 469944c..d06fa0a 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1031,6 +1031,13 @@ bletiny_gap_event(struct ble_gap_event *event, void *arg)
                        event->subscribe.cur_indicate);
         return 0;
 
+    case BLE_GAP_EVENT_MTU:
+        console_printf("mtu update event; conn_handle=%d cid=%d mtu=%d\n",
+                       event->mtu.conn_handle,
+                       event->mtu.channel_id,
+                       event->mtu.value);
+        return 0;
+
     default:
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/63911e83/apps/bleuart/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleuart/src/main.c b/apps/bleuart/src/main.c
index 264be92..8ff7d82 100755
--- a/apps/bleuart/src/main.c
+++ b/apps/bleuart/src/main.c
@@ -193,7 +193,6 @@ bleuart_gap_event(struct ble_gap_event *event, void *arg)
         /* Connection terminated; resume advertising. */
         bleuart_advertise();
         return 0;
-
     }
 
     return 0;