[GitHub] [mynewt-core] kasjer edited a comment on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer edited a comment on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070


   It is defined in usbd.h
   Probably newer tinyusb is needed.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on pull request #1071: nimble/ll: Minor scheduler optimizations

2021-11-03 Thread GitBox


andrzej-kaczmarek commented on pull request #1071:
URL: https://github.com/apache/mynewt-nimble/pull/1071#issuecomment-959958366


   fixes build error + rebased


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #1069: nimble/ll: Minor ll_scan cleanup

2021-11-03 Thread GitBox


andrzej-kaczmarek merged pull request #1069:
URL: https://github.com/apache/mynewt-nimble/pull/1069


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959168442


   Yep looks like that was my issue. Thanks! 


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741954748



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   solved
   

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   solved




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033#discussion_r741941908



##
File path: apps/bttester/src/gap.c
##
@@ -248,6 +252,40 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
 };
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static void rotate_nrpa_cb(struct os_event *ev)
+{
+assert(ev != NULL);

Review comment:
   this assert seems to be not needed. Otherwise looks good. Please remove 
it and feel free to merge




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski merged pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


KKopyscinski merged pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk merged pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk merged pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng closed issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng closed issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741954535



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   Did you consider BLE_GAP_EVENT_PAIRING_COMPLETE with a status and reason?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070


   It is defined in usbd.h


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741979202



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   makes sense - I changed that and event is now sent also on success 
(`ble_sm_key_exch_success`)




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1070: complaint -> compliant

2021-11-03 Thread GitBox


sjanc merged pull request #1070:
URL: https://github.com/apache/mynewt-nimble/pull/1070


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741951023



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   indentation issue.

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   indentation issue?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk commented on pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026#issuecomment-959195872


   Thanks. I rebased it and redo a commit massage.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1070: complaint -> compliant

2021-11-03 Thread GitBox


sjanc merged pull request #1070:
URL: https://github.com/apache/mynewt-nimble/pull/1070


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033#discussion_r741941908



##
File path: apps/bttester/src/gap.c
##
@@ -248,6 +252,40 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
 };
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static void rotate_nrpa_cb(struct os_event *ev)
+{
+assert(ev != NULL);

Review comment:
   this assert seems to be not needed. Otherwise looks good. Please remove 
it and feel free to merge




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk commented on pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026#issuecomment-959195872


   Thanks. I rebased it and redo a commit massage.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski merged pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


KKopyscinski merged pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer edited a comment on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer edited a comment on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk merged pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk merged pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng closed issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng closed issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on pull request #1071: nimble/ll: Minor scheduler optimizations

2021-11-03 Thread GitBox


andrzej-kaczmarek commented on pull request #1071:
URL: https://github.com/apache/mynewt-nimble/pull/1071#issuecomment-959958366






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741954535



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   Did you consider BLE_GAP_EVENT_PAIRING_COMPLETE with a status and reason?

##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   Did you consider BLE_GAP_EVENT_PAIRING_COMPLETE with a status and reason?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #1069: nimble/ll: Minor ll_scan cleanup

2021-11-03 Thread GitBox


andrzej-kaczmarek merged pull request #1069:
URL: https://github.com/apache/mynewt-nimble/pull/1069






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741954748



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   solved
   

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   solved

##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   solved
   

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   solved




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959168442






-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741979202



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   makes sense - I changed that and event is now sent also on success 
(`ble_sm_key_exch_success`)

##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   makes sense - I changed that and event is now sent also on success 
(`ble_sm_key_exch_success`)




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741951023



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   indentation issue.

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   indentation issue?

##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   indentation issue.

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   indentation issue?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033#discussion_r741941908



##
File path: apps/bttester/src/gap.c
##
@@ -248,6 +252,40 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
 };
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static void rotate_nrpa_cb(struct os_event *ev)
+{
+assert(ev != NULL);

Review comment:
   this assert seems to be not needed. Otherwise looks good. Please remove 
it and feel free to merge




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk commented on pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026#issuecomment-959195872


   Thanks. I rebased it and redo a commit massage.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1070: complaint -> compliant

2021-11-03 Thread GitBox


sjanc merged pull request #1070:
URL: https://github.com/apache/mynewt-nimble/pull/1070


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek opened a new pull request #1072: [wip] nimble/ll: Add zero-copy rx

2021-11-03 Thread GitBox


andrzej-kaczmarek opened a new pull request #1072:
URL: https://github.com/apache/mynewt-nimble/pull/1072


   This adds support for zero-copy rx. When enabled, phy receives data directly 
into mbuf and thus there's no need to copy received PDU from phy buffer into 
mbuf which significantly reduces processing time.
   
   When zero-copy rx is enabled, phy shall request rxbuf from LL which is a 
pointer to data portion of an mbuf. It's guaranteed that returned buffer has 
enough continuous space to fit complete PDU. If LL cannot allocate new mbuf at 
that time, it will return pointer to temporary flat buffer so rx can still work 
as usual. After rx, LL uses usual routines to alloc and copy rxpdu, but they 
work in a slightly different way as 'alloc' returns mbuf preallocated 
previously and 'copy' copies only mbuf header. This way we can keep changes to 
a minimum, even though this is not the most optimized approach and support has 
to be added to each phy separately.
   
   Currently rxpdus are allocated from msys so it has to have pool with buffers 
large enough to fit complete PDU with required headers. We may add an option 
for dedicated pool in future.
   
   Enabling zero-copy rx can significantly improve scheduling reliability 
especially on CMAC - previously it was quite challenging to schedule aux chain 
scan at offset close to 300us (Tmafs) and we were either just in time for 
preamble or too late, now it can be scheduled with a dozen of microseconds to 
spare.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on pull request #1071: nimble/ll: Minor scheduler optimizations

2021-11-03 Thread GitBox


andrzej-kaczmarek commented on pull request #1071:
URL: https://github.com/apache/mynewt-nimble/pull/1071#issuecomment-959958366


   fixes build error + rebased


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk merged pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk merged pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on pull request #1026: docs: Fix a few typos

2021-11-03 Thread GitBox


rymanluk commented on pull request #1026:
URL: https://github.com/apache/mynewt-nimble/pull/1026#issuecomment-959195872


   Thanks. I rebased it and redo a commit massage.


-- 
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-unsubscr...@mynewt.apache.org

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




[mynewt-nimble] branch master updated: nimble: Fix a few types in many places

2021-11-03 Thread rymek
This is an automated email from the ASF dual-hosted git repository.

rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 9559689  nimble: Fix a few types in many places
9559689 is described below

commit 9559689bc076bb1a46be78f56a7c302609324b22
Author: Tim Gates 
AuthorDate: Thu Sep 23 06:29:19 2021 +1000

nimble: Fix a few types in many places
---
 apps/blecsc/src/main.c  | 2 +-
 docs/btshell/btshell_GAP.rst| 2 +-
 nimble/controller/src/ble_ll_adv.c  | 2 +-
 nimble/controller/src/ble_ll_conn.c | 4 ++--
 nimble/drivers/nrf51/src/ble_phy.c  | 4 ++--
 nimble/drivers/nrf52/src/ble_phy.c  | 2 +-
 nimble/host/mesh/src/pb_adv.c   | 2 +-
 nimble/host/mesh/src/subnet.h   | 2 +-
 nimble/host/src/ble_att_svr.c   | 2 +-
 nimble/host/src/ble_gap.c   | 2 +-
 nimble/host/src/ble_sm_lgcy.c   | 2 +-
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/apps/blecsc/src/main.c b/apps/blecsc/src/main.c
index 60f0b3d..5cca6b7 100644
--- a/apps/blecsc/src/main.c
+++ b/apps/blecsc/src/main.c
@@ -58,7 +58,7 @@ static struct os_callout blecsc_measure_timer;
 /* Variable holds current CSC measurement state */
 static struct ble_csc_measurement_state csc_measurement_state;
 
-/* Variable holds simulted speed (kilometers per hour) */
+/* Variable holds simulated speed (kilometers per hour) */
 static uint16_t csc_sim_speed_kph = CSC_SIM_SPEED_KPH_MIN;
 
 /* Variable holds simulated cadence (RPM) */
diff --git a/docs/btshell/btshell_GAP.rst b/docs/btshell/btshell_GAP.rst
index ce64755..738d146 100644
--- a/docs/btshell/btshell_GAP.rst
+++ b/docs/btshell/btshell_GAP.rst
@@ -411,7 +411,7 @@ Advertising with Extended Advertising enabled
 
+--+--++-+
 |  | scan\_req\_notif | [``0``-1]  
| Enable SCAN\_REQ notifications
  |
 
+--+--++-+
-| **advertise-set-addr**   |  |
| Configure *random* adress for instance
  |
+| **advertise-set-addr**   |  |
| Configure *random* address for instance   
   |
 
+--+--++-+
 |  | instance | [``0``-UINT8\_MAX] 
| Advertising instance  
  |
 
+--+--++-+
diff --git a/nimble/controller/src/ble_ll_adv.c 
b/nimble/controller/src/ble_ll_adv.c
index 19270ac..88c4ae1 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -4479,7 +4479,7 @@ ble_ll_adv_rx_pkt_in(uint8_t ptype, uint8_t *rxbuf, 
struct ble_mbuf_hdr *hdr)
 #endif
 
 /*
- * It is possible that advertising was stopped and a packet plcaed on the
+ * It is possible that advertising was stopped and a packet placed on the
  * LL receive packet queue. In this case, just ignore the received packet
  * as the advertising state machine is no longer "valid"
  */
diff --git a/nimble/controller/src/ble_ll_conn.c 
b/nimble/controller/src/ble_ll_conn.c
index 08bc1fc..55ca20e 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -3163,7 +3163,7 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct 
ble_mbuf_hdr *rxhdr)
 /*
  * Check the packet CRC. A connection event can continue even if the
  * received PDU does not pass the CRC check. If we receive two consecutive
- * CRC errors we end the conection event.
+ * CRC errors we end the connection event.
  */
 if (!BLE_MBUF_HDR_CRC_OK(rxhdr)) {
 /*
@@ -3753,7 +3753,7 @@ ble_ll_conn_module_init(void)
 uint16_t i;
 struct ble_ll_conn_sm *connsm;
 
-/* Initialize list of active conections */
+/* Initialize list of active connections */
 SLIST_INIT(_ble_ll_conn_active_list);
 STAILQ_INIT(_ble_ll_conn_free_list);
 
diff --git a/nimble/drivers/nrf51/src/ble_phy.c 
b/nimble/drivers/nrf51/src/ble_phy.c
index b7e6329..d3bc3c2 100644
--- a/nimble/drivers/nrf51/src/ble_phy.c
+++ b/nimble/drivers/nrf51/src/ble_phy.c
@@ -408,7 +408,7 @@ 

[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741979202



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   makes sense - I changed that and event is now sent also on success 
(`ble_sm_key_exch_success`)




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng closed issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng closed issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] t3zeng commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


t3zeng commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959168442


   Yep looks like that was my issue. Thanks! 


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #1069: nimble/ll: Minor ll_scan cleanup

2021-11-03 Thread GitBox


andrzej-kaczmarek merged pull request #1069:
URL: https://github.com/apache/mynewt-nimble/pull/1069


   


-- 
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-unsubscr...@mynewt.apache.org

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




[mynewt-nimble] branch master updated (8135e51 -> 7875bc2)

2021-11-03 Thread andk
This is an automated email from the ASF dual-hosted git repository.

andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git.


from 8135e51  apps/bttester: implement NRPA rotation
 add 4f70d00  nimble/ll: Fix scan window/interval limits for ext scan
 add 7875bc2  nimble/ll: Cleanup function names

No new revisions were added by this update.

Summary of changes:
 nimble/controller/include/controller/ble_ll_scan.h |  8 
 nimble/controller/src/ble_ll_hci.c |  8 
 nimble/controller/src/ble_ll_scan.c| 18 +-
 nimble/include/nimble/hci_common.h | 10 ++
 4 files changed, 23 insertions(+), 21 deletions(-)


[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


KKopyscinski commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741954748



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   solved
   




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1025: Add pairing failed ev

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1025:
URL: https://github.com/apache/mynewt-nimble/pull/1025#discussion_r741954535



##
File path: nimble/host/include/host/ble_gap.h
##
@@ -135,6 +135,7 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_PERIODIC_SYNC_LOST22
 #define BLE_GAP_EVENT_SCAN_REQ_RCVD 23
 #define BLE_GAP_EVENT_PERIODIC_TRANSFER 24
+#define BLE_GAP_EVENT_PARING_FAILED 25

Review comment:
   Did you consider BLE_GAP_EVENT_PAIRING_COMPLETE with a status and reason?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1024: apps/bttester: add command to force pairing

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1024:
URL: https://github.com/apache/mynewt-nimble/pull/1024#discussion_r741951023



##
File path: apps/bttester/src/gap.c
##
@@ -1301,6 +1301,37 @@ static void pair(const uint8_t *data, uint16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
 }
 
+static void force_pair(const uint8_t *data, uint16_t len)
+{
+/**
+ * This method is used to force pairing instead of giving the option
+ * of automatically choosing pairing or encryption by 
ble_gap_security_initiate()
+ */
+struct ble_gap_conn_desc desc;
+uint8_t status;
+int rc;
+
+SYS_LOG_DBG("");
+
+rc = gap_conn_find_by_addr((ble_addr_t *)data, );
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+rc = ble_gap_pair_initiate(desc.conn_handle);
+SYS_LOG_DBG("ble_gap_pair_initiate finished with rc=%d", rc);
+if (rc) {
+status = BTP_STATUS_FAILED;
+goto rsp;
+}
+
+status = BTP_STATUS_SUCCESS;
+
+rsp:

Review comment:
   indentation issue.

##
File path: apps/bttester/src/gap.c
##
@@ -1608,6 +1639,9 @@ void tester_handle_gap(uint8_t opcode, uint8_t index, 
uint8_t *data,
case GAP_PAIR:
pair(data, len);
return;
+case GAP_FORCE_PAIR:
+force_pair(data, len);

Review comment:
   indentation issue?




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski merged pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


KKopyscinski merged pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033


   


-- 
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-unsubscr...@mynewt.apache.org

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




[mynewt-nimble] branch master updated: apps/bttester: implement NRPA rotation

2021-11-03 Thread kopyscinski
This is an automated email from the ASF dual-hosted git repository.

kopyscinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 8135e51  apps/bttester: implement NRPA rotation
8135e51 is described below

commit 8135e511854e3c665408cbe331e257fd7aa91226
Author: Krzysztof Kopyściński 
AuthorDate: Wed Sep 29 08:43:39 2021 +0200

apps/bttester: implement NRPA rotation

As per CORE v5.3, Vol 3, Part C 10.7.1 NRPA should also rotate, same
as RPA is doing right now. For time beeing let's implement this in
tester application, before it's implemented in host.

This affects GAP/BROB/BCST/BV-04-C
---
 apps/bttester/src/gap.c  | 48 +++-
 apps/bttester/syscfg.yml |  4 
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/apps/bttester/src/gap.c b/apps/bttester/src/gap.c
index acac998..63150e2 100644
--- a/apps/bttester/src/gap.c
+++ b/apps/bttester/src/gap.c
@@ -63,6 +63,10 @@ static struct os_callout connected_ev_co;
 static struct gap_device_connected_ev connected_ev;
 #define CONNECTED_EV_DELAY_MS(itvl) 8 * BLE_HCI_CONN_ITVL * itvl / 1000
 static int connection_attempts;
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static int64_t advertising_start;
+static struct os_callout bttester_nrpa_rotate_timer;
+#endif
 
 static const struct ble_gap_conn_params dflt_conn_params = {
.scan_itvl = 0x0010,
@@ -248,6 +252,38 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
 };
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static void rotate_nrpa_cb(struct os_event *ev)
+{
+int rc;
+ble_addr_t addr;
+int32_t duration_ms = BLE_HS_FOREVER;
+int32_t remaining_time;
+os_time_t remaining_ticks;
+
+if (adv_params.disc_mode == BLE_GAP_DISC_MODE_LTD) {
+duration_ms = MYNEWT_VAL(BTTESTER_LTD_ADV_TIMEOUT);
+}
+
+ble_gap_adv_stop();
+rc = ble_hs_id_gen_rnd(1, );
+assert(rc == 0);
+rc = ble_hs_id_set_rnd(addr.val);
+assert(rc == 0);
+
+ble_gap_adv_start(own_addr_type, NULL, duration_ms,
+  _params, gap_event_cb, NULL);
+
+remaining_time = os_get_uptime_usec() - advertising_start;
+if (remaining_time > 0) {
+advertising_start = os_get_uptime_usec();
+os_time_ms_to_ticks(remaining_time, _ticks);
+os_callout_reset(_nrpa_rotate_timer,
+ remaining_ticks);
+}
+}
+#endif
+
 static void set_connectable(uint8_t *data, uint16_t len)
 {
const struct gap_set_connectable_cmd *cmd = (void *) data;
@@ -418,6 +454,13 @@ static void start_advertising(const uint8_t *data, 
uint16_t len)
duration_ms = MYNEWT_VAL(BTTESTER_LTD_ADV_TIMEOUT);
}
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+   if (MYNEWT_VAL(BTTESTER_NRPA_TIMEOUT) < duration_ms / 1000) {
+   advertising_start = os_get_uptime_usec();
+   os_callout_reset(_nrpa_rotate_timer,
+ OS_TICKS_PER_SEC * MYNEWT_VAL(BTTESTER_NRPA_TIMEOUT));
+   }
+#endif
err = ble_gap_adv_start(own_addr_type, NULL, duration_ms,
_params, gap_event_cb, NULL);
if (err) {
@@ -1675,7 +1718,10 @@ uint8_t tester_init_gap(void)
return BTP_STATUS_FAILED;
}
 #endif
-
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+   os_callout_init(_nrpa_rotate_timer, os_eventq_dflt_get(),
+rotate_nrpa_cb, NULL);
+#endif
adv_buf = NET_BUF_SIMPLE(ADV_BUF_LEN);
 
tester_init_gap_cb(BTP_STATUS_SUCCESS);
diff --git a/apps/bttester/syscfg.yml b/apps/bttester/syscfg.yml
index 7f99ded..f00afeb 100644
--- a/apps/bttester/syscfg.yml
+++ b/apps/bttester/syscfg.yml
@@ -75,6 +75,10 @@ syscfg.defs:
 description: Maximum MTU size the application can handle
 value: 230
 
+BTTESTER_NRPA_TIMEOUT:
+description: NRPA rotation timeout in seconds
+value: 5
+
 syscfg.vals:
 OS_MAIN_STACK_SIZE: 512
 SHELL_TASK: 0


[GitHub] [mynewt-core] kasjer edited a comment on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer edited a comment on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070


   It is defined in usbd.h
   Probably newer tinyusb is needed.


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on issue #2704: TUD_DFU_DESC_LEN is never defined

2021-11-03 Thread GitBox


kasjer commented on issue #2704:
URL: https://github.com/apache/mynewt-core/issues/2704#issuecomment-959091070


   It is defined in usbd.h


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1033: apps/bttester: implement NRPA rotation

2021-11-03 Thread GitBox


rymanluk commented on a change in pull request #1033:
URL: https://github.com/apache/mynewt-nimble/pull/1033#discussion_r741941908



##
File path: apps/bttester/src/gap.c
##
@@ -248,6 +252,40 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
 };
 
+#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) && MYNEWT_VAL(BTTESTER_USE_NRPA)
+static void rotate_nrpa_cb(struct os_event *ev)
+{
+assert(ev != NULL);

Review comment:
   this assert seems to be not needed. Otherwise looks good. Please remove 
it and feel free to merge




-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr-cli] antanas-v opened a new issue #23: Progress bar panic in Yocto

2021-11-03 Thread GitBox


antanas-v opened a new issue #23:
URL: https://github.com/apache/mynewt-mcumgr-cli/issues/23


   Hi
   running mcumgr-cli on ARM Yocto system results in panic. The same latest 
code runs OK on Linux PC. Seems to be related to progress bar. The embedded 
system uses 'sh' shell, the crash is reproducible 100% with both ssh and serial 
terminal.
   
   
   ```
   # mcumgr --conntype serial --connstring="/dev/ttyUSB0,baud=921600"  image 
upload signed.bin
10.91 KiB / 78.32 KiB   13.93% 2.98 KiB/s 00m22spanic: runtime error: 
invalid memory address or nil pointer 
dereference]
   7.57% 2.65 KiB/s 00m27s
   [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x764bdb24]
   
   goroutine 11 [running]:
   regexp.(*Regexp).allMatches(0x45676370, 0x45884100, 0x33, 0x0, 0x0, 0x0, 
0x34, 0x45623cb4)
/usr/lib/go/src/regexp/regexp.go:719 +0xb8
   regexp.(*Regexp).FindAllString(0x45676370, 0x45884100, 0x33, 0x, 
0x0, 0x8, 0x0)
/usr/lib/go/src/regexp/regexp.go:1060 +0xa4
   
github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb%2ev1.escapeAwareRuneCountInString(0x45884100,
 0x33, 0x9)

/home/antanas/yocto/build-apalis-imx6/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/mynewt-mcumgr-cli/1.0-r0/build/src/github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb.v1/runecount.go:13
 +0x74
   
github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb%2ev1.(*ProgressBar).write(0x457341c0,
 0x1394c, 0x0, 0x30f7, 0x0)

/home/antanas/yocto/build-apalis-imx6/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/mynewt-mcumgr-cli/1.0-r0/build/src/github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb.v1/pb.go:358
 +0x478
   
github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb%2ev1.(*ProgressBar).Update(0x457341c0)

/home/antanas/yocto/build-apalis-imx6/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/mynewt-mcumgr-cli/1.0-r0/build/src/github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb.v1/pb.go:455
 +0xc4
   
github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb%2ev1.(*ProgressBar).refresher(0x457341c0)

/home/antanas/yocto/build-apalis-imx6/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/mynewt-mcumgr-cli/1.0-r0/build/src/github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb.v1/pb.go:503
 +0x20
   created by 
github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb%2ev1.(*ProgressBar).Start

/home/antanas/yocto/build-apalis-imx6/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/mynewt-mcumgr-cli/1.0-r0/build/src/github.com/apache/mynewt-mcumgr-cli/vendor/gopkg.in/cheggaaa/pb.v1/pb.go:124
 +0xf8
   ```


-- 
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-unsubscr...@mynewt.apache.org

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




[mynewt-nimble] branch master updated: complaint -> compliant

2021-11-03 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 7f31820  complaint -> compliant
7f31820 is described below

commit 7f31820ea13c1632b69166477a33b3acd1ff7e93
Author: Reynir Björnsson 
AuthorDate: Tue Nov 2 20:59:52 2021 +0100

complaint -> compliant
---
 docs/index.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/index.rst b/docs/index.rst
index b41b1b2..b07f1f8 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -46,7 +46,7 @@ ideal wireless technology for the Internet of Things (IoT).
 -  LE Secure Connections featuring FIPS-compliant algorithms.
 -  LE Data Length Extension for higher throughput
 -  **Coming Soon**: Assigning an Internet Protocol (IP) address
-   (complaint with the IPv6 or 6LoWPAN standard) to a Bluetooth device
+   (compliant with the IPv6 or 6LoWPAN standard) to a Bluetooth device
through Internet Protocol Support Profile (IPSP)
 
 The Bluetooth 5 is backward compatible with previous Bluetooth version


[GitHub] [mynewt-nimble] sjanc merged pull request #1070: complaint -> compliant

2021-11-03 Thread GitBox


sjanc merged pull request #1070:
URL: https://github.com/apache/mynewt-nimble/pull/1070


   


-- 
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-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2707: mcu/nrf5340: Add GPIO pin core selection

2021-11-03 Thread GitBox


kasjer opened a new pull request #2707:
URL: https://github.com/apache/mynewt-core/pull/2707


   So far ipc driver could mark pins for NET core usage.
   If application was running in non-secure mode this
   ipc driver could not change pin assigment, it is possible
   only in secure mode.
   
   This adds two pin lists that could setup pins to be used
   for network core and for dedicated peripherals.
   
   This change is needed if bootloader code does not use (and
   not starts external low power oscillator) but application
   will use it.  If application was running in non-secure
   mode default pin 0 and 1 assignment to app core could not
   be changed to peripheral as required for LFXO to work.


-- 
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-unsubscr...@mynewt.apache.org

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