[GitHub] [mynewt-mcumgr] mlaz opened a new pull request #75: omp_svr: Change the stack size to 568

2020-03-25 Thread GitBox
mlaz opened a new pull request #75: omp_svr: Change the stack size to 568
URL: https://github.com/apache/mynewt-mcumgr/pull/75
 
 
   omp_svr had the same problem as described on 
https://github.com/apache/mynewt-mcumgr/pull/59 for smp_svr. This PR increases 
the stack size to 568 since the stack was overflowing by 90 bytes in this case.


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: Increase omp_svr sample main stack size

2020-03-25 Thread mlaz
This is an automated email from the ASF dual-hosted git repository.

mlaz 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 d51bff0  Increase omp_svr sample main stack size
 new f0f2bc3  Merge pull request #75 from mlaz/omp_sample_fix
d51bff0 is described below

commit d51bff0aeeca2486073d64df2a4af76d787bc497
Author: Miguel Azevedo 
AuthorDate: Wed Mar 25 18:16:23 2020 +

Increase omp_svr sample main stack size
---
 samples/omp_svr/mynewt/syscfg.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/omp_svr/mynewt/syscfg.yml 
b/samples/omp_svr/mynewt/syscfg.yml
index 1c35a78..8336eda 100644
--- a/samples/omp_svr/mynewt/syscfg.yml
+++ b/samples/omp_svr/mynewt/syscfg.yml
@@ -35,7 +35,7 @@ syscfg.vals:
 CONFIG_MGMT: 1
 
 # OS main/default task
-OS_MAIN_STACK_SIZE: 468
+OS_MAIN_STACK_SIZE: 568
 
 # Lots of smaller mbufs are required for smp using typical BLE ATT MTU
 # values.



[GitHub] [mynewt-mcumgr] mlaz merged pull request #75: omp_svr: Change the stack size to 568

2020-03-25 Thread GitBox
mlaz merged pull request #75: omp_svr: Change the stack size to 568
URL: https://github.com/apache/mynewt-mcumgr/pull/75
 
 
   


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] ccollins476ad opened a new pull request #388: upgrade: Don't abort if repo references bad commit

2020-03-25 Thread GitBox
ccollins476ad opened a new pull request #388: upgrade: Don't abort if repo 
references bad commit
URL: https://github.com/apache/mynewt-newt/pull/388
 
 
   Newt would abort the upgrade if a repo's dependency list specifies a 
nonexistent commit.  This was bad because it means a repo maintainer could 
break `newt upgrade` for all users by deleting a tag or by introducing a typo 
to their `repository.yml` file.
   
   Now newt just warns the user about the problem and proceeds with the upgrade.


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-newt] 02/02: Use rc-tag-inference in inter-repo dependencies

2020-03-25 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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

commit b8147e0284cf75765799a79f6ec0f57a49542a50
Author: Christopher Collins 
AuthorDate: Tue Mar 24 16:54:37 2020 -0700

Use rc-tag-inference in inter-repo dependencies

A repo can specify dependencies in its `repository.yml` file, e.g.,

repo.deps:
apache-mynewt-nimble:
type: github
user: apache
repo: mynewt-nimble
vers:
mynewt_1_4_0_tag: 1.0.0

The `mynewt_1_4_0_tag` tag of *this repo* depends on nimble 1.0.0.  If
`mynewt_1_4_0_tag` does not exist, then `newt upgrade` would fail.

The tag-validity check that newt was doing here was too strict.  If the
specified tag doesn't exist, newt should attempt rc-tag-inference.  For
example, if `mynewt_1_4_0_tag` does not exist, newt should check for the
latest corresponding rc tag (e.g., `mynewt_1_4_0_rc1_tag`).  If one is
found, then the dependency list is valid after all.

Newt already applies this rc-tag-inference procedure when it actually
performs the upgrade.  However, the check that happens before the
upgrade was not using rc-tag-inference.  This commit adds
rc-tag-inference to this check.
---
 newt/install/install.go | 5 +
 1 file changed, 5 insertions(+)

diff --git a/newt/install/install.go b/newt/install/install.go
index 5bc5f0c..c26e956 100644
--- a/newt/install/install.go
+++ b/newt/install/install.go
@@ -423,6 +423,11 @@ func (inst *Installer) calcVersionMap(candidates 
[]*repo.Repo) (
 
for _, r := range repoList {
for commit, _ := range r.CommitDepMap() {
+   commit, err := r.Downloader().LatestRc(r.Path(), commit)
+   if err != nil {
+   return nil, err
+   }
+
equiv, err := r.Downloader().CommitsFor(r.Path(), 
commit)
if err != nil {
return nil, err



[mynewt-newt] branch master updated (e73b109 -> b8147e0)

2020-03-25 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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


from e73b109  newt new: Infer latest "rc" tag for blinky
 new 2faa8ca  downloader: Return base commit if no rc tag
 new b8147e0  Use rc-tag-inference in inter-repo dependencies

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 newt/downloader/downloader.go | 11 ++-
 newt/install/install.go   |  5 +
 newt/repo/repo.go |  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)



[GitHub] [mynewt-newt] ccollins476ad merged pull request #387: Use rc-tag-inference in inter-repo dependencies

2020-03-25 Thread GitBox
ccollins476ad merged pull request #387: Use rc-tag-inference in inter-repo 
dependencies
URL: https://github.com/apache/mynewt-newt/pull/387
 
 
   


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 #782: Remove notification for update process timeout.

2020-03-25 Thread GitBox
apache-mynewt-bot commented on issue #782: Remove notification for update 
process timeout.
URL: https://github.com/apache/mynewt-nimble/pull/782#issuecomment-604091088
 
 
   
   
   
   ## 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 #783: Make ble_gap_rx_l2cap_update_req() behave like ble_gap_rx_param_req()

2020-03-25 Thread GitBox
apache-mynewt-bot 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-604091459
 
 
   
   
   
   ## 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 #783: Make ble_gap_rx_l2cap_update_req() behave like ble_gap_rx_param_req()

2020-03-25 Thread GitBox
apache-mynewt-bot removed a comment 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-603910393
 
 
   
   
   
   ## 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 #782: Remove notification for update process timeout.

2020-03-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #782: Remove notification for 
update process timeout.
URL: https://github.com/apache/mynewt-nimble/pull/782#issuecomment-603895830
 
 
   
   
   
   ## 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


[mynewt-newt] 01/02: downloader: Return base commit if no rc tag

2020-03-25 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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

commit 2faa8ca9b2670b724d396d7affd3b88d71d2b089
Author: Christopher Collins 
AuthorDate: Tue Mar 24 16:54:46 2020 -0700

downloader: Return base commit if no rc tag

downloader.LatestRc() infers the latest "rc" tag given a base string
(e.g., "mynewt_1_8_0_tag" might resolve to "mynewt_1_8_0_rc3_tag").

If there are no rc tags for the given base, this function used to return
"".  This is error prone and it requires the caller to stash the base
string until he has inspected the return value.

This commit changes this function so that it returns the base string
unmodified if there are no rc tags.
---
 newt/downloader/downloader.go | 11 ++-
 newt/repo/repo.go |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/newt/downloader/downloader.go b/newt/downloader/downloader.go
index 506b798..2230db1 100644
--- a/newt/downloader/downloader.go
+++ b/newt/downloader/downloader.go
@@ -728,14 +728,11 @@ func (gd *GenericDownloader) LatestRc(path string,
 
notag := strings.TrimSuffix(base, "_tag")
if notag == base {
-   return "", nil
+   return base, nil
}
 
restr := fmt.Sprintf("^%s_rc(\\d+)_tag$", regexp.QuoteMeta(notag))
-   re, err := regexp.Compile(restr)
-   if err != nil {
-   return "", util.FmtNewtError("internal error: %s", err.Error())
-   }
+   re := regexp.MustCompile(restr)
 
bestNum := -1
bestStr := ""
@@ -750,6 +747,10 @@ func (gd *GenericDownloader) LatestRc(path string,
}
}
 
+   if bestStr == "" {
+   bestStr = base
+   }
+
return bestStr, nil
 }
 
diff --git a/newt/repo/repo.go b/newt/repo/repo.go
index 0770c90..5f1ccce 100644
--- a/newt/repo/repo.go
+++ b/newt/repo/repo.go
@@ -291,7 +291,7 @@ func (r *Repo) updateRepo(commit string) error {
"Error updating \"%s\": %s", r.Name(), 
err.Error())
}
 
-   if newCommit != "" {
+   if newCommit != commit {
util.StatusMessage(util.VERBOSITY_DEFAULT,
"in repo \"%s\": commit \"%s\" does not exist; 
"+
"using \"%s\" instead\n",



[GitHub] [mynewt-nimble] zacwbond opened a new pull request #783: Make ble_gap_rx_l2cap_update_req() behave like ble_gap_rx_param_req()

2020-03-25 Thread GitBox
zacwbond opened a new pull request #783: Make ble_gap_rx_l2cap_update_req() 
behave like ble_gap_rx_param_req()
URL: https://github.com/apache/mynewt-nimble/pull/783
 
 
   `BLE_GAP_EVENT_L2CAP_UPDATE_REQ` and `BLE_GAP_EVENT_CONN_UPDATE_REQ` share 
the same `conn_update_req` event structure when they are sent to the 
application callback, but they do not behave the same way.  
   
   `ble_gap_rx_param_req()` creates a self_params, allowing the application to 
adjust the parameters to something acceptable.  `ble_gap_rx_l2cap_update_req()` 
just leaves the `self_params` structure NULL and otherwise ignores it.  Now 
they both behave in the same way.
   
   In my specific case, the ESP32 platform I am using crashes if I don't 
enforce a specific set of parameters when multiple peripherals connect.  Since 
the peripherals use the L2CAP method to make the request, this change 
eliminates the crash.
   
   
   


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 #2249: Fixes for 1.8.0 release

2020-03-25 Thread GitBox
sjanc opened a new pull request #2249: Fixes for 1.8.0 release
URL: https://github.com/apache/mynewt-core/pull/2249
 
 
   Mostly license cleanups.


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-25 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_r397868096
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(0, reason, 0, 0);
+}
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
 
 Review comment:
   sorry for that, 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] zacwbond closed pull request #781: Make connection update process timeout variable

2020-03-25 Thread GitBox
zacwbond closed pull request #781: Make connection update process timeout 
variable
URL: https://github.com/apache/mynewt-nimble/pull/781
 
 
   


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

2020-03-25 Thread GitBox
zacwbond commented on issue #781: Make connection update process timeout 
variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-603877487
 
 
   Closing because I mangled my forks somehow.  Will re-open momentarily.


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 #783: Make ble_gap_rx_l2cap_update_req() behave like ble_gap_rx_param_req()

2020-03-25 Thread GitBox
apache-mynewt-bot 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-603910393
 
 
   
   
   
   ## 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] rymanluk commented on issue #781: Make connection update process timeout variable

2020-03-25 Thread GitBox
rymanluk commented on issue #781: Make connection update process timeout 
variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-603830429
 
 
   @zacwbond could you update your PR so it implements a) ?
   
   the other problem you mentioned is something with your controller I believe.


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-25 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_r397856732
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(0, reason, 0, 0);
+}
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
+if (ble_gap_disc_active()) {
+ble_gap_disc_complete();
+} else if (ble_gap_conn_active()) {
+ble_gap_master_failed(reason);
 
 Review comment:
   Ok !!


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-25 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_r397813313
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
 
 Review comment:
   I don't think we need to call that as this is called later in 
`ble_gap_adv_finished() 
->ble_gap_slave_extract_cb()->ble_gap_slave_reset_state()`


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-25 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_r397811581
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(0, reason, 0, 0);
+}
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
+if (ble_gap_disc_active()) {
+ble_gap_disc_complete();
+} else if (ble_gap_conn_active()) {
+ble_gap_master_failed(reason);
 
 Review comment:
   hmm when you look inside ` ble_gap_master_failed`  function, there is a 
switch.  Maybe it is worth to add there case for `BLE_GAP_OP_M_DISC` and then 
call that function? I would also add there `ble_gap_master_reset_state()`


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-25 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_r397814492
 
 

 ##
 File path: nimble/host/src/ble_hs.c
 ##
 @@ -376,18 +375,12 @@ ble_hs_reset(void)
 
 ble_hs_clear_rx_queue();
 
-while (1) {
-conn_handle = ble_hs_atomic_first_conn_handle();
-if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
-break;
-}
-
-ble_gap_conn_broken(conn_handle, ble_hs_reset_reason);
-}
-
 /* Clear configured addresses. */
 ble_hs_id_reset();
 
+/* Clear adverising and scanning states. */
+ble_gap_reset_state(ble_hs_reset_reason);
 
 Review comment:
   I would call it before the `ble_hs_id_reset()`. It probably will change 
nothing, but since before we were calling `ble_gap_conn_broken()` before that I 
don't see a reason to change that.
   
   


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 #2249: Fixes for 1.8.0 release

2020-03-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2249: Fixes for 1.8.0 release
URL: https://github.com/apache/mynewt-core/pull/2249#issuecomment-603852521
 
 
   
   
   
   ## 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 commented on issue #2249: Fixes for 1.8.0 release

2020-03-25 Thread GitBox
apache-mynewt-bot commented on issue #2249: Fixes for 1.8.0 release
URL: https://github.com/apache/mynewt-core/pull/2249#issuecomment-603857719
 
 
   
   
   
   ## 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-25 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-603856849
 
 
   
   
   
   ## 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 #777: nimble/host: Clear master and slave states on host reset

2020-03-25 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-603425856
 
 
   
   
   
   ## 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] zacwbond opened a new pull request #782: Remove notification for update process timeout.

2020-03-25 Thread GitBox
zacwbond opened a new pull request #782: Remove notification for update process 
timeout.
URL: https://github.com/apache/mynewt-nimble/pull/782
 
 
   (This addresses issue #780, just like PR #781, which was closed due to some 
repo juggling on my end.)
   
   From the original
   
   > 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.  
   
   Based on @rymanluk's  comments to that PR, I have reduced the change to 
keeping the 40s timeout, but simply not posting an event should a timeout occur.
   


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 #782: Remove notification for update process timeout.

2020-03-25 Thread GitBox
apache-mynewt-bot commented on issue #782: Remove notification for update 
process timeout.
URL: https://github.com/apache/mynewt-nimble/pull/782#issuecomment-603895830
 
 
   
   
   
   ## 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] prasad-alatkar commented on a change in pull request #777: nimble/host: Clear master and slave states on host reset

2020-03-25 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_r397856412
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
 
 Review comment:
   Yes !! 


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-25 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_r397856466
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
 
 Review comment:
   Yes !! 


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-25 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_r397856548
 
 

 ##
 File path: nimble/host/src/ble_hs.c
 ##
 @@ -376,18 +375,12 @@ ble_hs_reset(void)
 
 ble_hs_clear_rx_queue();
 
-while (1) {
-conn_handle = ble_hs_atomic_first_conn_handle();
-if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
-break;
-}
-
-ble_gap_conn_broken(conn_handle, ble_hs_reset_reason);
-}
-
 /* Clear configured addresses. */
 ble_hs_id_reset();
 
+/* Clear adverising and scanning states. */
+ble_gap_reset_state(ble_hs_reset_reason);
 
 Review comment:
   > It probably will change nothing
   
   Had the same though in mind :smile: will make 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-core] sjanc merged pull request #2249: Fixes for 1.8.0 release

2020-03-25 Thread GitBox
sjanc merged pull request #2249: Fixes for 1.8.0 release
URL: https://github.com/apache/mynewt-core/pull/2249
 
 
   


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 1_8_0_dev updated: Fixes for 1.8.0 release

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

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


The following commit(s) were added to refs/heads/1_8_0_dev by this push:
 new f4cdd89  Fixes for 1.8.0 release
f4cdd89 is described below

commit f4cdd8926b3b71ee8477e7fadb1c07c076411ab5
Author: Szymon Janc 
AuthorDate: Wed Mar 25 14:36:54 2020 +0100

Fixes for 1.8.0 release

Mostly license cleanups.
---
 .rat-excludes   |  98 +++
 LICENSE | 391 ++--
 NOTICE  |   2 +-
 fs/fatfs/src/option/unicode.c   |  17 --
 hw/mcu/nxp/MK64F12/include/mcu/cmsis_nvic.h |  19 --
 hw/mcu/nxp/mkw41z/include/mcu/cmsis_nvic.h  |  19 +-
 net/oic/include/oic/port/mynewt/config.h|  19 ++
 7 files changed, 374 insertions(+), 191 deletions(-)

diff --git a/.rat-excludes b/.rat-excludes
index e37d942..6b01dcf 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -23,43 +23,15 @@ bin
 # CRC16 - BSD License.
 crc16.*
 
-# Nordic nRF51 SDK - BSD License.
-nrf51dk_no_boot.ld
+
+# Nordic nRF5 SDK - BSD License.
 system_nrf51.c
 gcc_startup_nrf51.s
-nrf51dk-16kbram_no_boot.ld
-boot-nrf51xxaa.ld
-nrf51xxaa.ld
-boot-nrf51xxac.ld
-nrf51xxac.ld
-split-nrf51dk.ld
-boot-nrf51xxac.ld
-nrf51xxac.ld
-split-nrf51dk.ld
-split-nrf51dk-16kbram.ld
-nrf51.ld
 nrf51.h
 nrf51_bitfields.h
 nrf51_deprecated.h
 system_nrf51.h
 gcc_startup_nrf51_split.s
-
-# Nordic nRF52 SDK - BSD License.
-nrf52dk_no_boot.ld
-bmd300eval_no_boot.ld
-boot-nrf52xxaa.ld
-nrf52xxaa.ld
-primo_no_boot.ld
-split-primo.ld
-split-bmd300eval.ld
-split-nrf52dk.ld
-rb-nano2_no_boot.ld
-split-rb-nano2.ld
-nrf52.ld
-nrf52_ram_resident.ld
-ada_feather_nrf52_no_boot.ld
-split_ada_feather_nrf52.ld
-split-microbit.ld
 system_nrf52.c
 gcc_startup_nrf52.s
 nrf51_to_nrf52.h
@@ -75,9 +47,6 @@ nrf52840_peripherals.h
 nrf52_to_nrf52840.h
 system_nrf52840.c
 system_nrf52840.h
-
-# Nordic nRF51 SDK - BSD License.
-# Nordic nRF52 SDK - BSD License.
 compiler_abstraction.h
 nrf.h
 nrf52_name_change.h
@@ -88,15 +57,38 @@ uicr_config.h
 iar_startup_nrf51.s
 iar_startup_nrf52.s
 
-# Nordic BLE400 SDK - BSD License
+# Linker scripts for Nordics nRF5X - TCL license
+nrf51dk_no_boot.ld
+nrf51dk-16kbram_no_boot.ld
+boot-nrf51xxaa.ld
+nrf51xxaa.ld
+boot-nrf51xxac.ld
+nrf51xxac.ld
+split-nrf51dk.ld
+boot-nrf51xxac.ld
+nrf51xxac.ld
+split-nrf51dk.ld
+split-nrf51dk-16kbram.ld
+nrf51.ld
+nrf52dk_no_boot.ld
+bmd300eval_no_boot.ld
+boot-nrf52xxaa.ld
+nrf52xxaa.ld
+primo_no_boot.ld
+split-primo.ld
+split-bmd300eval.ld
+split-nrf52dk.ld
+rb-nano2_no_boot.ld
+split-rb-nano2.ld
+nrf52.ld
+nrf52_ram_resident.ld
+ada_feather_nrf52_no_boot.ld
+split_ada_feather_nrf52.ld
+split-microbit.ld
 ble400_no_boot.ld
 split-ble400.ld
-
-# Nordic nRF52 Thingy SDK - BSD License
 nrf52-thingy_no_boot.ld
 split-nrf52-thingy.ld
-
-# Nordic SDK - BSD License
 nordic_pca10028_no_boot.ld
 split-nordic_pca10028.ld
 nordic_pca10028-16k_no_boot.ld
@@ -107,22 +99,21 @@ nordic_pca10056_no_boot.ld
 split-nordic_pca10056.ld
 nordic_pca20020_no_boot.ld
 split-nordic_pca20020.ld
-
-# RedBear Blend2 SDK - BSD License
 rb-blend2_no_boot.ld
 split-rb-blend2.ld
-
-# Telenor ee02 SDK - BSD License
 split-telee02.ld
 telee02_no_boot.ld
-
-# VBLUno51 board - BSD License
 split-vbluno51.ld
 vbluno51_no_boot.ld
-
-# VBLUno52 board - BSD License
 split-vbluno52.ld
 vbluno52_no_boot.ld
+apollo2.ld
+dwm1001-dev_no_boot.ld
+split-dwm1001-dev.ld
+fanstel-ev-bt840_no_boot.ld
+split-fanstel-ev-bt840.ld
+puckjs_no_boot.ld
+split_puckjs.ld
 
 # STM32 HAL - BSD License
 stm32_driver_mod_i2c_v1.c
@@ -433,9 +424,6 @@ system_apollo2.h
 system_apollo2.c
 apollo_nvic.h
 
-# Apollo2 linker script - MIT License
-apollo2.ld
-
 # CMSIS Cortex-M4, STM32f3 - BSD License.
 STM32F3xx
 STM32F3xx_HAL_Driver
@@ -469,17 +457,9 @@ stm32f1xx
 arc
 embarc_emsk
 
-# DWM1001 - BSD Licence
-dwm1001-dev_no_boot.ld
-split-dwm1001-dev.ld
-
 # olimex-p103 - BSD and APL 2.0 License
 olimex-p103
 
-# puckjs - BSD License
-puckjs_no_boot.ld
-split_puckjs.ld
-
 # STM32L0xx SDK - BSD License
 stm32l0xx
 
@@ -489,10 +469,6 @@ stm32l4xx
 # STM32WBxx SDK - BSD License
 stm32wbxx
 
-# Fanstel EVBT840 BSP linker scripts - BSD License
-fanstel-ev-bt840_no_boot.ld
-split-fanstel-ev-bt840.ld
-
 # B-L072Z-LRWAN1 BSP - BSD License
 b-l072z-lrwan1
 
diff --git a/LICENSE b/LICENSE
index 0e38eda..9320abb 100644
--- a/LICENSE
+++ b/LICENSE
@@ -230,88 +230,219 @@ license.  For details, see encoding/json/
 
 This product bundles and partly derives from parts of the Nordic nRF52 SDK,
 which are available under a BSD style license.  Relevant files are:
-* hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51.s
-* hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51_split.s
-* hw/bsp/nrf52840pdk/src/arch/cortex_m4/gcc_startup_nrf52840.s
-* 

[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2249: Fixes for 1.8.0 release

2020-03-25 Thread GitBox
apache-mynewt-bot commented on issue #2249: Fixes for 1.8.0 release
URL: https://github.com/apache/mynewt-core/pull/2249#issuecomment-603852521
 
 
   
   
   
   ## 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-mcumgr] de-nordic edited a comment on issue #74: zephyr: TinyCBOR has been removed from interface libraries

2020-03-25 Thread GitBox
de-nordic edited a comment on issue #74: zephyr: TinyCBOR has been removed from 
interface libraries
URL: https://github.com/apache/mynewt-mcumgr/pull/74#issuecomment-603649377
 
 
   @utzig Please 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-mcumgr] de-nordic commented on issue #74: zephyr: TinyCBOR has been removed from interface libraries

2020-03-25 Thread GitBox
de-nordic commented on issue #74: zephyr: TinyCBOR has been removed from 
interface libraries
URL: https://github.com/apache/mynewt-mcumgr/pull/74#issuecomment-603733231
 
 
   Thank you.


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] utzig merged pull request #74: zephyr: TinyCBOR has been removed from interface libraries

2020-03-25 Thread GitBox
utzig merged pull request #74: zephyr: TinyCBOR has been removed from interface 
libraries
URL: https://github.com/apache/mynewt-mcumgr/pull/74
 
 
   


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: zephyr: TinyCBOR has been removed from interface libraries

2020-03-25 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig 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 f3b171f  zephyr: TinyCBOR has been removed from interface libraries
f3b171f is described below

commit f3b171f2d6d50b0b696f1307bb18e748727fbc80
Author: Dominik Ermel 
AuthorDate: Thu Mar 19 10:46:01 2020 +

zephyr: TinyCBOR has been removed from interface libraries

It is no longer needed to add TINYCBOR to list of interface libraries.

Signed-off-by: Dominik Ermel 
---
 CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f22638e..bf86461 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,6 @@ zephyr_library_link_libraries(MCUMGR)
 
 target_link_libraries(MCUMGR INTERFACE
   zephyr_interface
-  TINYCBOR
   )
 
 endif()



[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2248: BMP388 license fix

2020-03-25 Thread GitBox
apache-mynewt-bot commented on issue #2248: BMP388 license fix
URL: https://github.com/apache/mynewt-core/pull/2248#issuecomment-603694488
 
 
   
   
   
   ## 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 #2248: BMP388 license fix

2020-03-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2248: BMP388 license fix
URL: https://github.com/apache/mynewt-core/pull/2248#issuecomment-603206054
 
 
   
   
   
   ## 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


[mynewt-core] branch 1_8_0_dev updated: hw/drivers: Fix BMP388 license issues

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

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


The following commit(s) were added to refs/heads/1_8_0_dev by this push:
 new c27c381  hw/drivers: Fix BMP388 license issues
c27c381 is described below

commit c27c381d052ea792141aaa5f7106ff5d3fcc4ab2
Author: Szymon Janc 
AuthorDate: Tue Mar 24 12:30:36 2020 +0100

hw/drivers: Fix BMP388 license issues

This driver is released under BSD-3.
---
 .rat-excludes |   3 +
 LICENSE   |   4 +
 hw/drivers/sensors/bmp388/include/bmp388/bmp388.h |  57 
 hw/drivers/sensors/bmp388/src/bmp388.c| 100 --
 hw/drivers/sensors/bmp388/src/bmp388_priv.h   |  96 -
 hw/drivers/sensors/bmp388/src/bmp388_shell.c  | 100 --
 6 files changed, 155 insertions(+), 205 deletions(-)

diff --git a/.rat-excludes b/.rat-excludes
index 165f36d..e37d942 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -512,3 +512,6 @@ reel_board
 dialog_da1469x-dk-pro
 da1469x
 DA1469xAB.h
+
+# Bosch BMP388 driver - BSD License
+bmp388
diff --git a/LICENSE b/LICENSE
index 8d8a09b..0e38eda 100644
--- a/LICENSE
+++ b/LICENSE
@@ -442,3 +442,7 @@ under the Apache License v2.0. Bundled files are:
 This product bundles part of embARC BSP SDK by Synopsys, which is available
 under the "3-clause BSD" license. Bundled files are:
 * hw/mcu/arc/src/ext/sdk
+
+This products bundles BMP388 driver by Bosch Sensortec GmbH , which is 
available
+under the "3-clause BSD" license. For details, see:
+* hw/drivers/sensors/bmp388
diff --git a/hw/drivers/sensors/bmp388/include/bmp388/bmp388.h 
b/hw/drivers/sensors/bmp388/include/bmp388/bmp388.h
index e7b58b3..41b8f94 100644
--- a/hw/drivers/sensors/bmp388/include/bmp388/bmp388.h
+++ b/hw/drivers/sensors/bmp388/include/bmp388/bmp388.h
@@ -1,21 +1,42 @@
-/*
-* 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
-* resarding 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.
-*/
+/**\mainpage
+ * Copyright (C) 2017 - 2019 Bosch Sensortec GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of the
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ * File   bmp388.h
+ * Date   10 May 2019
+ * Version   1.0.2
+ *
+ */
+
 #ifndef __BMP388_H__
 #define __BMP388_H__
 
diff --git a/hw/drivers/sensors/bmp388/src/bmp388.c 
b/hw/drivers/sensors/bmp388/src/bmp388.c
index faa06fa..412f6b9 100644
--- a/hw/drivers/sensors/bmp388/src/bmp388.c
+++ b/hw/drivers/sensors/bmp388/src/bmp388.c
@@ -1,67 +1,41 @@
-/*
-* 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
-* resarding copyright 

[GitHub] [mynewt-core] sjanc merged pull request #2248: BMP388 license fix

2020-03-25 Thread GitBox
sjanc merged pull request #2248: BMP388 license fix
URL: https://github.com/apache/mynewt-core/pull/2248
 
 
   


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-25 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_r397813459
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
 
 Review comment:
   I don't think we need to call that as this is called later in 
ble_gap_adv_finished() ->ble_gap_slave_extract_cb()->ble_gap_slave_reset_state()


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-25 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_r397808408
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -1237,6 +1237,53 @@ ble_gap_adv_active_instance(uint8_t instance)
 return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
 }
 
+/**
+ * Clears advertisement and discovery state.  This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+uint16_t conn_handle;
+
+while (1) {
+conn_handle = ble_hs_atomic_first_conn_handle();
+if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+break;
+}
+
+ble_gap_conn_broken(conn_handle, reason);
+}
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+uint8_t i;
+for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+if (ble_gap_adv_active_instance(i)) {
+ble_gap_slave_reset_state(i);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(i, reason, 0, 0);
+}
+}
+#else
+if (ble_gap_adv_active_instance(0)) {
+ble_gap_slave_reset_state(0);
+/* Indicate to application that advertising has stopped. */
+ble_gap_adv_finished(0, reason, 0, 0);
+}
+#endif
+#endif
+
+#if NIMBLE_BLE_SCAN
+ble_gap_master_reset_state();
 
 Review comment:
   this will reset state before we check it below


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