You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/06/06 10:39:44 UTC

[1/2] incubator-mynewt-core git commit: Fix issue when receiving an invalid pdu type

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 3e6710122 -> be4996dcf


Fix issue when receiving an invalid pdu type

When doing testing at unplugfest we noticed devices sending an invalid
pdu type. This was causing our code to restart reception without first
disabling the PHY. This was showing up as a radio state error. We now
disable the PHY first.


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

Branch: refs/heads/develop
Commit: be4996dcf1ce8c7c6c8901b04cb6462da84b6d8f
Parents: 3444182
Author: William San Filippo <wi...@runtime.io>
Authored: Mon Jun 6 03:37:41 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon Jun 6 03:39:05 2016 -0700

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll.c      | 1 -
 net/nimble/controller/src/ble_ll_conn.c | 1 +
 net/nimble/controller/src/ble_ll_scan.c | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/be4996dc/net/nimble/controller/src/ble_ll.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll.c b/net/nimble/controller/src/ble_ll.c
index 6963307..0459ff0 100644
--- a/net/nimble/controller/src/ble_ll.c
+++ b/net/nimble/controller/src/ble_ll.c
@@ -824,7 +824,6 @@ ble_ll_rx_end(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *ble_hdr)
             STATS_INC(ble_ll_stats, rx_adv_malformed_pkts);
             os_mbuf_free_chain(rxpdu);
             rxpdu = NULL;
-            rc = -1;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/be4996dc/net/nimble/controller/src/ble_ll_conn.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_conn.c b/net/nimble/controller/src/ble_ll_conn.c
index 3890a4f..57fcdc2 100644
--- a/net/nimble/controller/src/ble_ll_conn.c
+++ b/net/nimble/controller/src/ble_ll_conn.c
@@ -2153,6 +2153,7 @@ ble_ll_init_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok)
      * the phy does not get disabled.
      */
     if (!rxpdu) {
+        ble_phy_disable();
         ble_phy_rx();
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/be4996dc/net/nimble/controller/src/ble_ll_scan.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_scan.c b/net/nimble/controller/src/ble_ll_scan.c
index e5c0b22..8e845c6 100644
--- a/net/nimble/controller/src/ble_ll_scan.c
+++ b/net/nimble/controller/src/ble_ll_scan.c
@@ -923,6 +923,7 @@ ble_ll_scan_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok)
         if (scansm->scan_rsp_pending) {
             ble_ll_scan_req_backoff(scansm, 0);
         }
+        ble_phy_disable();
         ble_phy_rx();
         return 0;
     }


[2/2] incubator-mynewt-core git commit: Fix TXADD bit not being set correctly in advertisements for all cases

Posted by we...@apache.org.
Fix TXADD bit not being set correctly in advertisements for all cases


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

Branch: refs/heads/develop
Commit: 344418270465ab93633d03c0034f95fb38ae9654
Parents: 3e67101
Author: William San Filippo <wi...@runtime.io>
Authored: Mon Jun 6 01:39:33 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon Jun 6 03:39:05 2016 -0700

----------------------------------------------------------------------
 apps/bletest/src/main.c                           | 14 +++++++-------
 net/nimble/controller/include/controller/ble_ll.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/34441827/apps/bletest/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c
index 7aa2396..73b3cbf 100755
--- a/apps/bletest/src/main.c
+++ b/apps/bletest/src/main.c
@@ -98,9 +98,9 @@ os_membuf_t g_mbuf_buffer[MBUF_MEMPOOL_SIZE];
 #define BLETEST_ROLE_SCANNER            (1)
 #define BLETEST_ROLE_INITIATOR          (2)
 
-//#define BLETEST_CFG_ROLE                (BLETEST_ROLE_INITIATOR)
+#define BLETEST_CFG_ROLE                (BLETEST_ROLE_INITIATOR)
 //#define BLETEST_CFG_ROLE                (BLETEST_ROLE_ADVERTISER)
-#define BLETEST_CFG_ROLE                (BLETEST_ROLE_SCANNER)
+//#define BLETEST_CFG_ROLE                (BLETEST_ROLE_SCANNER)
 
 /* Advertiser config */
 #define BLETEST_CFG_ADV_OWN_ADDR_TYPE   (BLE_HCI_ADV_OWN_ADDR_PRIV_PUB)
@@ -113,8 +113,8 @@ os_membuf_t g_mbuf_buffer[MBUF_MEMPOOL_SIZE];
 /* Scan config */
 #define BLETEST_CFG_SCAN_ITVL           (700000 / BLE_HCI_SCAN_ITVL)
 #define BLETEST_CFG_SCAN_WINDOW         (700000 / BLE_HCI_SCAN_ITVL)
-#define BLETEST_CFG_SCAN_TYPE           (BLE_HCI_SCAN_TYPE_ACTIVE)
-#define BLETEST_CFG_SCAN_OWN_ADDR_TYPE  (BLE_HCI_ADV_OWN_ADDR_PRIV_PUB)
+#define BLETEST_CFG_SCAN_TYPE           (BLE_HCI_SCAN_TYPE_PASSIVE)
+#define BLETEST_CFG_SCAN_OWN_ADDR_TYPE  (BLE_HCI_ADV_OWN_ADDR_PUBLIC)
 #define BLETEST_CFG_SCAN_FILT_POLICY    (BLE_HCI_SCAN_FILT_USE_WL)
 #define BLETEST_CFG_FILT_DUP_ADV        (1)
 
@@ -125,8 +125,8 @@ os_membuf_t g_mbuf_buffer[MBUF_MEMPOOL_SIZE];
 #define BLETEST_CFG_CONN_SPVN_TMO       (1000)  /* 20 seconds */
 #define BLETEST_CFG_MIN_CE_LEN          (6)
 #define BLETEST_CFG_MAX_CE_LEN          (BLETEST_CFG_CONN_ITVL)
-#define BLETEST_CFG_CONN_PEER_ADDR_TYPE (BLE_HCI_CONN_PEER_ADDR_PUBLIC_IDENT)
-#define BLETEST_CFG_CONN_OWN_ADDR_TYPE  (BLE_HCI_ADV_OWN_ADDR_PRIV_PUB)
+#define BLETEST_CFG_CONN_PEER_ADDR_TYPE (BLE_HCI_CONN_PEER_ADDR_PUBLIC)
+#define BLETEST_CFG_CONN_OWN_ADDR_TYPE  (BLE_HCI_ADV_OWN_ADDR_PUBLIC)
 #define BLETEST_CFG_CONCURRENT_CONNS    (1)
 
 /* Test packet config */
@@ -443,7 +443,7 @@ bletest_init_scanner(void)
 #endif
         if (add_whitelist & 1) {
             rc = bletest_hci_le_add_to_whitelist(g_bletest_cur_peer_addr,
-                                                 BLE_ADDR_TYPE_PUBLIC);
+                                                 BLE_ADDR_TYPE_RANDOM);
             assert(rc == 0);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/34441827/net/nimble/controller/include/controller/ble_ll.h
----------------------------------------------------------------------
diff --git a/net/nimble/controller/include/controller/ble_ll.h b/net/nimble/controller/include/controller/ble_ll.h
index 81cba53..afdff13 100644
--- a/net/nimble/controller/include/controller/ble_ll.h
+++ b/net/nimble/controller/include/controller/ble_ll.h
@@ -361,7 +361,7 @@ int ble_ll_rand_start(void);
  * XXX: temporary LL debug log. Will get removed once we transition to real
  * log
  */
-#undef BLE_LL_LOG
+#define BLE_LL_LOG
 #include "console/console.h"
 
 #define BLE_LL_LOG_ID_PHY_SETCHAN       (1)