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/01/27 06:12:41 UTC

[03/10] incubator-mynewt-larva git commit: Write to console on rx of L2CAP sig message.

Write to console on rx of L2CAP sig message.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/1e4b21ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/1e4b21ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/1e4b21ed

Branch: refs/heads/master
Commit: 1e4b21ed70241ee160a9fe2109d3fa4ef6ae05c9
Parents: 9bea54f
Author: Christopher Collins <cc...@gmail.com>
Authored: Tue Jan 26 13:04:28 2016 -0500
Committer: Christopher Collins <cc...@gmail.com>
Committed: Wed Jan 27 00:12:01 2016 -0500

----------------------------------------------------------------------
 net/nimble/host/src/ble_l2cap_sig.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/1e4b21ed/net/nimble/host/src/ble_l2cap_sig.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sig.c b/net/nimble/host/src/ble_l2cap_sig.c
index 9bf8bcc..2044cec 100644
--- a/net/nimble/host/src/ble_l2cap_sig.c
+++ b/net/nimble/host/src/ble_l2cap_sig.c
@@ -17,6 +17,7 @@
 #include <string.h>
 #include <errno.h>
 #include <assert.h>
+#include "console/console.h"
 #include "nimble/ble.h"
 #include "ble_l2cap.h"
 #include "ble_l2cap_sig.h"
@@ -25,6 +26,15 @@ static int
 ble_l2cap_sig_rx(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan,
                  struct os_mbuf **om)
 {
+    uint8_t u8;
+    int i;
+
+    console_printf("L2CAP - rxed signalling msg: ");
+    for (i = 0; i < OS_MBUF_PKTLEN(*om); i++) {
+        os_mbuf_copydata(*om, i, 1, &u8);
+        console_printf("0x%02x ", u8);
+    }
+    console_printf("\n");
     return BLE_ERR_UNSUPPORTED;
 }