You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/01/24 10:49:45 UTC

[GitHub] [mynewt-nimble] rymanluk opened a new pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

rymanluk opened a new pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371223736
 
 

 ##########
 File path: nimble/controller/src/ble_ll.c
 ##########
 @@ -1277,6 +1280,46 @@ ble_ll_read_supp_features(void)
     return g_ble_ll_data.ll_supp_features;
 }
 
+/**
+ * Sets the features controlled by the host.
+ *
+ * @return HCI command status
+ */
+int
+ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len)
+{
+#if MYNEWT_VAL(BLE_VERSION) >= 52
 
 Review comment:
   this is not needed since caller is already doing #ifdef foo

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371290101
 
 

 ##########
 File path: nimble/controller/src/ble_ll.c
 ##########
 @@ -1277,6 +1280,46 @@ ble_ll_read_supp_features(void)
     return g_ble_ll_data.ll_supp_features;
 }
 
+/**
+ * Sets the features controlled by the host.
+ *
+ * @return HCI command status
+ */
+int
+ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len)
+{
+#if MYNEWT_VAL(BLE_VERSION) >= 52
 
 Review comment:
   ah you are right

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk merged pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk merged pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371641933
 
 

 ##########
 File path: nimble/include/nimble/hci_common.h
 ##########
 @@ -825,6 +825,13 @@ struct ble_hci_le_set_default_periodic_sync_transfer_params_cp {
 #define BLE_HCI_OCF_LE_GENERATE_DHKEY_V2                 (0x005E)
 #define BLE_HCI_OCF_LE_MODIFY_SCA                        (0x005F)
 
+#define BLE_HCI_OCF_LE_SET_HOST_FEAT                     (0x0074)
+struct ble_hci_le_set_host_feat_cp
+{
 
 Review comment:
   this is not following coding style

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371232483
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
 
 Review comment:
   duplicated def

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371273967
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_CIS_MASTER            (0x0010000000)
+#define BLE_LL_CIS_SLAVE             (0x0020000000)
+#define BLE_LL_ISO_BROADCASTER       (0x0040000000)
+#define BLE_LL_SYNCH_RECEIVER        (0x0080000000)
+#define BLE_LL_ISO_HOST_SUPPORT      (0x0100000000)
 
 /* This is initial mask, so if feature exchange will not happen,
  * but host will want to use this procedure, we will try. If not
  * succeed, feature bit will be cleared.
  * Look at LL Features above to find out what is allowed
  */
 #define BLE_LL_CONN_INITIAL_FEATURES    (0x00000022)
-
 #define BLE_LL_CONN_CLEAR_FEATURE(connsm, feature)   (connsm->conn_features &= ~(feature))
 
+/* All the features which can be controlled by the Host */
+#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_ISO_HOST_SUPPORT)
 
 Review comment:
   This is as per spec. Where we say that our controller supports it or not is in different place: 
   ``/** Our supported features which can be controller by the host */
   uint64_t g_ble_ll_supported_host_features = 0;``

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371288697
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
 
 Review comment:
   thx

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371224829
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_CIS_MASTER            (0x0010000000)
+#define BLE_LL_CIS_SLAVE             (0x0020000000)
+#define BLE_LL_ISO_BROADCASTER       (0x0040000000)
+#define BLE_LL_SYNCH_RECEIVER        (0x0080000000)
+#define BLE_LL_ISO_HOST_SUPPORT      (0x0100000000)
 
 /* This is initial mask, so if feature exchange will not happen,
  * but host will want to use this procedure, we will try. If not
  * succeed, feature bit will be cleared.
  * Look at LL Features above to find out what is allowed
  */
 #define BLE_LL_CONN_INITIAL_FEATURES    (0x00000022)
-
 #define BLE_LL_CONN_CLEAR_FEATURE(connsm, feature)   (connsm->conn_features &= ~(feature))
 
+/* All the features which can be controlled by the Host */
+#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_ISO_HOST_SUPPORT)
 
 Review comment:
   I think this should be 0 until some initial ISO implementation lands in

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371273967
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_CIS_MASTER            (0x0010000000)
+#define BLE_LL_CIS_SLAVE             (0x0020000000)
+#define BLE_LL_ISO_BROADCASTER       (0x0040000000)
+#define BLE_LL_SYNCH_RECEIVER        (0x0080000000)
+#define BLE_LL_ISO_HOST_SUPPORT      (0x0100000000)
 
 /* This is initial mask, so if feature exchange will not happen,
  * but host will want to use this procedure, we will try. If not
  * succeed, feature bit will be cleared.
  * Look at LL Features above to find out what is allowed
  */
 #define BLE_LL_CONN_INITIAL_FEATURES    (0x00000022)
-
 #define BLE_LL_CONN_CLEAR_FEATURE(connsm, feature)   (connsm->conn_features &= ~(feature))
 
+/* All the features which can be controlled by the Host */
+#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_ISO_HOST_SUPPORT)
 
 Review comment:
   This is as per spec. Where we say that our controller supports it or not is in different place: 
   ``
   /** Our supported features which can be controller by the host */
   
   uint64_t g_ble_ll_supported_host_features = 0;``

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371273967
 
 

 ##########
 File path: nimble/controller/include/controller/ble_ll.h
 ##########
 @@ -199,44 +199,52 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
 #define BLE_LL_STATE_SYNC           (6)
 
 /* LL Features */
-#define BLE_LL_FEAT_LE_ENCRYPTION    (0x00000001)
-#define BLE_LL_FEAT_CONN_PARM_REQ    (0x00000002)
-#define BLE_LL_FEAT_EXTENDED_REJ     (0x00000004)
-#define BLE_LL_FEAT_SLAVE_INIT       (0x00000008)
-#define BLE_LL_FEAT_LE_PING          (0x00000010)
-#define BLE_LL_FEAT_DATA_LEN_EXT     (0x00000020)
-#define BLE_LL_FEAT_LL_PRIVACY       (0x00000040)
-#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x00000080)
-#define BLE_LL_FEAT_LE_2M_PHY        (0x00000100)
-#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x00000200)
-#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x00000400)
-#define BLE_LL_FEAT_LE_CODED_PHY     (0x00000800)
-#define BLE_LL_FEAT_EXT_ADV          (0x00001000)
-#define BLE_LL_FEAT_PERIODIC_ADV     (0x00002000)
-#define BLE_LL_FEAT_CSA2             (0x00004000)
-#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x00008000)
-#define BLE_LL_FEAT_MIN_USED_CHAN    (0x00010000)
-#define BLE_LL_FEAT_CTE_REQ          (0x00020000)
-#define BLE_LL_FEAT_CTE_RSP          (0x00040000)
-#define BLE_LL_FEAT_CTE_TX           (0x00080000)
-#define BLE_LL_FEAT_CTE_RX           (0x00100000)
-#define BLE_LL_FEAT_CTE_AOD          (0x00200000)
-#define BLE_LL_FEAT_CTE_AOA          (0x00400000)
-#define BLE_LL_FEAT_CTE_RECV         (0x00800000)
-#define BLE_LL_FEAT_SYNC_SEND        (0x01000000)
-#define BLE_LL_FEAT_SYNC_RECV        (0x02000000)
-#define BLE_LL_FEAT_SCA_UPDATE       (0x04000000)
-#define BLE_LL_FEAT_REM_PKEY         (0x08000000)
+#define BLE_LL_FEAT_LE_ENCRYPTION    (0x0000000001)
+#define BLE_LL_FEAT_CONN_PARM_REQ    (0x0000000002)
+#define BLE_LL_FEAT_EXTENDED_REJ     (0x0000000004)
+#define BLE_LL_FEAT_SLAVE_INIT       (0x0000000008)
+#define BLE_LL_FEAT_LE_PING          (0x0000000010)
+#define BLE_LL_FEAT_DATA_LEN_EXT     (0x0000000020)
+#define BLE_LL_FEAT_LL_PRIVACY       (0x0000000040)
+#define BLE_LL_FEAT_EXT_SCAN_FILT    (0x0000000080)
+#define BLE_LL_FEAT_LE_2M_PHY        (0x0000000100)
+#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
+#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
+#define BLE_LL_FEAT_LE_CODED_PHY     (0x0000000800)
+#define BLE_LL_FEAT_EXT_ADV          (0x0000001000)
+#define BLE_LL_FEAT_PERIODIC_ADV     (0x0000002000)
+#define BLE_LL_FEAT_CSA2             (0x0000004000)
+#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
+#define BLE_LL_FEAT_MIN_USED_CHAN    (0x0000010000)
+#define BLE_LL_FEAT_CTE_REQ          (0x0000020000)
+#define BLE_LL_FEAT_CTE_RSP          (0x0000040000)
+#define BLE_LL_FEAT_CTE_TX           (0x0000080000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_FEAT_CTE_AOD          (0x0000200000)
+#define BLE_LL_FEAT_CTE_AOA          (0x0000400000)
+#define BLE_LL_FEAT_CTE_RECV         (0x0000800000)
+#define BLE_LL_FEAT_SYNC_SEND        (0x0001000000)
+#define BLE_LL_FEAT_SYNC_RECV        (0x0002000000)
+#define BLE_LL_FEAT_SCA_UPDATE       (0x0004000000)
+#define BLE_LL_FEAT_REM_PKEY         (0x0008000000)
+#define BLE_LL_FEAT_CTE_RX           (0x0000100000)
+#define BLE_LL_CIS_MASTER            (0x0010000000)
+#define BLE_LL_CIS_SLAVE             (0x0020000000)
+#define BLE_LL_ISO_BROADCASTER       (0x0040000000)
+#define BLE_LL_SYNCH_RECEIVER        (0x0080000000)
+#define BLE_LL_ISO_HOST_SUPPORT      (0x0100000000)
 
 /* This is initial mask, so if feature exchange will not happen,
  * but host will want to use this procedure, we will try. If not
  * succeed, feature bit will be cleared.
  * Look at LL Features above to find out what is allowed
  */
 #define BLE_LL_CONN_INITIAL_FEATURES    (0x00000022)
-
 #define BLE_LL_CONN_CLEAR_FEATURE(connsm, feature)   (connsm->conn_features &= ~(feature))
 
+/* All the features which can be controlled by the Host */
+#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_ISO_HOST_SUPPORT)
 
 Review comment:
   This is as per spec. Where we say that our controller supports it or not is in different place: 
   ``
   uint64_t g_ble_ll_supported_host_features = 0;
   ``

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371224178
 
 

 ##########
 File path: nimble/controller/src/ble_ll.c
 ##########
 @@ -1277,6 +1280,46 @@ ble_ll_read_supp_features(void)
     return g_ble_ll_data.ll_supp_features;
 }
 
+/**
+ * Sets the features controlled by the host.
+ *
+ * @return HCI command status
+ */
+int
+ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len)
+{
+#if MYNEWT_VAL(BLE_VERSION) >= 52
+    const struct ble_hci_le_set_host_feat_cp *cmd = (const void *) cmdbuf;
 
 Review comment:
   you also need to check if len == sizeof(*cmd) here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #740: nimble/ll: Add possible to set BT v5.2 flag plus some minor changes.
URL: https://github.com/apache/mynewt-nimble/pull/740#discussion_r371290662
 
 

 ##########
 File path: nimble/controller/src/ble_ll.c
 ##########
 @@ -1277,6 +1280,46 @@ ble_ll_read_supp_features(void)
     return g_ble_ll_data.ll_supp_features;
 }
 
+/**
+ * Sets the features controlled by the host.
+ *
+ * @return HCI command status
+ */
+int
+ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len)
+{
+#if MYNEWT_VAL(BLE_VERSION) >= 52
+    const struct ble_hci_le_set_host_feat_cp *cmd = (const void *) cmdbuf;
 
 Review comment:
   thx

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services