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/05 20:27:00 UTC

[1/2] incubator-mynewt-larva git commit: Log all outgoing HCI commands.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master fe6e81e15 -> 2fdc71732


Log all outgoing HCI commands.


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

Branch: refs/heads/master
Commit: 2fdc717328cfc5259250bb145739b1befe52cd6e
Parents: 5e3d07d
Author: Christopher Collins <cc...@gmail.com>
Authored: Tue Jan 5 11:26:02 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Tue Jan 5 11:26:47 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/2fdc7173/net/nimble/host/src/host_hci_cmd.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/host_hci_cmd.c b/net/nimble/host/src/host_hci_cmd.c
index e5d5e10..19332f0 100644
--- a/net/nimble/host/src/host_hci_cmd.c
+++ b/net/nimble/host/src/host_hci_cmd.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include "os/os.h"
+#include "console/console.h"
 #include "nimble/hci_common.h"
 #include "nimble/hci_transport.h"
 #include "ble_hs_priv.h"
@@ -62,6 +63,8 @@ host_hci_cmd_send(uint8_t ogf, uint8_t ocf, uint8_t len, void *cmddata)
             memcpy(cmd + BLE_HCI_CMD_HDR_LEN, cmddata, len);
         }
         rc = host_hci_cmd_transport(cmd);
+        console_printf("host_hci_cmd_send: ogf=0x%02x ocf=0x%02x len=%d\n",
+                       ogf, ocf, len);
         if (rc == 0) {
             host_hci_outstanding_opcode = opcode;
         }


[2/2] incubator-mynewt-larva git commit: Fix parsing bug for disconnection complete event.

Posted by cc...@apache.org.
Fix parsing bug for disconnection complete event.


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

Branch: refs/heads/master
Commit: 5e3d07d78e1bcacb45ae4f446f1acfda52f2a124
Parents: fe6e81e
Author: Christopher Collins <cc...@gmail.com>
Authored: Tue Jan 5 11:25:36 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Tue Jan 5 11:26:47 2016 -0800

----------------------------------------------------------------------
 net/nimble/host/src/host_hci.c         | 6 +++---
 net/nimble/include/nimble/hci_common.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/5e3d07d7/net/nimble/host/src/host_hci.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/host_hci.c b/net/nimble/host/src/host_hci.c
index e31cedb..42110df 100644
--- a/net/nimble/host/src/host_hci.c
+++ b/net/nimble/host/src/host_hci.c
@@ -174,9 +174,9 @@ host_hci_rx_disconn_complete(uint8_t event_code, uint8_t *data, int len)
         return BLE_HS_EMSGSIZE;
     }
 
-    evt.status = data[0];
-    evt.connection_handle = le16toh(data + 1);
-    evt.reason = data[3];
+    evt.status = data[2];
+    evt.connection_handle = le16toh(data + 3);
+    evt.reason = data[5];
 
     ble_gap_conn_rx_disconn_complete(&evt);
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/5e3d07d7/net/nimble/include/nimble/hci_common.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/hci_common.h b/net/nimble/include/nimble/hci_common.h
index 3a88caa..94037ab 100644
--- a/net/nimble/include/nimble/hci_common.h
+++ b/net/nimble/include/nimble/hci_common.h
@@ -354,7 +354,7 @@
 
 /* Event specific definitions */
 /* Event disconnect complete */
-#define BLE_HCI_EVENT_DISCONN_COMPLETE_LEN  (4)
+#define BLE_HCI_EVENT_DISCONN_COMPLETE_LEN  (6)
 
 /* Event command complete */
 #define BLE_HCI_EVENT_CMD_COMPLETE_HDR_LEN  (5)