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/09/30 20:33:14 UTC

[1/3] incubator-mynewt-core git commit: BLE Host - Trust conn-complete-evt role field

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 17b46ca03 -> 158051c19


BLE Host - Trust conn-complete-evt role field

Prior to this change: for failed connection-complete events, the host
fully inferred the role from the status code.  A code of
BLE_ERR_DIR_ADV_TMO implied the slave role; all other roles implied the
master role.

Now: for failed connection-complete events, the host only infers the
role from the status code when the status is BLE_ERR_DIR_ADV_TMO
(role=slave).  For all other status codes, the host reads the role field
directly.


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

Branch: refs/heads/develop
Commit: b51a2985222a1c7b5c5ae1e4257caf067dfc1dfd
Parents: 17b46ca
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Sep 29 11:35:16 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Sep 30 12:41:31 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_gap.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b51a2985/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 57a24da..d8b81eb 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -1137,14 +1137,12 @@ ble_gap_rx_conn_complete(struct hci_le_conn_complete *evt)
 
     if (evt->status != BLE_ERR_SUCCESS) {
         /* Determine the role from the status code. */
-        switch (evt->status) {
-        case BLE_ERR_DIR_ADV_TMO:
-            if (ble_gap_adv_active()) {
-                ble_gap_adv_finished();
-            }
-            break;
+        if (evt->status == BLE_ERR_DIR_ADV_TMO) {
+            evt->role = BLE_HCI_LE_CONN_COMPLETE_ROLE_SLAVE;
+        }
 
-        default:
+        switch (evt->role) {
+        case BLE_HCI_LE_CONN_COMPLETE_ROLE_MASTER:
             if (ble_gap_master_in_progress()) {
                 if (evt->status == BLE_ERR_UNK_CONN_ID) {
                     /* Connect procedure successfully cancelled. */
@@ -1154,6 +1152,17 @@ ble_gap_rx_conn_complete(struct hci_le_conn_complete *evt)
                 }
             }
             break;
+
+        case BLE_HCI_LE_CONN_COMPLETE_ROLE_SLAVE:
+            if (ble_gap_adv_active()) {
+                ble_gap_adv_finished();
+            }
+            break;
+
+        default:
+            BLE_HS_LOG(INFO, "controller reported invalid role in connection "
+                             " complete event: %d", evt->role);
+            break;
         }
 
         return 0;


[2/3] incubator-mynewt-core git commit: fs/fs - pkg.yml fix

Posted by cc...@apache.org.
fs/fs - pkg.yml fix


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

Branch: refs/heads/develop
Commit: 0d2962b433d6c33e4f89ff394b5b85136308279f
Parents: b51a298
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Sep 30 12:45:44 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Sep 30 13:33:01 2016 -0700

----------------------------------------------------------------------
 fs/fs/pkg.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0d2962b4/fs/fs/pkg.yml
----------------------------------------------------------------------
diff --git a/fs/fs/pkg.yml b/fs/fs/pkg.yml
index f965d43..069160f 100644
--- a/fs/fs/pkg.yml
+++ b/fs/fs/pkg.yml
@@ -27,7 +27,7 @@ pkg.keywords:
     - ffs
 
 pkg.deps.FS_CLI:
-    - libs/shell
+    - sys/shell
 
 pkg.syscfg_defs:
     FS_CLI:


[3/3] incubator-mynewt-core git commit: nrf52dk - Enable reboot log.

Posted by cc...@apache.org.
nrf52dk - Enable reboot log.


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

Branch: refs/heads/develop
Commit: 158051c199371a80efc0a4fabfb28d2b6af4f9b6
Parents: 0d2962b
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Sep 30 13:32:25 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Sep 30 13:33:06 2016 -0700

----------------------------------------------------------------------
 hw/bsp/nrf52dk/boot-nrf52dk.ld | 2 +-
 hw/bsp/nrf52dk/src/os_bsp.c    | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/158051c1/hw/bsp/nrf52dk/boot-nrf52dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/boot-nrf52dk.ld b/hw/bsp/nrf52dk/boot-nrf52dk.ld
index 8c47d2e..5bb2099 100755
--- a/hw/bsp/nrf52dk/boot-nrf52dk.ld
+++ b/hw/bsp/nrf52dk/boot-nrf52dk.ld
@@ -19,7 +19,7 @@ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
 
 MEMORY
 {
-  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
+  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
   RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/158051c1/hw/bsp/nrf52dk/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/src/os_bsp.c b/hw/bsp/nrf52dk/src/os_bsp.c
index 4f90473..30df5bd 100644
--- a/hw/bsp/nrf52dk/src/os_bsp.c
+++ b/hw/bsp/nrf52dk/src/os_bsp.c
@@ -52,7 +52,7 @@ static struct flash_area bsp_flash_areas[] = {
     [FLASH_AREA_BOOTLOADER] = {
         .fa_flash_id = 0,       /* internal flash */
         .fa_off = 0x00000000,   /* beginning */
-        .fa_size = (32 * 1024)
+        .fa_size = (16 * 1024)
     },
     /* 2*16K and 1*64K sectors here */
     [FLASH_AREA_IMAGE_0] = {
@@ -74,6 +74,11 @@ static struct flash_area bsp_flash_areas[] = {
         .fa_flash_id = 0,
         .fa_off = 0x0007d000,
         .fa_size = (12 * 1024)
+    },
+    [FLASH_AREA_REBOOT_LOG] = {
+        .fa_flash_id = 0,
+        .fa_off = 0x00004000,
+        .fa_size = (16 * 1024)
     }
 };