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 2021/11/04 12:05:54 UTC

[GitHub] [mynewt-nimble] michal-narajowski commented on a change in pull request #1018: Dialog and bttester

michal-narajowski commented on a change in pull request #1018:
URL: https://github.com/apache/mynewt-nimble/pull/1018#discussion_r742767749



##########
File path: nimble/host/util/src/addr.c
##########
@@ -55,8 +55,13 @@ ble_hs_util_ensure_rand_addr(void)
 
     /* Otherwise, try to load a random address. */
     rc = ble_hs_util_load_rand_addr(&addr);
+
     if (rc != 0) {
-        return rc;
+        /* If it didn't work, generate random address */

Review comment:
       Also, we need to add dialog targets to the CI.

##########
File path: nimble/host/util/src/addr.c
##########
@@ -55,8 +55,13 @@ ble_hs_util_ensure_rand_addr(void)
 
     /* Otherwise, try to load a random address. */
     rc = ble_hs_util_load_rand_addr(&addr);
+
     if (rc != 0) {
-        return rc;
+        /* If it didn't work, generate random address */

Review comment:
       I feel like this should be a separate PR. It is a standalone fix and we can get it in faster that way. 

##########
File path: apps/bttester/src/bttester.h
##########
@@ -320,6 +320,12 @@ struct gap_set_mitm_cmd {
     uint8_t mitm;
 } __packed;
 
+#define GAP_SET_FILTER_ACCEPT_LIST	0x1f
+struct gap_set_filter_accept_list_cmd {
+    uint8_t list_len;
+    uint8_t own_addr_type;

Review comment:
       `own_addr_type` is not related to this command. You don't use it there.

##########
File path: apps/bttester/src/bttester.h
##########
@@ -320,6 +320,12 @@ struct gap_set_mitm_cmd {
     uint8_t mitm;
 } __packed;
 
+#define GAP_SET_FILTER_ACCEPT_LIST	0x1f
+struct gap_set_filter_accept_list_cmd {
+    uint8_t list_len;
+    uint8_t own_addr_type;

Review comment:
       `list_len` is not necessary because BLE Address has a known, fixed length, so we can assume that the length of the command should be a multiple of (address + addr type) length. In case it isn't we should return an error.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org