[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #781: Make connection update process timeout variable

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #781: Make connection update process 
timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602891381
 
 
   
   
   
   ## 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 #781: Make connection update process timeout variable

2020-03-23 Thread GitBox
apache-mynewt-bot removed a comment on issue #781: Make connection update 
process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602885623
 
 
   
   
   
   ## 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
   @@ -88,7 +88,7 @@
#define BLE_GAP_CANCEL_RETRY_TIMEOUT_MS 100 /* ms */

#define BLE_GAP_UPDATE_TIMEOUT_MS(itvl, latency) \
   -(6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
   +(6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))

#if MYNEWT_VAL(BLE_ROLE_CENTRAL)
static const struct ble_gap_conn_params ble_gap_conn_params_dflt = {
   @@ -1185,7 +1185,7 @@
entry = ble_gap_update_entry_find(conn_handle, NULL);
if (entry != NULL && !(conn->bhc_flags & BLE_HS_CONN_F_MASTER)) 
{
ble_gap_update_to_l2cap(>params, _params);
   -
   +
timeout = BLE_GAP_UPDATE_TIMEOUT_MS(conn->bhc_itvl,
conn->bhc_latency);

   ```
   
   


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 #781: Make connection update process timeout variable

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #781: Make connection update process 
timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602885623
 
 
   
   
   
   ## 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
   @@ -88,7 +88,7 @@
#define BLE_GAP_CANCEL_RETRY_TIMEOUT_MS 100 /* ms */

#define BLE_GAP_UPDATE_TIMEOUT_MS(itvl, latency) \
   -(6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
   +(6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))

#if MYNEWT_VAL(BLE_ROLE_CENTRAL)
static const struct ble_gap_conn_params ble_gap_conn_params_dflt = {
   @@ -1185,7 +1185,7 @@
entry = ble_gap_update_entry_find(conn_handle, NULL);
if (entry != NULL && !(conn->bhc_flags & BLE_HS_CONN_F_MASTER)) 
{
ble_gap_update_to_l2cap(>params, _params);
   -
   +
timeout = BLE_GAP_UPDATE_TIMEOUT_MS(conn->bhc_itvl,
conn->bhc_latency);

   ```
   
   


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] zacwbond opened a new pull request #781: Make connection update process timeout variable

2020-03-23 Thread GitBox
zacwbond opened a new pull request #781: Make connection update process timeout 
variable
URL: https://github.com/apache/mynewt-nimble/pull/781
 
 
   This is a fix for #780, an issue I submitted earlier today.  
   
   I am connecting as a central to a remote peripheral using a connection 
interval of 120, latency of 90, and timeout of 3000.  Due to the hard-coded 40 
second timeout, it is impossible to perform a connection parameter update on 
this connection.  Trying to do so results in a timeout followed by a disconnect 
100% of the time.
   
   My attempt to fix the problem is to compute the timeout based on the current 
connection parameters instead of just hard-coding a constant value.  


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-core] branch master updated: bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE

2020-03-23 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-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 3fe8044  bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE
3fe8044 is described below

commit 3fe80442ee72f95dd17e0423bd8e6ef2d356d7ec
Author: Szymon Janc 
AuthorDate: Mon Mar 23 10:11:19 2020 +0100

bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE

Use OS_CRASH_FILE_LINE instead to avoid following message:

Override of defunct settings detected:
BASELIBC_ASSERT_FILE_LINE: Use OS_CRASH_FILE_LINE instead

Setting history (newest -> oldest):
BASELIBC_ASSERT_FILE_LINE: [@apache-mynewt-core/hw/bsp/native:1,
@apache-mynewt-core/libc/baselibc:0]
---
 hw/bsp/native-armv7/syscfg.yml | 2 +-
 hw/bsp/native-mips/syscfg.yml  | 2 +-
 hw/bsp/native/syscfg.yml   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/bsp/native-armv7/syscfg.yml b/hw/bsp/native-armv7/syscfg.yml
index 22ec8c9..5e92bf4 100644
--- a/hw/bsp/native-armv7/syscfg.yml
+++ b/hw/bsp/native-armv7/syscfg.yml
@@ -25,7 +25,7 @@ syscfg.defs:
 syscfg.vals:
 # Sim isn't flash constrained, so include filename, line number, and
 # message in asserts and sysinit panic messages.
-BASELIBC_ASSERT_FILE_LINE: 1
+OS_CRASH_FILE_LINE: 1
 SYSINIT_PANIC_FILE_LINE: 1
 SYSINIT_PANIC_MESSAGE: 1
 
diff --git a/hw/bsp/native-mips/syscfg.yml b/hw/bsp/native-mips/syscfg.yml
index 5223283..8d7c9b8 100644
--- a/hw/bsp/native-mips/syscfg.yml
+++ b/hw/bsp/native-mips/syscfg.yml
@@ -26,7 +26,7 @@ syscfg.vals:
 OS_IDLE_TICKLESS_MS_MIN: 1
 # Sim isn't flash constrained, so include filename, line number, and
 # message in asserts and sysinit panic messages.
-BASELIBC_ASSERT_FILE_LINE: 1
+OS_CRASH_FILE_LINE: 1
 SYSINIT_PANIC_FILE_LINE: 1
 SYSINIT_PANIC_MESSAGE: 1
 
diff --git a/hw/bsp/native/syscfg.yml b/hw/bsp/native/syscfg.yml
index 5223283..8d7c9b8 100644
--- a/hw/bsp/native/syscfg.yml
+++ b/hw/bsp/native/syscfg.yml
@@ -26,7 +26,7 @@ syscfg.vals:
 OS_IDLE_TICKLESS_MS_MIN: 1
 # Sim isn't flash constrained, so include filename, line number, and
 # message in asserts and sysinit panic messages.
-BASELIBC_ASSERT_FILE_LINE: 1
+OS_CRASH_FILE_LINE: 1
 SYSINIT_PANIC_FILE_LINE: 1
 SYSINIT_PANIC_MESSAGE: 1
 



[GitHub] [mynewt-core] sjanc merged pull request #2247: bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE

2020-03-23 Thread GitBox
sjanc merged pull request #2247: bsp/native: Don't use deprecated 
BASELIBC_ASSERT_FILE_LINE
URL: https://github.com/apache/mynewt-core/pull/2247
 
 
   


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] zacwbond opened a new issue #780: Should 40s timeout apply to connection parameter updates?

2020-03-23 Thread GitBox
zacwbond opened a new issue #780: Should 40s timeout apply to connection 
parameter updates?
URL: https://github.com/apache/mynewt-nimble/issues/780
 
 
   I have a connection using a connection interval of 120, latency of 90, and 
timeout of 3000.  The spec says in section 6.B.5.4, 
   
   >The master should allow a minimum of 6 connection events that the slave 
will be listening for before the instant occurs, considering that the slave may 
only be listening once every connSlaveLatency events.
   
   Since a connection update isn't done until the new parameters are applied, 
that means in my case a parameter update will take 120 *1.25ms * 90 * 6 = 
81000ms, or 1:21.  
   
   But in `ble_gap.c` there's a hard-coded timeout of 
`BLE_GAP_UPDATE_TIMEOUT_MS` = 40s applied to connection parameter update 
events.  I assume 40s was chosen because of 6.B.5.2, but that section also says 
there's no timeout rules for connection update events.  
   
   The result is that in my application, when the peripheral asks for new 
connection parameters, the master times out and disconnects the peripheral 
before the process is expected to have completed.
   
   I think the timeout for connection parameter update events should be based 
on the current connection parameters rather than a hardcoded value.


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 #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779#issuecomment-602748459
 
 
   
   
   
   ## 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 #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
apache-mynewt-bot removed a comment on issue #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779#issuecomment-602579674
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/mesh/src/nodes.h
   
   
   ```diff
   @@ -19,5 +19,5 @@

struct bt_mesh_node *bt_mesh_node_find(u16_t addr);
struct bt_mesh_node *bt_mesh_node_alloc(u16_t addr, u8_t num_elem,
   -u16_t net_idx);
   +u16_t net_idx);
void bt_mesh_node_del(struct bt_mesh_node *node, bool store);
   ```
   
   


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 removed a comment on issue #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
sjanc removed a comment on issue #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779#issuecomment-602575836
 
 
   @justinmclean could you have a look at this PR? If this is good I'll work on 
cleaning up core too


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-mcumgr] branch master updated: fs_mgmt: Fix file download for Zephyr

2020-03-23 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-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
 new c4919da  fs_mgmt: Fix file download for Zephyr
c4919da is described below

commit c4919dab456ba383431b1936a6fd7524486f9718
Author: Dominik Ermel 
AuthorDate: Thu Feb 20 15:39:35 2020 +

fs_mgmt: Fix file download for Zephyr

File download worked only for files small enough to fit into small mcumgr
buffer, dedicated for CBOR encoding. Because file read buffer size is
independent from the size of CBOR encoding buffer and part of CBOR buffer
is used outside of control of download backend, it could happen that the
chunk read could not fit into actual free space left within CBOR buffer,
automatically failing the download.

Signed-off-by: Dominik Ermel 
---
 cmd/fs_mgmt/include/fs_mgmt/fs_mgmt_config.h | 41 +++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/cmd/fs_mgmt/include/fs_mgmt/fs_mgmt_config.h 
b/cmd/fs_mgmt/include/fs_mgmt/fs_mgmt_config.h
index deaec8a..2fd7ae0 100644
--- a/cmd/fs_mgmt/include/fs_mgmt/fs_mgmt_config.h
+++ b/cmd/fs_mgmt/include/fs_mgmt/fs_mgmt_config.h
@@ -30,7 +30,46 @@
 
 #elif defined __ZEPHYR__
 
-#define FS_MGMT_DL_CHUNK_SIZE   CONFIG_FS_MGMT_DL_CHUNK_SIZE
+
+#define MCUMGR_BUF_SIZE CONFIG_MCUMGR_BUF_SIZE
+/* File chunk needs to fit into MCUGMR_BUF_SZIE with all required headers
+ * and other data fields; following information takes space off the
+ * MCUMGR_BUF_SIZE, N is CONFIG_FS_MGMT_MAX_OFFSET_LEN
+ *  MGMT_HDR_SIZE - header that is placed in front of buffer and not
+ *visible for cbod encoder (see smp_handle_single_req);
+ *  9 + 1 -- bytes taken by definition of CBOR undefined length map and map
+ *terminator (break) character;
+ *  1 + strlen("off") + [1, N] -- CBOR encoded pair of "off" marker and
+ *offset of the chunk within the file;
+ *  1 + strlen("data") + [1, N] -- CBOR encoded "data" marker; this marker
+ *will be followed by file chunk of size FS_MGMT_DL_CHUNK_SIZE
+ *  1 + strlen("rc") + 1 -- status code of operation;
+ *  1 + strlen("len") + [1, N] -- CBOR encoded "len" marker and complete
+ *length of a file; this is only sent once when "off" is 0;
+ *
+ * FS_MGMT_DL_CHUNK_SIZE is calculated with most pessimistic estimations,
+ * that is with headers fields taking most space, i.e. N bytes.
+ */
+//#define FS_MGMT_DL_CHUNK_SIZE   CONFIG_FS_MGMT_DL_CHUNK_SIZE
+#define CBOR_AND_OTHER_HDR \
+   ((9 + 1) + \
+(1 + 3 + CONFIG_FS_MGMT_MAX_OFFSET_LEN) + \
+(1 + 4 + CONFIG_FS_MGMT_MAX_OFFSET_LEN) + \
+(1 + 2 + 1) + \
+(1 + 3 + CONFIG_FS_MGMT_MAX_OFFSET_LEN))
+
+#if defined(CONFIG_FS_MGMT_DL_CHUNK_SIZE_LIMIT)
+#if (CONFIG_FS_MGMT_DL_CHUNK_SIZE + CBOR_AND_OTHER_HDR) > MCUMGR_BUF_SIZE
+#warning FS_MGMT_DL_CHUNK_SIZE too big, rounding it down.
+#else
+#define FS_MGMT_DL_CHUNK_SIZE (CONFIG_FS_MGMT_DL_CHUNK_SIZE)
+#endif
+#endif
+
+#if !defined(FS_MGMT_DL_CHUNK_SIZE)
+#define FS_MGMT_DL_CHUNK_SIZE (MCUMGR_BUF_SIZE - CBOR_AND_OTHER_HDR)
+#endif
+
 #define FS_MGMT_PATH_SIZE   CONFIG_FS_MGMT_PATH_SIZE
 #define FS_MGMT_UL_CHUNK_SIZE   CONFIG_FS_MGMT_UL_CHUNK_SIZE
 



[GitHub] [mynewt-mcumgr] sjanc merged pull request #72: fs_mgmt: Fix file download for Zephyr

2020-03-23 Thread GitBox
sjanc merged pull request #72: fs_mgmt: Fix file download for Zephyr
URL: https://github.com/apache/mynewt-mcumgr/pull/72
 
 
   


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-mcumgr] carlescufi commented on issue #72: fs_mgmt: Fix file download for Zephyr

2020-03-23 Thread GitBox
carlescufi commented on issue #72: fs_mgmt: Fix file download for Zephyr
URL: https://github.com/apache/mynewt-mcumgr/pull/72#issuecomment-602717705
 
 
   @ccollins476ad, @mlaz or @vrahane could you merge this please?


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 #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
apache-mynewt-bot removed a comment on issue #777: nimble/host: Clear master 
and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#issuecomment-601703747
 
 
   
   
   
   ## 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 #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #777: nimble/host: Clear master and slave 
states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#issuecomment-602703331
 
 
   
   
   
   ## 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
   @@ -244,42 +244,42 @@

STATS_SECT_DECL(ble_gap_stats) ble_gap_stats;
STATS_NAME_START(ble_gap_stats)
   -STATS_NAME(ble_gap_stats, wl_set)
   -STATS_NAME(ble_gap_stats, wl_set_fail)
   -STATS_NAME(ble_gap_stats, adv_stop)
   -STATS_NAME(ble_gap_stats, adv_stop_fail)
   -STATS_NAME(ble_gap_stats, adv_start)
   -STATS_NAME(ble_gap_stats, adv_start_fail)
   -STATS_NAME(ble_gap_stats, adv_set_data)
   -STATS_NAME(ble_gap_stats, adv_set_data_fail)
   -STATS_NAME(ble_gap_stats, adv_rsp_set_data)
   -STATS_NAME(ble_gap_stats, adv_rsp_set_data_fail)
   -STATS_NAME(ble_gap_stats, discover)
   -STATS_NAME(ble_gap_stats, discover_fail)
   -STATS_NAME(ble_gap_stats, initiate)
   -STATS_NAME(ble_gap_stats, initiate_fail)
   -STATS_NAME(ble_gap_stats, terminate)
   -STATS_NAME(ble_gap_stats, terminate_fail)
   -STATS_NAME(ble_gap_stats, cancel)
   -STATS_NAME(ble_gap_stats, cancel_fail)
   -STATS_NAME(ble_gap_stats, update)
   -STATS_NAME(ble_gap_stats, update_fail)
   -STATS_NAME(ble_gap_stats, connect_mst)
   -STATS_NAME(ble_gap_stats, connect_slv)
   -STATS_NAME(ble_gap_stats, disconnect)
   -STATS_NAME(ble_gap_stats, rx_disconnect)
   -STATS_NAME(ble_gap_stats, rx_update_complete)
   -STATS_NAME(ble_gap_stats, rx_adv_report)
   -STATS_NAME(ble_gap_stats, rx_conn_complete)
   -STATS_NAME(ble_gap_stats, discover_cancel)
   -STATS_NAME(ble_gap_stats, discover_cancel_fail)
   -STATS_NAME(ble_gap_stats, security_initiate)
   -STATS_NAME(ble_gap_stats, security_initiate_fail)
   +STATS_NAME(ble_gap_stats, wl_set)
   +STATS_NAME(ble_gap_stats, wl_set_fail)
   +STATS_NAME(ble_gap_stats, adv_stop)
   +STATS_NAME(ble_gap_stats, adv_stop_fail)
   +STATS_NAME(ble_gap_stats, adv_start)
   +STATS_NAME(ble_gap_stats, adv_start_fail)
   +STATS_NAME(ble_gap_stats, adv_set_data)
   +STATS_NAME(ble_gap_stats, adv_set_data_fail)
   +STATS_NAME(ble_gap_stats, adv_rsp_set_data)
   +STATS_NAME(ble_gap_stats, adv_rsp_set_data_fail)
   +STATS_NAME(ble_gap_stats, discover)
   +STATS_NAME(ble_gap_stats, discover_fail)
   +STATS_NAME(ble_gap_stats, initiate)
   +STATS_NAME(ble_gap_stats, initiate_fail)
   +STATS_NAME(ble_gap_stats, terminate)
   +STATS_NAME(ble_gap_stats, terminate_fail)
   +STATS_NAME(ble_gap_stats, cancel)
   +STATS_NAME(ble_gap_stats, cancel_fail)
   +STATS_NAME(ble_gap_stats, update)
   +STATS_NAME(ble_gap_stats, update_fail)
   +STATS_NAME(ble_gap_stats, connect_mst)
   +STATS_NAME(ble_gap_stats, connect_slv)
   +STATS_NAME(ble_gap_stats, disconnect)
   +STATS_NAME(ble_gap_stats, rx_disconnect)
   +STATS_NAME(ble_gap_stats, rx_update_complete)
   +STATS_NAME(ble_gap_stats, rx_adv_report)
   +STATS_NAME(ble_gap_stats, rx_conn_complete)
   +STATS_NAME(ble_gap_stats, discover_cancel)
   +STATS_NAME(ble_gap_stats, discover_cancel_fail)
   +STATS_NAME(ble_gap_stats, security_initiate)
   +STATS_NAME(ble_gap_stats, security_initiate_fail)
STATS_NAME_END(ble_gap_stats)


/*
   - * $debug   
 *
   - 
*/
   +* $debug
*
   
+*/

#if MYNEWT_VAL(BLE_HS_DEBUG)
int
   ```
   
   


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 #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
prasad-alatkar commented on a change in pull request #777: nimble/host: Clear 
master and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396568391
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -737,6 +737,30 @@ ble_gap_slave_reset_state(uint8_t instance)
 #endif
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_master_slave_reset_state(void)
+{
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+ble_gap_slave_reset_state(i);
+}
+#else
+ble_gap_slave_reset_state(0);
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
 
 Review comment:
   1. Yes, we should call ` ble_gap_disc_complete`, have made changes.
   2. Yes, however in `ble_hs_reset`, we also call `ble_gap_conn_broken` which 
ultimately calls GAP event `BLE_GAP_EVENT_DISCONNECT` to notify app. But I do 
understand, you want to cover the cases where  there may be `connection 
establishment procedure` and may not be any `active connection (established)`. 


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 #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
prasad-alatkar commented on a change in pull request #777: nimble/host: Clear 
master and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396553102
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -737,6 +737,30 @@ ble_gap_slave_reset_state(uint8_t instance)
 #endif
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_master_slave_reset_state(void)
+{
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+ble_gap_slave_reset_state(i);
 
 Review comment:
   Yes, we should, have made the changes.


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 #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
prasad-alatkar commented on a change in pull request #777: nimble/host: Clear 
master and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396552550
 
 

 ##
 File path: nimble/host/src/ble_gap_priv.h
 ##
 @@ -136,6 +136,7 @@ void ble_gap_preempt(void);
 void ble_gap_preempt_done(void);
 
 int ble_gap_terminate_with_conn(struct ble_hs_conn *conn, uint8_t hci_reason);
+void ble_gap_master_slave_reset_state(void);
 
 Review comment:
   Sure, but `ble_gap_reset_state` appears quite generic, doesn't 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-core] sjanc commented on issue #2246: newt upgrade failed - Error: usage: git rev-list [OPTION] ... [ -- paths... ]

2020-03-23 Thread GitBox
sjanc commented on issue #2246: newt upgrade failed - Error: usage: git 
rev-list [OPTION] ... [ -- paths... ]
URL: https://github.com/apache/mynewt-core/issues/2246#issuecomment-602595519
 
 
   Hi, this is probably due to broken escaping of "@" on windows. Please try 
with 1.7 (or 1.8-rc1) with newt upgrade --escape=true (or false)


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] utzig commented on issue #2245: STM32 Allow reboot to bootloader

2020-03-23 Thread GitBox
utzig commented on issue #2245: STM32 Allow reboot to bootloader
URL: https://github.com/apache/mynewt-core/pull/2245#issuecomment-602593613
 
 
   @kasjer This looks nice, I'm gonna try to test it this afternoon.


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 #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779#issuecomment-602579674
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/mesh/src/nodes.h
   
   
   ```diff
   @@ -19,5 +19,5 @@

struct bt_mesh_node *bt_mesh_node_find(u16_t addr);
struct bt_mesh_node *bt_mesh_node_alloc(u16_t addr, u8_t num_elem,
   -u16_t net_idx);
   +u16_t net_idx);
void bt_mesh_node_del(struct bt_mesh_node *node, bool store);
   ```
   
   


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 issue #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
sjanc commented on issue #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779#issuecomment-602575836
 
 
   @justinmclean could you have a look at this PR? If this is good I'll work on 
cleaning up core too


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 opened a new pull request #779: Fixes for 1.3 release

2020-03-23 Thread GitBox
sjanc opened a new pull request #779: Fixes for 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/779
 
 
   This fixes dates, license headers and NOTICE.


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] sjanc opened a new pull request #386: Fixes for 1.8 release

2020-03-23 Thread GitBox
sjanc opened a new pull request #386: Fixes for 1.8 release
URL: https://github.com/apache/mynewt-newt/pull/386
 
 
   Updates dates and removes no longer bundled vendor/ libraries from
   LICENSE file.


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-newtmgr] sjanc opened a new pull request #157: Fixes for 1.8 release

2020-03-23 Thread GitBox
sjanc opened a new pull request #157: Fixes for 1.8 release
URL: https://github.com/apache/mynewt-newtmgr/pull/157
 
 
   Updates dates and removes no longer bundled vendor/ libraries from
   LICENSE file.


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-blinky] sjanc opened a new pull request #14: Update dates in NOTICE

2020-03-23 Thread GitBox
sjanc opened a new pull request #14: Update dates in NOTICE
URL: https://github.com/apache/mynewt-blinky/pull/14
 
 
   


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] w277277w commented on issue #2246: newt upgrade failed - Error: usage: git rev-list [OPTION] ... [ -- paths... ]

2020-03-23 Thread GitBox
w277277w commented on issue #2246: newt upgrade failed - Error: usage: git 
rev-list [OPTION] ... [ -- paths... ]
URL: https://github.com/apache/mynewt-core/issues/2246#issuecomment-602534642
 
 
   @utzig Execute me, could you help me?


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 #2247: bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE

2020-03-23 Thread GitBox
apache-mynewt-bot commented on issue #2247: bsp/native: Don't use deprecated 
BASELIBC_ASSERT_FILE_LINE
URL: https://github.com/apache/mynewt-core/pull/2247#issuecomment-602482491
 
 
   
   
   
   ## 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] sjanc opened a new pull request #2247: bsp/native: Don't use deprecated BASELIBC_ASSERT_FILE_LINE

2020-03-23 Thread GitBox
sjanc opened a new pull request #2247: bsp/native: Don't use deprecated 
BASELIBC_ASSERT_FILE_LINE
URL: https://github.com/apache/mynewt-core/pull/2247
 
 
   Use OS_CRASH_FILE_LINE instead to avoid following message:
   
   Override of defunct settings detected:
   BASELIBC_ASSERT_FILE_LINE: Use OS_CRASH_FILE_LINE instead
   
   Setting history (newest -> oldest):
   BASELIBC_ASSERT_FILE_LINE: [@apache-mynewt-core/hw/bsp/native:1,
   @apache-mynewt-core/libc/baselibc: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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
rymanluk commented on a change in pull request #777: nimble/host: Clear master 
and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396301225
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -737,6 +737,30 @@ ble_gap_slave_reset_state(uint8_t instance)
 #endif
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_master_slave_reset_state(void)
+{
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+ble_gap_slave_reset_state(i);
+}
+#else
+ble_gap_slave_reset_state(0);
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
 
 Review comment:
   For the master role, imho we need bit more:
   1) when BLE_GAP_OP_M_DISC is ongoing, we need to call  
ble_gap_disc_complete()
   2) when BLE_GAP_OP_M_CONN is ongoing we probably should call 
ble_gap_master_connect_failure()


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] rymanluk commented on a change in pull request #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
rymanluk commented on a change in pull request #777: nimble/host: Clear master 
and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396291147
 
 

 ##
 File path: nimble/host/src/ble_gap_priv.h
 ##
 @@ -136,6 +136,7 @@ void ble_gap_preempt(void);
 void ble_gap_preempt_done(void);
 
 int ble_gap_terminate_with_conn(struct ble_hs_conn *conn, uint8_t hci_reason);
+void ble_gap_master_slave_reset_state(void);
 
 Review comment:
   just a nit pick - I would call it ble_gap_reset_state(void).


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] rymanluk commented on a change in pull request #777: nimble/host: Clear master and slave states on host reset

2020-03-23 Thread GitBox
rymanluk commented on a change in pull request #777: nimble/host: Clear master 
and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r396296255
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -737,6 +737,30 @@ ble_gap_slave_reset_state(uint8_t instance)
 #endif
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_master_slave_reset_state(void)
+{
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+ble_gap_slave_reset_state(i);
 
 Review comment:
   Imho we should call ble_gap_adv_finished() as well so the app will get 
information about stopped advertising.


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