[mynewt-newt] branch master updated: run: Fix options parsing for newt run (#393)

2020-04-07 Thread vipulrahane
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2623dad  run: Fix options parsing for newt run (#393)
2623dad is described below

commit 2623dad9f920469fc7702e2e9d8b0fb48fd572d5
Author: Vipul Rahane 
AuthorDate: Tue Apr 7 19:42:39 2020 -0700

run: Fix options parsing for newt run (#393)

- Fixing parsing of encryption filenames and options for the run command
---
 newt/cli/run_cmds.go | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/newt/cli/run_cmds.go b/newt/cli/run_cmds.go
index 19cdfd4..e008643 100644
--- a/newt/cli/run_cmds.go
+++ b/newt/cli/run_cmds.go
@@ -105,9 +105,11 @@ func runRunCmd(cmd *cobra.Command, args []string) {
}
 
if useV1 {
-   err = imgprod.ProduceAllV1(b, ver, keys, "", 
-1, -1, -1)
+   err = imgprod.ProduceAllV1(b, ver, keys, 
encKeyFilename, encKeyIndex,
+   hdrPad, imagePad)
} else {
-   err = imgprod.ProduceAll(b, ver, keys, "", -1, 
-1, -1)
+   err = imgprod.ProduceAll(b, ver, keys, 
encKeyFilename, encKeyIndex,
+   hdrPad, imagePad)
}
if err != nil {
NewtUsage(nil, err)
@@ -150,10 +152,22 @@ func AddRunCommands(cmd *cobra.Command) {
runCmd.PersistentFlags().BoolVarP(,
"force", "f", false,
"Ignore flash overflow errors during image creation")
+   runCmd.PersistentFlags().BoolVar(,
+   "rsa-pss", false,
+   "Use RSA-PSS instead of PKCS#1 v1.5 for RSA sig. "+
+   "Meaningful for version 1 image format.")
runCmd.PersistentFlags().BoolVarP(,
"1", "1", false, "Use old image header format")
runCmd.PersistentFlags().BoolVarP(,
"2", "2", false, "Use new image header format (default)")
+   runCmd.PersistentFlags().StringVarP(,
+   "encrypt", "e", "", "Encrypt image using this key")
+   runCmd.PersistentFlags().IntVarP(,
+   "hw-stored-key", "H", -1, "Hardware stored key index")
+   runCmd.PersistentFlags().IntVarP(,
+   "pad-header", "p", 0, "Pad header to this length")
+   runCmd.PersistentFlags().IntVarP(,
+   "pad-image", "i", 0, "Pad image to this length")
 
cmd.AddCommand(runCmd)
AddTabCompleteFn(runCmd, func() []string {



[GitHub] [mynewt-newt] vrahane merged pull request #393: run: Fix options parsing for newt run

2020-04-07 Thread GitBox
vrahane merged pull request #393: run: Fix options parsing for newt run
URL: https://github.com/apache/mynewt-newt/pull/393
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-newt] vrahane commented on issue #393: run: Fix options parsing for newt run

2020-04-07 Thread GitBox
vrahane commented on issue #393: run: Fix options parsing for newt run
URL: https://github.com/apache/mynewt-newt/pull/393#issuecomment-610717846
 
 
   @ccollins476ad Thanks, done


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-610629250
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-610579980
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-610477940
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -5623,8 +5621,7 @@
}

for (i = 0; i < num_peers; i++) {
   -if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) 
!= 0)
   -{
   +if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) 
!= 0) {
break;
}
}
   ```
   
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -341,7 +341,7 @@
key.cccd.peer_addr = peer_cccd_addrs[i];

for (j = 0; j < num_bonded_peers; j++) {
   -if(memcmp(_cccd_addrs[i], _bonded_addrs[j],
   +if (memcmp(_cccd_addrs[i], _bonded_addrs[j],
  sizeof(ble_addr_t)) == 0) {
break;
}
   @@ -385,7 +385,7 @@
case BLE_STORE_OBJ_TYPE_CCCD:
/* Try to remove unbonded CCCDs first */
if ((rc = ble_store_clean_old_cccds((void *) 
>overflow.value->cccd.peer_addr))
   - == BLE_HS_ENOENT) {
   +== BLE_HS_ENOENT) {
/* No unbonded CCCDs found to delete, try unpairing oldest 
peer
 * except current peer */
return ble_gap_unpair_oldest_except_curr((void *) 
>overflow.value->cccd.peer_addr);
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-610579980
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] h2zero commented on issue #783: Make ble_gap_rx_l2cap_update_req() behave like ble_gap_rx_param_req()

2020-04-07 Thread GitBox
h2zero commented on issue #783: Make ble_gap_rx_l2cap_update_req() behave like 
ble_gap_rx_param_req()
URL: https://github.com/apache/mynewt-nimble/pull/783#issuecomment-610571660
 
 
   I’ve been seeing this happen as well on esp32. Only way to prevent it I have 
found is to reject the peer request then manually change the parameters after. 
This PR makes more sense.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-newt] vrahane opened a new pull request #393: run: Fix options parsing for newt run

2020-04-07 Thread GitBox
vrahane opened a new pull request #393: run: Fix options parsing for newt run
URL: https://github.com/apache/mynewt-newt/pull/393
 
 
   - Fixing parsing of encryption filenames and options for the run command
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[mynewt-nimble] branch master updated: nimble/ll: Drop ext adv event if aux is not sent

2020-04-07 Thread andk
This is an automated email from the ASF dual-hosted git repository.

andk 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 c98e1c3  nimble/ll: Drop ext adv event if aux is not sent
c98e1c3 is described below

commit c98e1c3979b6b1b683c16a1b31123cbbe6605dc4
Author: Andrzej Kaczmarek 
AuthorDate: Mon Mar 30 21:19:39 2020 +0200

nimble/ll: Drop ext adv event if aux is not sent

If one of auxiliary packets is not sent, we should drop remaining
advertising event since any subsequent packet sent in event cannot be
properly received by remote side anyway.
---
 nimble/controller/src/ble_ll_adv.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/nimble/controller/src/ble_ll_adv.c 
b/nimble/controller/src/ble_ll_adv.c
index 4ffbe20..8b661f8 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -131,6 +131,7 @@ struct ble_ll_adv_sm
 uint8_t aux_index : 1;
 uint8_t aux_first_pdu : 1;
 uint8_t aux_not_scanned : 1;
+uint8_t aux_dropped : 1;
 struct ble_mbuf_hdr *rx_ble_hdr;
 struct os_mbuf **aux_data;
 struct ble_ll_adv_aux aux[2];
@@ -1269,7 +1270,7 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item 
*sch)
 rc = ble_phy_tx_set_start_time(txstart, sch->remainder);
 if (rc) {
 STATS_INC(ble_ll_stats, adv_late_starts);
-goto adv_tx_done;
+goto adv_aux_dropped;
 }
 
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
@@ -1304,7 +1305,7 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item 
*sch)
 /* Transmit advertisement */
 rc = ble_phy_tx(pducb, advsm, end_trans);
 if (rc) {
-goto adv_tx_done;
+goto adv_aux_dropped;
 }
 
 /* Enable/disable whitelisting based on filter policy */
@@ -1322,7 +1323,8 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item 
*sch)
 
 return BLE_LL_SCHED_STATE_RUNNING;
 
-adv_tx_done:
+adv_aux_dropped:
+advsm->aux_dropped = 1;
 ble_ll_adv_tx_done(advsm);
 return BLE_LL_SCHED_STATE_DONE;
 }
@@ -1554,6 +1556,7 @@ ble_ll_adv_aux_schedule_first(struct ble_ll_adv_sm *advsm)
 advsm->aux_index = 0;
 advsm->aux_first_pdu = 1;
 advsm->aux_not_scanned = 0;
+advsm->aux_dropped = 0;
 
 aux = AUX_CURRENT(advsm);
 ble_ll_adv_aux_calculate(advsm, aux, 0);
@@ -4836,6 +4839,11 @@ ble_ll_adv_sec_done(struct ble_ll_adv_sm *advsm)
 /* We don't need RF anymore */
 ble_ll_rfmgmt_release();
 
+if (advsm->aux_dropped) {
+ble_ll_adv_drop_event(advsm);
+return;
+}
+
 if (advsm->aux_not_scanned) {
 ble_ll_sched_rmv_elem(_next->sch);
 }



[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #787: nimble/ll: Drop ext adv event if aux is not sent

2020-04-07 Thread GitBox
andrzej-kaczmarek merged pull request #787: nimble/ll: Drop ext adv event if 
aux is not sent
URL: https://github.com/apache/mynewt-nimble/pull/787
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script enhancements

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script 
enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610526992
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2262: da1469x: otp and serial script enhancements

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #2262: da1469x: otp and serial 
script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610149019
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2262: da1469x: otp and serial script enhancements

2020-04-07 Thread GitBox
nkaje commented on a change in pull request #2262: da1469x: otp and serial 
script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#discussion_r404936376
 
 

 ##
 File path: hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
 ##
 @@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
 except serial.SerialException:
 raise SystemExit("Failed to open serial port")
 
+# drain serial port buffer
+try:
+while True:
+data = ser.read(1)
+if len(data) == 0:
+break
+except serial.SerialException:
+raise SystemExit("Failed to open serial port")
+
 
 Review comment:
   done.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-609581758
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-610477940
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -5623,8 +5621,7 @@
}

for (i = 0; i < num_peers; i++) {
   -if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) 
!= 0)
   -{
   +if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) 
!= 0) {
break;
}
}
   ```
   
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -341,7 +341,7 @@
key.cccd.peer_addr = peer_cccd_addrs[i];

for (j = 0; j < num_bonded_peers; j++) {
   -if(memcmp(_cccd_addrs[i], _bonded_addrs[j],
   +if (memcmp(_cccd_addrs[i], _bonded_addrs[j],
  sizeof(ble_addr_t)) == 0) {
break;
}
   @@ -385,7 +385,7 @@
case BLE_STORE_OBJ_TYPE_CCCD:
/* Try to remove unbonded CCCDs first */
if ((rc = ble_store_clean_old_cccds((void *) 
>overflow.value->cccd.peer_addr))
   - == BLE_HS_ENOENT) {
   +== BLE_HS_ENOENT) {
/* No unbonded CCCDs found to delete, try unpairing oldest 
peer
 * except current peer */
return ble_gap_unpair_oldest_except_curr((void *) 
>overflow.value->cccd.peer_addr);
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] agross-korg commented on a change in pull request #2262: da1469x: otp and serial script enhancements

2020-04-07 Thread GitBox
agross-korg commented on a change in pull request #2262: da1469x: otp and 
serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#discussion_r404872299
 
 

 ##
 File path: hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
 ##
 @@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
 except serial.SerialException:
 raise SystemExit("Failed to open serial port")
 
+# drain serial port buffer
+try:
+while True:
+data = ser.read(1)
+if len(data) == 0:
+break
+except serial.SerialException:
+raise SystemExit("Failed to open serial port")
+
 
 Review comment:
   nit.  you're mixing two sets of changes here.  One to drain the port and the 
other to make the reset optional.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] h2zero edited a comment on issue #793: min\max_ce_len, how is it used internally?

2020-04-07 Thread GitBox
h2zero edited a comment on issue #793: min\max_ce_len, how is it used 
internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610397519
 
 
   Thanks, that helps a lot  


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on issue #2262: da1469x: otp and serial script enhancements

2020-04-07 Thread GitBox
nkaje commented on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610398354
 
 
   @agross-korg @benmccrea Please review.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] h2zero commented on issue #793: min\max_ce_len, how is it used internally?

2020-04-07 Thread GitBox
h2zero commented on issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610397519
 
 
   Thanks, the helps a lot  


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] prasad-alatkar commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-07 Thread GitBox
prasad-alatkar commented on a change in pull request #790: nimble/store: Fix 
nimble store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r404738151
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,16 +315,43 @@ ble_store_util_delete_oldest_peer(void)
 int
 ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
 {
+int rc = BLE_HS_EUNKNOWN;
+ble_addr_t peer_id_addr;
+int num_peers;
+
 switch (event->event_code) {
 case BLE_STORE_EVENT_OVERFLOW:
 switch (event->overflow.obj_type) {
-case BLE_STORE_OBJ_TYPE_OUR_SEC:
-case BLE_STORE_OBJ_TYPE_PEER_SEC:
-case BLE_STORE_OBJ_TYPE_CCCD:
-return ble_gap_unpair_oldest_peer();
-
-default:
-return BLE_HS_EUNKNOWN;
+case BLE_STORE_OBJ_TYPE_OUR_SEC:
+case BLE_STORE_OBJ_TYPE_PEER_SEC:
+return ble_gap_unpair_oldest_peer();
+case BLE_STORE_OBJ_TYPE_CCCD:
+if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
 
 Review comment:
   @rymanluk @h2zero , disregard my earlier comment, yes current peer will be 
unpaired, and we should simply return error in that case.
   
   I was thinking of adding utility function (`ble_store_clean_old_cccd`) which 
will delete CCCDs of all unbonded peers. This can be called first in case of 
`CCCD overflow` and if it fails to delete peer then we can continue with  
modified `ble_gap_unpair_oldest_peer()`. Please let me know your views on it.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #778: apps: scanner added

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #778: apps: scanner added
URL: https://github.com/apache/mynewt-nimble/pull/778#issuecomment-605901848
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #778: apps: scanner added

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #778: apps: scanner added
URL: https://github.com/apache/mynewt-nimble/pull/778#issuecomment-610303290
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on issue #793: min\max_ce_len, how is it used internally?

2020-04-07 Thread GitBox
andrzej-kaczmarek commented on issue #793: min\max_ce_len, how is it used 
internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610263805
 
 
   NimBLE controller does not use min/max CE length parameters for scheduling 
but it does validate them (likely there was intention to use them, but it was 
never implemented).
   
   There's syscfg settings which affects connection event length, namely 
`BLE_LL_CONN_INIT_SLOTS`, which sets minimum number of slots allocated for each 
connection event. It usually does not affect limit the number of concurrent 
connections controller is able to support since it will just skip connection 
events it cannot schedule. When there are 2 colliding connection events, the 
least recently scheduled connection has priority (the other one is skipped and 
that connection moves to next connection event). So with multiple connections 
with short connection interval just make sure supervision timeouts are long 
enough so controller can skip connection events without timeouts happening.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #778: apps: scanner added

2020-04-07 Thread GitBox
sjanc commented on a change in pull request #778: apps: scanner added
URL: https://github.com/apache/mynewt-nimble/pull/778#discussion_r404637659
 
 

 ##
 File path: apps/scanner/src/main.c
 ##
 @@ -0,0 +1,261 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "sysinit/sysinit.h"
+#include "os/os.h"
+#include "console/console.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "console/console.h"
+#include "log/log.h"
+
+/* scan_event() calls scan(), so forward declaration is required */
+static void scan(void);
+
+static void
+ble_app_set_addr(void)
+{
+ble_addr_t addr;
+int rc;
+
+/* generate new non-resolvable private address */
+rc = ble_hs_id_gen_rnd(1, );
+assert(rc == 0);
+
+/* set generated address */
+rc = ble_hs_id_set_rnd(addr.val);
+assert(rc == 0);
+}
+
+void
 
 Review comment:
   make those helpers static


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2252: [RFC] I2S API and driver for STM32 MCUs

2020-04-07 Thread GitBox
apache-mynewt-bot removed a comment on issue #2252: [RFC] I2S API and driver 
for STM32 MCUs
URL: https://github.com/apache/mynewt-core/pull/2252#issuecomment-609856939
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/i2s/i2s_stm32f4/src/i2s_stm32f4.c
   
   
   ```diff
   @@ -469,7 +469,7 @@
}
}
#endif
   -/* Fallthrough */
   +/* Fallthrough */
case HAL_I2S_STATE_READY:
assert(i2s_data->active_buffer == NULL);
i2s_data->active_buffer = i2s_driver_buffer_get(i2s);
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2252: [RFC] I2S API and driver for STM32 MCUs

2020-04-07 Thread GitBox
apache-mynewt-bot commented on issue #2252: [RFC] I2S API and driver for STM32 
MCUs
URL: https://github.com/apache/mynewt-core/pull/2252#issuecomment-610248314
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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:
us...@infra.apache.org


With regards,
Apache Git Services