[GitHub] [mynewt-core] InternetofAwesome edited a comment on issue #1582: use float instead of double

2020-04-09 Thread GitBox
InternetofAwesome edited a comment on issue #1582: use float instead of double
URL: https://github.com/apache/mynewt-core/pull/1582#issuecomment-611877764
 
 
   @ccollins476ad 
   This issue should definitely be addressed one way or the other. As the code 
exists right now, it pulls in a few unnecessary double software functions that 
would not be compiled in with these changes.
   That said, this code was not written with any use case other than my own in 
mind - For the use case of having a single-precision FPU, this is appropriate, 
as the only double function that gets compiled in as a result is the function 
to convert double to float.


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] InternetofAwesome commented on issue #1582: use float instead of double

2020-04-09 Thread GitBox
InternetofAwesome commented on issue #1582: use float instead of double
URL: https://github.com/apache/mynewt-core/pull/1582#issuecomment-611877764
 
 
   This issue should definitely be addressed one way or the other. As the code 
exists right now, it pulls in a few unnecessary double software functions that 
would not be compiled in with these changes.
   That said, this code was not written with any use case other than my own in 
mind - For the use case of having a single-precision FPU, this is appropriate, 
as the only double function that gets compiled in as a result is the function 
to convert double to float.


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] jacobrosenthal closed pull request #1285: move sensor_itf to driver_itf WIP please evaluate

2020-04-09 Thread GitBox
jacobrosenthal closed pull request #1285: move sensor_itf to driver_itf WIP 
please evaluate
URL: https://github.com/apache/mynewt-core/pull/1285
 
 
   


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 (d89f581 -> c69afe0)

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

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


from d89f581  Fix license headers in hw/drivers/display
 new 53fcd3a  shell_bridge: update to be used with mcumgr
 new f3abe52  imgmgr_cli: Update imgr to work with "shell exec"
 new 3846e1b  imgmgr_cli: Remove console.h, no longer needed
 new c69afe0  Merge pull request #2263 from vrahane/newtmgr_shell_exec

The 9585 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:
 mgmt/imgmgr/src/imgmgr_cli.c | 65 +---
 sys/shell/src/shell_bridge.c | 25 -
 2 files changed, 43 insertions(+), 47 deletions(-)



[GitHub] [mynewt-core] vrahane merged pull request #2263: shell_bridge: update to be used with mcumgr, update imgmgr cli to be used with shell_bridge

2020-04-09 Thread GitBox
vrahane merged pull request #2263: shell_bridge: update to be used with mcumgr, 
update imgmgr cli to be used with shell_bridge
URL: https://github.com/apache/mynewt-core/pull/2263
 
 
   


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] vrahane merged pull request #76: mgmt: Add shell mgmt ID from mynewt-core

2020-04-09 Thread GitBox
vrahane merged pull request #76: mgmt: Add shell mgmt ID from mynewt-core
URL: https://github.com/apache/mynewt-mcumgr/pull/76
 
 
   


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: mgmt: Add shell mgmt ID from mynewt-core (#76)

2020-04-09 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-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
 new 7cd8b9f  mgmt: Add shell mgmt ID from mynewt-core (#76)
7cd8b9f is described below

commit 7cd8b9fa3f726fb4649fddf73e348c492b4e0f8d
Author: Vipul Rahane 
AuthorDate: Thu Apr 9 11:40:13 2020 -0700

mgmt: Add shell mgmt ID from mynewt-core (#76)

- This was not transitioned when forking off
---
 mgmt/include/mgmt/mgmt.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mgmt/include/mgmt/mgmt.h b/mgmt/include/mgmt/mgmt.h
index 66d8c45..7ad22df 100644
--- a/mgmt/include/mgmt/mgmt.h
+++ b/mgmt/include/mgmt/mgmt.h
@@ -49,6 +49,7 @@ extern "C" {
 #define MGMT_GROUP_ID_SPLIT 6
 #define MGMT_GROUP_ID_RUN   7
 #define MGMT_GROUP_ID_FS8
+#define MGMT_GROUP_ID_SHELL 9
 #define MGMT_GROUP_ID_PERUSER   64
 
 /**



[GitHub] [mynewt-core] ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build with GCC 9.2.1

2020-04-09 Thread GitBox
ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build 
with GCC 9.2.1
URL: https://github.com/apache/mynewt-core/pull/2133#discussion_r406319295
 
 

 ##
 File path: sys/stats/full/src/stats.c
 ##
 @@ -96,13 +92,24 @@ stats_size(const struct stats_hdr *hdr)
 return hdr->s_cnt * hdr->s_size;
 }
 
-void *
-stats_data(const struct stats_hdr *hdr)
+const void *
+stats_data_ro(const struct stats_hdr *hdr)
 {
-size_t offset;
+if (hdr->s_flags & STATS_HDR_F_PERSIST) {
+return &((const struct stats_persisted_hdr *)hdr)->data[0];
+} else {
+return >data[0];
+}
+}
 
-offset = stats_offset(hdr);
-return (uint8_t *)hdr + offset;
+void *
+stats_data_rw(struct stats_hdr *hdr)
+{
+if (hdr->s_flags & STATS_HDR_F_PERSIST) {
+return &((struct stats_persisted_hdr *)hdr)->data[0];
+} else {
+return >data[0];
+}
 
 Review comment:
   You might consider implementing this in terms of `stats_data_ro`.  If the 
stats object is not actually const (i.e., not actually located in read-only 
memory), then it is safe to cast away const from the result of `stats_data_ro` 
and return that.
   
   I don't feel strongly about this at all.  Just throwing it out there.


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] ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build with GCC 9.2.1

2020-04-09 Thread GitBox
ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build 
with GCC 9.2.1
URL: https://github.com/apache/mynewt-core/pull/2133#discussion_r406312014
 
 

 ##
 File path: sys/stats/full/include/stats/stats.h
 ##
 @@ -48,6 +48,7 @@ struct stats_hdr {
 int s_map_cnt;
 #endif
 STAILQ_ENTRY(stats_hdr) s_next;
+uint8_t data[0];
 
 Review comment:
   The C standard prohibits zero-length arrays (gcc allows them as an 
extension).  The pedantically correct way to do this is to use a "flexible 
array member", i.e.,
   ```
   uint8_t data[]
   ```


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] ccollins476ad commented on issue #2098: [WIP] sensors/lsm303dlhc: Add bus driver support

2020-04-09 Thread GitBox
ccollins476ad commented on issue #2098: [WIP] sensors/lsm303dlhc: Add bus 
driver support
URL: https://github.com/apache/mynewt-core/pull/2098#issuecomment-611608628
 
 
   @kasjer should this PR stay open or is it no longer needed?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] ccollins476ad closed pull request #2084: [WIP - DO NOT MERGE] encoding/tinycbor: Break up cbor header

2020-04-09 Thread GitBox
ccollins476ad closed pull request #2084: [WIP - DO NOT MERGE] 
encoding/tinycbor: Break up cbor header
URL: https://github.com/apache/mynewt-core/pull/2084
 
 
   


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] ccollins476ad commented on issue #2084: [WIP - DO NOT MERGE] encoding/tinycbor: Break up cbor header

2020-04-09 Thread GitBox
ccollins476ad commented on issue #2084: [WIP - DO NOT MERGE] encoding/tinycbor: 
Break up cbor header
URL: https://github.com/apache/mynewt-core/pull/2084#issuecomment-611608253
 
 
   It looks like everyone agrees this should be closed.


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] ccollins476ad closed pull request #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager

2020-04-09 Thread GitBox
ccollins476ad closed pull request #1783: Modified the nRF5x timer and system 
init code to use the nRF HFXO manager
URL: https://github.com/apache/mynewt-core/pull/1783
 
 
   


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] ccollins476ad commented on issue #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1783: Modified the nRF5x timer and system 
init code to use the nRF HFXO manager
URL: https://github.com/apache/mynewt-core/pull/1783#issuecomment-611607966
 
 
   Closing this as development seems to have stalled.  Please reopen if this is 
still being worked on.


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] ccollins476ad closed pull request #1582: use float instead of double

2020-04-09 Thread GitBox
ccollins476ad closed pull request #1582: use float instead of double
URL: https://github.com/apache/mynewt-core/pull/1582
 
 
   


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] ccollins476ad commented on issue #1582: use float instead of double

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1582: use float instead of double
URL: https://github.com/apache/mynewt-core/pull/1582#issuecomment-611607607
 
 
   Closing this as development seems to have stalled.  Please reopen if this is 
still being worked on.


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] ccollins476ad commented on issue #1472: flash_map; add flash_area_to_subareas().

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1472: flash_map; add flash_area_to_subareas().
URL: https://github.com/apache/mynewt-core/pull/1472#issuecomment-611606748
 
 
   These changes look to be obsolete.  Please reopen as needed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] ccollins476ad closed pull request #1472: flash_map; add flash_area_to_subareas().

2020-04-09 Thread GitBox
ccollins476ad closed pull request #1472: flash_map; add 
flash_area_to_subareas().
URL: https://github.com/apache/mynewt-core/pull/1472
 
 
   


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] ccollins476ad commented on issue #1449: Padded log timestamps

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1449: Padded log timestamps
URL: https://github.com/apache/mynewt-core/pull/1449#issuecomment-611606315
 
 
   It sounds like this change is no longer needed.  Please reopen if I have 
misunderstood.


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] ccollins476ad closed pull request #1449: Padded log timestamps

2020-04-09 Thread GitBox
ccollins476ad closed pull request #1449: Padded log timestamps
URL: https://github.com/apache/mynewt-core/pull/1449
 
 
   


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] ccollins476ad commented on issue #1353: Ucifi changes

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1353: Ucifi changes
URL: https://github.com/apache/mynewt-core/pull/1353#issuecomment-611605735
 
 
   I don't believe Mynewt-ucifi work is ongoing.  Please reopen if necessary.


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] ccollins476ad closed pull request #1353: Ucifi changes

2020-04-09 Thread GitBox
ccollins476ad closed pull request #1353: Ucifi changes
URL: https://github.com/apache/mynewt-core/pull/1353
 
 
   


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] ccollins476ad commented on issue #1285: move sensor_itf to driver_itf WIP please evaluate

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1285: move sensor_itf to driver_itf WIP 
please evaluate
URL: https://github.com/apache/mynewt-core/pull/1285#issuecomment-611605314
 
 
   This looks like it has stalled. Can this be closed?


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] ccollins476ad commented on issue #1062: [WIP] GNSS (do not merge)

2020-04-09 Thread GitBox
ccollins476ad commented on issue #1062: [WIP] GNSS   (do not merge)
URL: https://github.com/apache/mynewt-core/pull/1062#issuecomment-611604968
 
 
   This looks like it has stalled.  Can this be closed?


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-site] sjanc commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 Thread GitBox
sjanc commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 
release
URL: https://github.com/apache/mynewt-site/pull/528#issuecomment-611588591
 
 
   ugh, thanks for reporting


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-site] utzig commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 Thread GitBox
utzig commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 
release
URL: https://github.com/apache/mynewt-site/pull/528#issuecomment-611586710
 
 
   > so will mynewt.apache.org auto-update now or manual actions need to be 
taken?
   
   It would if the build machine was not broken again. I reopened an issue: 
https://issues.apache.org/jira/browse/INFRA-20099


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-documentation] branch master updated: Add blinky PineTime tutorial

2020-04-09 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-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new ce121ef  Add blinky PineTime tutorial
ce121ef is described below

commit ce121efe56c913fcca9af0f9416569b6d4754564
Author: Casper Meijn 
AuthorDate: Sat Mar 28 12:00:14 2020 +0100

Add blinky PineTime tutorial
---
 docs/tutorials/blinky/blinky.rst   |   2 +
 docs/tutorials/blinky/pinetime.rst | 186 +
 2 files changed, 188 insertions(+)

diff --git a/docs/tutorials/blinky/blinky.rst b/docs/tutorials/blinky/blinky.rst
index c2349b0..aacbba5 100644
--- a/docs/tutorials/blinky/blinky.rst
+++ b/docs/tutorials/blinky/blinky.rst
@@ -10,6 +10,7 @@ Project Blinky
Blinky on Arduino Primo 
Blinky on Olimex 
Blinky on nRF52 DK 
+   Blinky on PineTime 
Blinky on RedBear Nano 2 
Blinky on STM32F4-Discovery 
Add Console and Shell to Blinky 
@@ -40,6 +41,7 @@ Tutorials are available for the following boards:
 -  :doc:`blinky_primo`
 -  :doc:`olimex`
 -  :doc:`nRF52`
+-  :doc:`pinetime`
 -  :doc:`rbnano2`
 -  :doc:`blinky_stm32f4disc`
 
diff --git a/docs/tutorials/blinky/pinetime.rst 
b/docs/tutorials/blinky/pinetime.rst
new file mode 100644
index 000..dd8d042
--- /dev/null
+++ b/docs/tutorials/blinky/pinetime.rst
@@ -0,0 +1,186 @@
+Blinky, your "Hello World!", on a PineTime smartwatch
+---
+
+This tutorial shows you how to create, build, and run the Blinky
+application on a PineTime smartwatch.
+
+.. contents::
+  :local:
+  :depth: 2
+
+Prerequisites
+~
+
+-  Meet the prerequisites listed in :doc:`Project Blinky `.
+-  Have a `PineTime Dev Kit 
`__
+-  Have a `ST-LINK programmer 
`__ or a cheap clone
+-  Install a patched version of OpenOCD 0.10.0 described in :doc:`Install 
OpenOCD <../../get_started/native_install/cross_tools>`.
+
+If you have not removed the flash protection yet, you should to that first. 
+See `the PineTime wiki 
`__ 
+for instructions.
+
+Create a Project
+
+
+Create a new project if you do not have an existing one. You can skip
+this step and proceed to `Create the Targets`_ if you
+already have a project created.
+
+Run the following commands to create a new project:
+
+.. code-block:: console
+
+$ mkdir ~/dev
+$ cd ~/dev
+$ newt new blinky-pinetime
+Downloading project skeleton from apache/mynewt-blinky...
+Downloading repository mynewt-blinky 
+Installing skeleton in blinky-pinetime...
+Project blinky-pinetime successfully created.
+$ cd blinky-pinetime
+$ newt upgrade
+newt upgrade
+Downloading repository mynewt-core (commit: master)
+Downloading repository mynewt-nimble (commit: master)
+Downloading repository mcuboot (commit: master)
+Making the following changes to the project:
+install apache-mynewt-core (1.7.0)
+install apache-mynewt-nimble (1.2.0)
+install mcuboot (1.3.1)
+$
+
+Create the Targets
+~~
+
+Create two targets for the PineTime - one for the bootloader and
+one for the Blinky application.
+
+Run the following ``newt target`` commands, from your project directory,
+to create a bootloader target. We name the target ``boot-pinetime``:
+
+.. code-block:: console
+:emphasize-lines: 3
+
+$ newt target create boot-pinetime
+$ newt target set boot-pinetime app=@mcuboot/boot/mynewt
+$ newt target set boot-pinetime bsp=@apache-mynewt-core/hw/bsp/pinetime
+$ newt target set boot-pinetime build_profile=optimized
+
+Run the following ``newt target`` commands to create a target for the
+Blinky application. We name the target ``blinky-pinetime``.
+
+.. code-block:: console
+:emphasize-lines: 3
+
+$ newt target create blinky-pinetime
+$ newt target set blinky-pinetime app=apps/blinky
+$ newt target set blinky-pinetime bsp=@apache-mynewt-core/hw/bsp/pinetime
+$ newt target set blinky-pinetime build_profile=debug
+
+You can run the ``newt target show`` command to verify the target
+settings:
+
+.. code-block:: console
+
+$ newt target show
+targets/blinky-pinetime
+app=apps/blinky
+bsp=@apache-mynewt-core/hw/bsp/pinetime
+build_profile=debug
+targets/boot-pinetime
+app=@mcuboot/boot/mynewt
+bsp=@apache-mynewt-core/hw/bsp/pinetime
+build_profile=optimized
+
+Build the Target Executables
+
+
+Run the ``newt build boot-pinetime`` command to build the bootloader:
+
+.. code-block:: console
+
+$ newt build boot-pinetime
+

[mynewt-documentation] branch master updated: tutorials/other/chg_ctrl_on_pinetime: Add Charge Control on PineTime doc

2020-04-09 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-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new a1d4dc1  tutorials/other/chg_ctrl_on_pinetime: Add Charge Control on 
PineTime doc
a1d4dc1 is described below

commit a1d4dc1525f2594f65fa132a64d7772f4e71cfa8
Author: Casper Meijn 
AuthorDate: Tue Mar 31 16:46:10 2020 +0200

tutorials/other/chg_ctrl_on_pinetime: Add Charge Control on PineTime doc
---
 docs/tutorials/other/chg_ctrl_on_pinetime.rst | 367 ++
 docs/tutorials/other/other.rst|   4 +-
 2 files changed, 370 insertions(+), 1 deletion(-)

diff --git a/docs/tutorials/other/chg_ctrl_on_pinetime.rst 
b/docs/tutorials/other/chg_ctrl_on_pinetime.rst
new file mode 100644
index 000..0f6471d
--- /dev/null
+++ b/docs/tutorials/other/chg_ctrl_on_pinetime.rst
@@ -0,0 +1,367 @@
+..
+  #
+  # Copyright 2020 Casper Meijn 
+  #
+  # Licensed 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.
+  #
+
+Charge control on PineTime
+===
+
+This tutorial shows you how to get the charge control status on PineTime 
smartwatch.
+
+.. contents::
+  :local:
+  :depth: 2
+
+Prerequisites
+~
+
+Ensure that you meet the following prerequisites before continuing with
+this tutorial:
+
+-  Follow :doc:`Blinky on PineTime tutorial <../blinky/pinetime>` to create a 
+   project with a basic application. You will extend that application in this 
+   tutorial.
+-  Make sure you have the charger input available. This can either be a fully 
+   assembled PineTime (but this prevent you from accessing the SWD pins) or by
+   mounting a wire to the 5V charger pad.
+
+Charger hardware
+
+
+First a few words about the PineTime hardware. The PineTime smartwatch uses a 
+SGM4056 charger chip. The chip gets it's power from the USB port via the
+charging pads at the back of the watch. The charger takes care of battery 
+maintenance by providing the correct voltage and current during the charging 
+process.
+
+The charger is connected to the main processor via two GPIO pins. This way the 
+charger can report it's current charging state: 
+
+- no source connected, 
+- charging or
+- source connected but not charging.
+
+This tutorial will show you how to obtain this status.
+
+SGM4056 Driver
+~~
+
+Communication with the charger is done by the :doc:`SGM4056 Driver 
<../../os/modules/drivers/chg_ctrl/sgm4056>`. 
+This abstracts the hardware and provides a simple interface to the charger. 
The :doc:`PineTime BSP <../../os/bsp/pinetime>` 
+already initializes the driver, so we can use it directly in our the 
application. 
+Let's extend the application with the following code:
+
+.. code-block:: c
+:emphasize-lines: 1-2, 10-11, 20-22, 33-35, 37-39
+
+#include "sgm4056/sgm4056.h"
+#include "console/console.h"
+
+...
+
+int
+main(int argc, char **argv)
+{
+int rc;
+struct sgm4056_dev *charger;
+charge_control_status_t charger_status;
+
+...
+
+sysinit();
+
+g_led_pin = LED_BLINK_PIN;
+hal_gpio_init_out(g_led_pin, 1);
+
+/* Open charger device */
+charger = (struct sgm4056_dev *) os_dev_open("charger", 0, 0);
+assert(charger);
+
+while (1) {
+++g_task1_loops;
+
+/* Wait one second */
+os_time_delay(OS_TICKS_PER_SEC);
+
+/* Toggle the LED */
+hal_gpio_toggle(g_led_pin);
+
+/* Get charger state */
+rc = sgm4056_get_charger_status(charger, _status);
+assert(rc == 0);
+
+/* Print charger state */
+console_printf("Charger state = %i\n", charger_status);
+console_flush();
+}
+assert(0);
+
+return rc;
+}
+
+First we added a include file for the ``sgm4056`` driver and the console 
+interface for output. 
+
+We define a pointer to a ``sgm4056_dev`` charger device and a variable for 
+the actual charger status. 
+
+Then we open the charger device using ``os_dev_open``. This will get the 
driver 
+instance that was initialized by the BSP.
+
+In the while loop we ask the driver to get the charger state and print it to
+the console as an number.
+
+Let's run this code on the device and watch the output of the 

[mynewt-documentation] branch master updated: Fix various build warnings

2020-04-09 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-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 35ccac5  Fix various build warnings
35ccac5 is described below

commit 35ccac530172c10ec6f7099bb428f7b76372489d
Author: Casper Meijn 
AuthorDate: Sat Mar 28 12:42:51 2020 +0100

Fix various build warnings
---
 docs/mynewt_faq/troubleshoot_faq.rst   |  2 +-
 .../bleprph-sections/bleprph-chr-access.rst| 12 -
 docs/tutorials/ble/eddystone.rst   |  2 +-
 docs/tutorials/blinky/arduino_zero.rst | 22 
 docs/tutorials/devmgmt/add_newtmgr.rst |  2 +-
 docs/tutorials/other/unit_test.rst |  2 +-
 docs/tutorials/repo/add_repos.rst  | 13 +-
 docs/tutorials/sensors/air_quality_ble.rst |  1 +
 docs/tutorials/sensors/nrf52_adc.rst   |  3 ++-
 docs/tutorials/sensors/sensor_bleprph_oic.rst  | 29 ++
 docs/tutorials/sensors/sensor_nrf52_drv2605.rst|  2 +-
 .../sensors/sensor_thingy_lis2dh12_onb.rst |  2 +-
 12 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/docs/mynewt_faq/troubleshoot_faq.rst 
b/docs/mynewt_faq/troubleshoot_faq.rst
index 05f4c0e..c7c71bb 100644
--- a/docs/mynewt_faq/troubleshoot_faq.rst
+++ b/docs/mynewt_faq/troubleshoot_faq.rst
@@ -95,7 +95,7 @@ Bug With Older Versions of ``gcc``
 
 **Q**: I got the following error using ``newt build``. How do I fix it?
 
-.. code-block:: console:
+.. code-block:: console
 
   Error: repos/apache-mynewt-core/sys/log/modlog/src/modlog.c: In function 
'modlog_alloc':
   repos/apache-mynewt-core/sys/log/modlog/src/modlog.c:61:23: error: missing 
braces around initializer [-Werror=missing-braces]
diff --git a/docs/tutorials/ble/bleprph/bleprph-sections/bleprph-chr-access.rst 
b/docs/tutorials/ble/bleprph/bleprph-sections/bleprph-chr-access.rst
index b2beacf..67e8773 100644
--- a/docs/tutorials/ble/bleprph/bleprph-sections/bleprph-chr-access.rst
+++ b/docs/tutorials/ble/bleprph/bleprph-sections/bleprph-chr-access.rst
@@ -92,12 +92,12 @@ characteristics use:
 }
 }
 
-/* Unknown characteristic; the nimble stack should not have called this
- * function.
- */
-assert(0);
-return BLE_ATT_ERR_UNLIKELY;
-}
+/* Unknown characteristic; the nimble stack should not have called this
+* function.
+*/
+assert(0);
+return BLE_ATT_ERR_UNLIKELY;
+}
 
 After you've taken a moment to examine the structure of this function,
 let's explore some details.
diff --git a/docs/tutorials/ble/eddystone.rst b/docs/tutorials/ble/eddystone.rst
index 4814844..b362cc9 100644
--- a/docs/tutorials/ble/eddystone.rst
+++ b/docs/tutorials/ble/eddystone.rst
@@ -332,7 +332,7 @@ instance of the ``ble_gap_adv_params`` struct as our 
argument.
 rc = ble_gap_adv_start(BLE_OWN_ADDR_RANDOM, NULL, BLE_HS_FOREVER,
_params, NULL, NULL);
 assert(rc == 0);
-} 
+} 
 
 Conclusion
 ~~
diff --git a/docs/tutorials/blinky/arduino_zero.rst 
b/docs/tutorials/blinky/arduino_zero.rst
index d100a67..b4d1e3d 100644
--- a/docs/tutorials/blinky/arduino_zero.rst
+++ b/docs/tutorials/blinky/arduino_zero.rst
@@ -335,17 +335,17 @@ terminal.
 Run the ``newt load arduino_boot`` command again after erasing the
 board.
 
-:red:`Reminder if you are using Docker`: When working with actual hardware,
-remember that each board has an ID. If you swap boards and do not
-refresh the USB Device Filter on the VirtualBox UI, the ID might be
-stale and the Docker instance may not be able to see the board
-correctly. For example, you may see an error message like
-``Error: unable to find CMSIS-DAP device`` when you try to load or run
-an image on the board. In that case, you need to click on the USB link
-in VirtualBox UI, remove the existing USB Device Filter (e.g. "Atmel
-Corp. EDBG CMSIS-DAP[0101]") by clicking on the "Removes selected USB
-filter" button, and add a new filter by clicking on the "Adds new USB
-filter" button.
+.. warning:: Reminder if you are using Docker: When working with actual 
hardware,
+remember that each board has an ID. If you swap boards and do not
+refresh the USB Device Filter on the VirtualBox UI, the ID might be
+stale and the Docker instance may not be able to see the board
+correctly. For example, you may see an error message like
+``Error: unable to find CMSIS-DAP device`` when you try to load or run
+an image on the board. In that case, you need to click on the USB link
+in VirtualBox UI, remove the existing USB Device Filter (e.g. "Atmel
+Corp. EDBG CMSIS-DAP[0101]") by clicking on the "Removes selected USB
+filter" button, and add a new filter by clicking on the "Adds new USB
+filter" button.
 
 

[mynewt-core] 03/04: Fixes for 1.8.0 release

2020-04-09 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

commit a8e823afc0fce9a736ca28417fb9982420d46295
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
-* hw/bsp/nrf52840pdk/src/arch/cortex_m4/gcc_startup_nrf52_split.s
-* hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s
-* 

[mynewt-core] branch master updated (ff8f488 -> d89f581)

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

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


from ff8f488  Apache Mynewt 1.8.0 release
 new d4270df  Apache Mynewt 1.8.0 release
 new 143e101  hw/drivers: Fix BMP388 license issues
 new a8e823a  Fixes for 1.8.0 release
 new d89f581  Fix license headers in hw/drivers/display

The 4 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:
 .rat-excludes | 101 +++---
 LICENSE   | 395 +-
 NOTICE|   2 +-
 RELEASE_NOTES.md  |   2 +-
 fs/fatfs/src/option/unicode.c |  17 -
 hw/drivers/display/cfb/include/display/cfb.h  |  29 +-
 hw/drivers/display/cfb/src/cfb.c  |  25 +-
 hw/drivers/display/cfb/src/cfb_fonts.c|  28 +-
 hw/drivers/display/include/display/display.h  |  29 +-
 hw/drivers/display/ssd1673/src/ssd1673.c  |  25 +-
 hw/drivers/display/ssd1673/src/ssd1673_regs.h |  25 +-
 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 ++
 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 ++
 18 files changed, 597 insertions(+), 491 deletions(-)
 delete mode 100644 fs/fatfs/src/option/unicode.c



[mynewt-core] 04/04: Fix license headers in hw/drivers/display

2020-04-09 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

commit d89f581b81c765fc928ba90eaf04bdbf0ced830b
Author: Szymon Janc 
AuthorDate: Thu Mar 26 09:40:57 2020 +0100

Fix license headers in hw/drivers/display

This code is under Apache-2 license but was not developed for
Apache Software Foundation.
---
 hw/drivers/display/cfb/include/display/cfb.h  | 29 +++
 hw/drivers/display/cfb/src/cfb.c  | 25 +--
 hw/drivers/display/cfb/src/cfb_fonts.c| 28 --
 hw/drivers/display/include/display/display.h  | 29 +++
 hw/drivers/display/ssd1673/src/ssd1673.c  | 25 +--
 hw/drivers/display/ssd1673/src/ssd1673_regs.h | 25 +--
 6 files changed, 67 insertions(+), 94 deletions(-)

diff --git a/hw/drivers/display/cfb/include/display/cfb.h 
b/hw/drivers/display/cfb/include/display/cfb.h
index 5a0305d..ea85380 100644
--- a/hw/drivers/display/cfb/include/display/cfb.h
+++ b/hw/drivers/display/cfb/include/display/cfb.h
@@ -1,23 +1,18 @@
 /*
- * 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.
- *
  * Copyright (c) 2018 PHYTEC Messtechnik GmbH
  *
+ * Licensed 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.
+ *
  */
 
 /**
diff --git a/hw/drivers/display/cfb/src/cfb.c b/hw/drivers/display/cfb/src/cfb.c
index 273fd1c..15133b2 100644
--- a/hw/drivers/display/cfb/src/cfb.c
+++ b/hw/drivers/display/cfb/src/cfb.c
@@ -1,22 +1,17 @@
 /*
- * 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
+ * Copyright (c) 2018 PHYTEC Messtechnik GmbH
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed 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
  *
- * 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.
+ *http://www.apache.org/licenses/LICENSE-2.0
  *
- * Copyright (c) 2018 PHYTEC Messtechnik GmbH
+ * 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.
  *
  */
 
diff --git a/hw/drivers/display/cfb/src/cfb_fonts.c 
b/hw/drivers/display/cfb/src/cfb_fonts.c
index 79778f2..6a2628a 100644
--- a/hw/drivers/display/cfb/src/cfb_fonts.c
+++ b/hw/drivers/display/cfb/src/cfb_fonts.c
@@ -1,23 +1,21 @@
 /*
- * 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 

[GitHub] [mynewt-nimble] sjanc merged pull request #798: fixes from 1.3 release

2020-04-09 Thread GitBox
sjanc merged pull request #798: fixes from 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/798
 
 
   


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 #2264: fixes from 1.8 release

2020-04-09 Thread GitBox
sjanc merged pull request #2264: fixes from 1.8 release
URL: https://github.com/apache/mynewt-core/pull/2264
 
 
   


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] 02/02: Fixes for 1.3.0 release

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

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

commit 822d6f7d149448183312ee9cb22597eca4ec9c3f
Author: Szymon Janc 
AuthorDate: Wed Mar 18 16:02:00 2020 +0100

Fixes for 1.3.0 release
---
 .rat-excludes | 2 ++
 NOTICE| 2 +-
 README.md | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.rat-excludes b/.rat-excludes
index 2c0be75..672c0e7 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -14,6 +14,8 @@ pts-l2cap.txt
 pts-sm.txt
 94654-20170317-085122560.tpg
 94654-20170317-085441153.pts
+uncrustify.cfg
+.style_ignored_dirs
 
 # tinycrypt - BSD License.
 tinycrypt
diff --git a/NOTICE b/NOTICE
index fc24c6a..84ecb14 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Mynewt NimBLE
-Copyright 2015-2018 The Apache Software Foundation
+Copyright 2015-2020 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index a6f4d04..37103be 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
 
 ## Overview
 
-Apache NimBLE is an open-source Bluetooth 5.0 stack (both Host & Controller)
+Apache NimBLE is an open-source Bluetooth 5.1 stack (both Host & Controller)
 that completely replaces the proprietary SoftDevice on Nordic chipsets. It is
 part of [Apache Mynewt project](https://github.com/apache/mynewt-core).
 



[mynewt-core] 02/04: hw/drivers: Fix BMP388 license issues

2020-04-09 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

commit 143e101ec9175f90ef5b08c0385b992b0ecba2f9
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 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 

[mynewt-nimble] branch master updated (c743e9b -> 822d6f7)

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

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


from c743e9b  Apache Mynewt NimBLE 1.3.0 release
 new 4bbd826  Apache NimBLE 1.3.0 release
 new 822d6f7  Fixes for 1.3.0 release

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:
 .rat-excludes|  2 ++
 NOTICE   |  2 +-
 README.md|  2 +-
 RELEASE_NOTES.md | 32 +++-
 4 files changed, 23 insertions(+), 15 deletions(-)



[mynewt-nimble] 01/02: Apache NimBLE 1.3.0 release

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

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

commit 4bbd826cad5ce1cb1eb38e5396b0c31cea303063
Author: Szymon Janc 
AuthorDate: Wed Mar 18 16:02:00 2020 +0100

Apache NimBLE 1.3.0 release
---
 RELEASE_NOTES.md | 32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9645c44..3bdd31a 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,26 +1,32 @@
 # RELEASE NOTES
 
-04 June 2018 - Apache NimBLE v1.0.0
+18 March 2020 - Apache NimBLE v1.3.0
 
 For full release notes, please visit the
 [Apache Mynewt 
Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes).
 
-Apache NimBLE is an open-source Bluetooth 5.0 stack (both Host & Controller) 
that completely
+Apache NimBLE is an open-source Bluetooth 5.1 stack (both Host & Controller) 
that completely
 replaces the proprietary SoftDevice on Nordic chipsets.
 
 New features in this version of NimBLE include:
 
-* Initial version after moving to separate repo - 
https://github.com/apache/mynewt-nimble
-* removal of deprecated bletiny application (superseded by btshell)
-* Added NimBLE Porting Layer (NPL) which abstracts OS specific details to 
improve portability
-* Initial ports for FreeRTOS and RIOT OS
-* Support for advertising up to 1650 bytes of data with Extended Advertising
-* Support for host flow control
-* Support for Direct Test Mode (DTM) via HCI interface
-* Support for Device Information Service
-* Bugfixes for issues found on UPF59 and during BT certification testing
-* Lots of other bugfixes, minor enhancements and optimisations
-* Mesh improvements
+* Support for Bluetooth Core Specification 5.1
+* New blestress test application
+* Dialog DA1469x CMAC driver
+* Support for LE Secure Connections out-of-band (OOB) association model
+* Support for automated generation of syscfg for ports
+* Qualification related bugfixes
+* BLE Mesh improvements - fixes and resync with latest Zephyr code
+* RIOT OS port fixes and improvements
+* btshell sample application improvements
+* improvements for bttester application
+* Controller duplicates filtering improvements
+* Multi PHY support improvements
+* Memory and CPU usage optimizations
+* Use of packed structs for HCI (code size reduction)
+* Linux sample improvements
+* PTS test instructions updates
+* Clock managements improvements in controller
 
 If working on next-generation RTOS and Bluetooth protocol stack
 sounds exciting to you, get in touch, by sending a mail to the Apache Mynewt



[mynewt-core] 01/04: Apache Mynewt 1.8.0 release

2020-04-09 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

commit d4270df720b4f25e68c1d84e16ea5abd105184ca
Author: Szymon Janc 
AuthorDate: Wed Mar 18 14:41:01 2020 +0100

Apache Mynewt 1.8.0 release
---
 RELEASE_NOTES.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index ff27eaf..4f6d5f8 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,6 @@
 # RELEASE NOTES
 
-04 June 2018 - Apache Mynewt v1.4.0
+18 March 2020 - Apache Mynewt v1.8.0
 
 For full release notes, please visit the
 [Apache Mynewt 
Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes).



[mynewt-newtmgr] 03/03: Update version to 1.9.0-dev

2020-04-09 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-newtmgr.git

commit d981269076af5c28e6a5206faea8122a591e079c
Author: Szymon Janc 
AuthorDate: Thu Apr 9 14:30:23 2020 +0200

Update version to 1.9.0-dev
---
 newtmgr/newtmgr.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newtmgr/newtmgr.go b/newtmgr/newtmgr.go
index eeaef26..80502b5 100644
--- a/newtmgr/newtmgr.go
+++ b/newtmgr/newtmgr.go
@@ -77,7 +77,7 @@ func main() {
ExeName:   "newtmgr",
ShortName: "Newtmgr",
LongName:  "Apache Newtmgr",
-   VersionString: "1.8.0",
+   VersionString: "1.9.0-dev",
CfgFilename:   ".newtmgr.cp.json",
}
 



[mynewt-newtmgr] branch master updated (80e5c28 -> d981269)

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

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


from 80e5c28  res: Correctly parse payload params
 new c96b319  Apache Mynewt 1.8.0 release
 new 886ac64  Fixes for 1.8 release
 new d981269  Update version to 1.9.0-dev

The 3 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:
 LICENSE| 135 -
 NOTICE |   2 +-
 RELEASE_NOTES.md   |   8 ++--
 newtmgr/newtmgr.go |   2 +-
 4 files changed, 6 insertions(+), 141 deletions(-)



[mynewt-newt] 02/03: Fixes for 1.8 release

2020-04-09 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-newt.git

commit 11d9f63c61fffa9b2044b34b45d1bc75a6bdc880
Author: Szymon Janc 
AuthorDate: Mon Mar 23 13:24:30 2020 +0100

Fixes for 1.8 release

Updates dates and removes no longer bundled vendor/ libraries from
LICENSE file.
---
 LICENSE  | 99 
 NOTICE   |  2 +-
 RELEASE_NOTES.md |  2 +-
 3 files changed, 2 insertions(+), 101 deletions(-)

diff --git a/LICENSE b/LICENSE
index c4c0480..25968b1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -200,69 +200,8 @@
See the License for the specific language governing permissions and
limitations under the License.
 
-This product bundles pretty, which is available under the MIT license.  For
-details, see:
- * newt/vendor/github.com/kr/pretty/License
- * newtmgr/vendor/github.com/kr/pretty/License
-
-This product bundles kr/text, which is available under the MIT license.  For
-details, see:
- * newt/vendor/github.com/kr/text/License
- * newtmgr/vendor/github.com/kr/text/License
-
-This product bundles mapstructure, which is available under the MIT license.
-For details, see:
-* newt/vendor/github.com/mitchellh/mapstructure/LICENSE
-* newtmgr/vendor/github.com/mitchellh/mapstructure/LICENSE
-
-This product bundles logrus, which is available under the MIT license.  For
-details, see:
-* newt/vendor/github.com/sirupsen/logrus/LICENSE
-* newtmgr/vendor/github.com/sirupsen/logrus/LICENSE
-
-This product bundles Cast, which is available under the MIT license.  For
-details, see:
-* newt/vendor/github.com/spf13/cast/LICENSE
-* newtmgr/vendor/github.com/spf13/cast/LICENSE
-
-This product bundles jWalterWeatherman, which is available under the MIT
-license.  For details, see:
-* newt/vendor/github.com/spf13/jwalterweatherman/LICENSE
-* newtmgr/vendor/github.com/spf13/jwalterweatherman/LICENSE
-
-This product bundles pflag, which is available under the "3-clause BSD"
-license.  For details, see:
-* newt/vendor/github.com/spf13/pflag/LICENSE
-* newtmgr/vendor/github.com/spf13/pflag/LICENSE
-
-This product bundles the unix Go package, which is available under the
-"3-clause BSD" license.  For details, see:
-* newt/vendor/golang.org/x/sys/LICENSE
-* newtmgr/vendor/golang.org/x/sys/LICENSE
-
-This product bundles fsnotify.v1, which is available under the "3-clause BSD"
-license.  For details, see:
-* newt/vendor/gopkg.in/fsnotify.v1/LICENSE
-* newtmgr/vendor/gopkg.in/fsnotify.v1/LICENSE
-
 This product bundles yaml.v2's Go port of libyaml, which is available under the
 MIT license.  For details, see:
-* newt/vendor/mynewt.apache.org/newt/yaml/apic.go
-* newt/vendor/mynewt.apache.org/newt/yaml/emitterc.go
-* newt/vendor/mynewt.apache.org/newt/yaml/parserc.go
-* newt/vendor/mynewt.apache.org/newt/yaml/readerc.go
-* newt/vendor/mynewt.apache.org/newt/yaml/scannerc.go
-* newt/vendor/mynewt.apache.org/newt/yaml/writerc.go
-* newt/vendor/mynewt.apache.org/newt/yaml/yamlh.go
-* newt/vendor/mynewt.apache.org/newt/yaml/yamlprivateh.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/apic.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/emitterc.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/parserc.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/readerc.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/scannerc.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/writerc.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/yamlh.go
-* newtmgr/vendor/mynewt.apache.org/newt/yaml/yamlprivateh.go
 * yaml/apic.go
 * yaml/emitterc.go
 * yaml/parserc.go
@@ -271,41 +210,3 @@ MIT license.  For details, see:
 * yaml/writerc.go
 * yaml/yamlh.go
 * yaml/yamlprivateh.go
-
-This product bundles viper, which is available under the MIT license.  For
-details, see:
-* newt/vendor/mynewt.apache.org/newt/viper/LICENSE
-* newtmgr/vendor/mynewt.apache.org/newt/viper/LICENSE
-* viper/LICENSE
-
-This product bundles go-crc16, which is available under the MIT license.  For
-details, see:
-* newtmgr/vendor/github.com/joaojeronimo/go-crc16/README.md
-
-This product bundles GATT, which is available under the "3-clause BSD" license.
-For details, see:
-* newtmgr/vendor/github.com/runtimeinc/gatt
-
-This product bundles xpc, which is available under the MIT license.  For
-details, see:
-* newtmgr/vendor/github.com/runtimeinc/gatt/xpc/LICENSE
-
-This product bundles gioctl, which is available under the MIT license.  For
-details, see:
-* newtmgr/vendor/github.com/runtimeinc/gatt/linux/gioctl/LICENSE.md
-
-This product bundles tarm/serial, which is available under the "3-clause BSD"
-license.  For details, see:
-* newtmgr/vendor/github.com/tarm/serial/LICENSE
-
-This product bundles 

[mynewt-newt] 01/03: Apache Mynewt 1.8.0 release

2020-04-09 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-newt.git

commit 32b9578efd1bb619c010a0c6804fbd4cc7820d13
Author: Szymon Janc 
AuthorDate: Wed Mar 18 14:47:11 2020 +0100

Apache Mynewt 1.8.0 release
---
 RELEASE_NOTES.md  | 2 +-
 newt/newtutil/newtutil.go | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index d2b9dcf..2bce938 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,6 @@
 # RELEASE NOTES
 
-04 June 2018 - Apache Newt v1.4.0
+18 March 2029 - Apache Newt v1.8.0
 
 For full release notes, please visit the
 [Apache Mynewt 
Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes).
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
index 7dcd91c..07c7e1e 100644
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@ -29,12 +29,12 @@ import (
"mynewt.apache.org/newt/util"
 )
 
-var NewtVersion = Version{1, 7, 9900}
-var NewtVersionStr = "1.8.0-dev"
+var NewtVersion = Version{1, 8, 0}
+var NewtVersionStr = "1.8.0"
 var NewtGitHash = "unknown"
 var NewtDate = "unknown"
 
-var NewtBlinkyTag string = "master"
+var NewtBlinkyTag string = "mynewt_1_8_0_tag"
 var NewtNumJobs int
 var NewtForce bool
 var NewtAsk bool



[GitHub] [mynewt-newt] sjanc merged pull request #394: fixes from 1.8 release and bump to 1.9-dev

2020-04-09 Thread GitBox
sjanc merged pull request #394: fixes from 1.8 release and bump to 1.9-dev
URL: https://github.com/apache/mynewt-newt/pull/394
 
 
   


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] branch master updated (2623dad -> c5d1e42)

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

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


from 2623dad  run: Fix options parsing for newt run (#393)
 new 32b9578  Apache Mynewt 1.8.0 release
 new 11d9f63  Fixes for 1.8 release
 new c5d1e42  Bump version to 1.9.0-dev

The 3 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:
 LICENSE   | 99 ---
 NOTICE|  2 +-
 RELEASE_NOTES.md  |  2 +-
 newt/newtutil/newtutil.go |  4 +-
 4 files changed, 4 insertions(+), 103 deletions(-)



[mynewt-newt] 03/03: Bump version to 1.9.0-dev

2020-04-09 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-newt.git

commit c5d1e422bfa335b3b58589eca2401ec3616e889e
Author: Szymon Janc 
AuthorDate: Thu Apr 9 14:27:56 2020 +0200

Bump version to 1.9.0-dev
---
 newt/newtutil/newtutil.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
index 07c7e1e..9493931 100644
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@ -29,12 +29,12 @@ import (
"mynewt.apache.org/newt/util"
 )
 
-var NewtVersion = Version{1, 8, 0}
-var NewtVersionStr = "1.8.0"
+var NewtVersion = Version{1, 8, 9900}
+var NewtVersionStr = "1.9.0-dev"
 var NewtGitHash = "unknown"
 var NewtDate = "unknown"
 
-var NewtBlinkyTag string = "mynewt_1_8_0_tag"
+var NewtBlinkyTag string = "master"
 var NewtNumJobs int
 var NewtForce bool
 var NewtAsk bool



[mynewt-newtmgr] 02/03: Fixes for 1.8 release

2020-04-09 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-newtmgr.git

commit 886ac64fd1cbbdcb9e46c56bf38105245ef5fb9d
Author: Szymon Janc 
AuthorDate: Mon Mar 23 13:13:38 2020 +0100

Fixes for 1.8 release

Updates dates and removes no longer bundled vendor/ libraries from
LICENSE file.
---
 LICENSE  | 135 ---
 NOTICE   |   2 +-
 RELEASE_NOTES.md |   2 +-
 3 files changed, 2 insertions(+), 137 deletions(-)

diff --git a/LICENSE b/LICENSE
index 4c5a9f5..8dada3e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -199,138 +199,3 @@
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.
-
-This product bundles pretty, which is available under the MIT license. For
-details, see:
-* vendor/github.com/kr/pretty/License
-
-This product bundles kr/text, which is available under the MIT license. For
-details, see:
-* vendor/github.com/kr/text/License
-
-This product bundles mapstructure, which is available under the MIT license.
-For details, see:
-* vendor/github.com/mitchellh/mapstructure/LICENSE
-
-This product bundles logrus, which is available under the MIT license. For
-details, see:
-* vendor/github.com/Sirupsen/logrus/LICENSE
-
-This product bundles Cast, which is available under the MIT license. For
-details, see:
-* vendor/github.com/spf13/cast/LICENSE
-
-This product bundles jWalterWeatherman, which is available under the MIT
-license. For details, see:
-* vendor/github.com/spf13/jwalterweatherman/LICENSE
-
-This product bundles pflag, which is available under the "3-clause BSD"
-license. For details, see:
-* vendor/github.com/spf13/pflag/LICENSE
-
-This product bundles the unix Go package, which is available under the
-"3-clause BSD" license. For details, see:
-* vendor/golang.org/x/sys/LICENSE
-
-This product bundles the Go supplementary cryptography libraries package,
-which is available under the "3-clause BSD" license. For details, see:
-* vendor/golang.org/x/crypto/LICENSE
-
-This product bundles the Go supplementary networking libraries package, which
-is available under the "3-clause BSD" license. For details, see:
-* vendor/golang.org/x/net/LICENSE
-
-This product bundles fsnotify.v1, which is available under the "3-clause BSD"
-license. For details, see:
-* vendor/gopkg.in/fsnotify.v1/LICENSE
-
-This product bundles yaml.v2's Go port of libyaml, which is available under the
-MIT license. For details, see:
-* vendor/mynewt.apache.org/newt/yaml/apic.go
-* vendor/mynewt.apache.org/newt/yaml/emitterc.go
-* vendor/mynewt.apache.org/newt/yaml/parserc.go
-* vendor/mynewt.apache.org/newt/yaml/readerc.go
-* vendor/mynewt.apache.org/newt/yaml/scannerc.go
-* vendor/mynewt.apache.org/newt/yaml/writerc.go
-* vendor/mynewt.apache.org/newt/yaml/yamlh.go
-* vendor/mynewt.apache.org/newt/yaml/yamlprivateh.go
-
-This product bundles viper, which is available under the MIT license. For
-details, see:
-* vendor/mynewt.apache.org/newt/viper/LICENSE
-
-This product bundles pb, which is available under the "3-clause BSD" license.
-For details, see:
-* vendor/github.com/cheggaaa/pb/LICENSE
-
-This product bundles ble, which is available under the "3-clause BSD" license.
-For details, see:
-* vendor/github.com/currantlabs/ble/LICENSE
-
-This product bundles structs, which is available under the MIT license. For
-details, see:
-* vendor/github.com/fatih/structs/LICENSE
-
-This product bundles structs, which is available under the Apache License 2.0.
-For details, see:
-* vendor/github.com/inconshreveable/mousetrap/LICENSE
-
-This product bundles go-crc16, which is available under the MIT license. For
-details, see:
-* vendor/github.com/joaojeronimo/go-crc16/README.md
-
-This product bundles ansi, which is available under the MIT license. For
-details, see:
-* vendor/github.com/mgutz/ansi/LICENSE
-
-This product bundles logxi, which is available under the MIT license. For
-details, see:
-* vendor/github.com/mgutz/logxi/LICENSE
-
-This product bundles go-homedir, which is available under the MIT license. For
-details, see:
-* vendor/github.com/mitchellh/go-homedir/LICENSE
-
-This product bundles go-codec, which is available under the MIT license. For
-details, see:
-* vendor/github.com/ugorji/go/LICENSE
-
-This product bundles goble, which is available under the MIT license. For
-details, see:
-* vendor/github.com/raff/goble/LICENSE
-
-This product bundles go-coap, which is available under the MIT license. For
-details, see:
-* vendor/github.com/runtimeco/go-coap/LICENSE
-
-This product bundles structs, which is available under the Apache License 2.0.
-For details, see:
-* 

[mynewt-newtmgr] 01/03: Apache Mynewt 1.8.0 release

2020-04-09 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-newtmgr.git

commit c96b31938f9d5b185970e5c78df55da37d666ffd
Author: Szymon Janc 
AuthorDate: Wed Mar 18 14:48:42 2020 +0100

Apache Mynewt 1.8.0 release
---
 RELEASE_NOTES.md   | 8 
 newtmgr/newtmgr.go | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 257b059..1bb0b97 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,6 @@
 # RELEASE NOTES
 
-04 June 2018 - Apache Newtmgr v1.4.0
+18 March 2018 - Apache Newtmgr v1.8.0
 
 For full release notes, please visit the
 [Apache Mynewt 
Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes).
@@ -12,9 +12,9 @@ Thew newtmgr tool is documented at 
http://mynewt.apache.org/latest/newtmgr/overv
 
 New features in this version of newtmgr include:
 
-* interactive shell for COAP operations
-* "version" command
-* moved documentation from apache-core to newtmgr repo
+* new '"shell exec" command for executing specified CLI command on target 
device
+* log show now includes imghash
+* multi-image support
 * various bugfixes
 
 If working on next-generation build and source package management systems
diff --git a/newtmgr/newtmgr.go b/newtmgr/newtmgr.go
index f64e164..eeaef26 100644
--- a/newtmgr/newtmgr.go
+++ b/newtmgr/newtmgr.go
@@ -77,7 +77,7 @@ func main() {
ExeName:   "newtmgr",
ShortName: "Newtmgr",
LongName:  "Apache Newtmgr",
-   VersionString: "1.8.0-dev",
+   VersionString: "1.8.0",
CfgFilename:   ".newtmgr.cp.json",
}
 



[GitHub] [mynewt-newtmgr] sjanc merged pull request #159: fixes from 1.8 relase and bump to 1.9-dev

2020-04-09 Thread GitBox
sjanc merged pull request #159: fixes from 1.8 relase and bump to 1.9-dev
URL: https://github.com/apache/mynewt-newtmgr/pull/159
 
 
   


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-site] sjanc commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 Thread GitBox
sjanc commented on issue #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 
release
URL: https://github.com/apache/mynewt-site/pull/528#issuecomment-611571543
 
 
   so will mynewt.apache.org auto-update now or manual actions need to be taken?


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-site] sjanc merged pull request #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 Thread GitBox
sjanc merged pull request #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 
release
URL: https://github.com/apache/mynewt-site/pull/528
 
 
   


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-site] branch master updated: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 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-site.git


The following commit(s) were added to refs/heads/master by this push:
 new e007b23  Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release
 new f814188  Merge pull request #528 from sjanc/release18
e007b23 is described below

commit e007b23e882b4dfd2365eda45fe161b678fbdff4
Author: Szymon Janc 
AuthorDate: Thu Apr 9 14:50:27 2020 +0200

Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release
---
 custom-theme/choose_doc_version.html |  3 +++
 custom-theme/main-banner.html|  2 +-
 docs/documentation.md|  1 +
 docs/download.md | 34 ++
 mkdocs.yml   |  7 ++-
 5 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/custom-theme/choose_doc_version.html 
b/custom-theme/choose_doc_version.html
index 33ddb72..1a6553e 100644
--- a/custom-theme/choose_doc_version.html
+++ b/custom-theme/choose_doc_version.html
@@ -2,6 +2,9 @@
   
 Version: master
   
+
+Version: 1.8.0
+  
   
 Version: 1.7.0
   
diff --git a/custom-theme/main-banner.html b/custom-theme/main-banner.html
index cb8bc44..87baa76 100644
--- a/custom-theme/main-banner.html
+++ b/custom-theme/main-banner.html
@@ -8,7 +8,7 @@
 
 
 
-Latest News: Apache Mynewt 1.7.0, 
Apache NimBLE 1.2.0  released (August 4, 2019)
+Latest News: Apache Mynewt 1.8.0, 
Apache NimBLE 1.3.0  released (April 9, 2020)
 
 
 
diff --git a/docs/documentation.md b/docs/documentation.md
index 67e49c2..576f21f 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -3,6 +3,7 @@
 -   Latest version:
 -   [latest](/latest/)
 -   Earlier versions:
+-   [1.8.0](/v1_8_0/)
 -   [1.7.0](/v1_7_0/)
 -   [1.6.0](/v1_6_0/)
 -   [1.5.0](/v1_5_0/)
diff --git a/docs/download.md b/docs/download.md
index d6aaf21..4df2fef 100644
--- a/docs/download.md
+++ b/docs/download.md
@@ -2,27 +2,27 @@
 
 ### Latest Apache Mynewt Core OS Release
 
-*   Release Version: Apache Mynewt 1.7.0
-*   Release Date: August 4, 2019
-*   [Release 
Notes](https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.7.0)
-*   [Release 
Download](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.7.0/)
- *  
[core](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.7.0/apache-mynewt-core-1.7.0.tgz)
-
[[PGP]](https://www.apache.org/dist/mynewt/apache-mynewt-1.7.0/apache-mynewt-core-1.7.0.tgz.asc)
-
[[SHA512]](https://www.apache.org/dist/mynewt/apache-mynewt-1.7.0/apache-mynewt-newt-1.7.0.tgz.sha512)
- *   
[newt](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.7.0/apache-mynewt-newt-1.7.0.tgz)
-
[[PGP]](https://www.apache.org/dist/mynewt/apache-mynewt-1.7.0/apache-mynewt-newt-1.7.0.tgz.asc)
-
[[SHA512]](https://www.apache.org/dist/mynewt/apache-mynewt-1.7.0/apache-mynewt-newt-1.7.0.tgz.sha512)
+*   Release Version: Apache Mynewt 1.8.0
+*   Release Date: April 9, 2020
+*   [Release 
Notes](https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.8.0)
+*   [Release 
Download](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.8.0/)
+ *  
[core](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.8.0/apache-mynewt-core-1.8.0.tgz)
+
[[PGP]](https://www.apache.org/dist/mynewt/apache-mynewt-1.8.0/apache-mynewt-core-1.8.0.tgz.asc)
+
[[SHA512]](https://www.apache.org/dist/mynewt/apache-mynewt-1.8.0/apache-mynewt-newt-1.8.0.tgz.sha512)
+ *   
[newt](https://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.8.0/apache-mynewt-newt-1.8.0.tgz)
+
[[PGP]](https://www.apache.org/dist/mynewt/apache-mynewt-1.8.0/apache-mynewt-newt-1.8.0.tgz.asc)
+
[[SHA512]](https://www.apache.org/dist/mynewt/apache-mynewt-1.8.0/apache-mynewt-newt-1.8.0.tgz.sha512)
 
 ### Latest Apache Mynewt NimBLE (Bluetooth Stack) Release
 
 Mynewt's Bluetooth stack is now a separate release with a porting layer that 
allows it to be easily ported to another OS!
 
-*   Release Version: Apache NimBLE 1.2.0
-*   Release Date: August 4, 2019
-*   [Release 
Notes](https://cwiki.apache.org/confluence/display/MYNEWT/RN-NimBLE-1.2.0)
-*   [Release 
Download](https://www.apache.org/dyn/closer.lua/mynewt/apache-nimble-1.2.0/apache-mynewt-nimble-1.2.0.tgz)
-
[[PGP]](https://www.apache.org/dist/mynewt/apache-nimble-1.2.0/apache-mynewt-nimble-1.2.0.tgz.asc)
-
[[SHA512]](https://www.apache.org/dist/mynewt/apache-nimble-1.2.0/apache-mynewt-nimble-1.2.0.tgz.sha512)
+*   Release Version: Apache NimBLE 1.3.0
+*   Release Date: April 9, 2020
+*   [Release 
Notes](https://cwiki.apache.org/confluence/display/MYNEWT/RN-NimBLE-1.3.0)
+*   [Release 
Download](https://www.apache.org/dyn/closer.lua/mynewt/apache-nimble-1.3.0/apache-mynewt-nimble-1.3.0.tgz)
+

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

2020-04-09 Thread GitBox
h2zero closed issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793
 
 
   


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-09 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_r406226827
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,16 +372,24 @@ 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;
 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:
+/* Try to remove unbonded CCCDs first */
+if ((rc = ble_store_clean_old_cccds((void *) 
>overflow.value->cccd.peer_addr)) == BLE_HS_ENOENT) {
 
 Review comment:
   Hi @rymanluk Please let me know if I am missing something. As per my 
understanding CCCDs for unbonded devices can get stored as 
`ble_gatts_clt_cfg_access --> ble_store_write_cccd --> 
ble_store_write(BLE_STORE_OBJ_TYPE_CCCD, store_value)`. 
   
   Edit:
   Please disregard my earlier comment, missed on `cccd_value.flags == 0` check.


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-09 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_r406226827
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,16 +372,24 @@ 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;
 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:
+/* Try to remove unbonded CCCDs first */
+if ((rc = ble_store_clean_old_cccds((void *) 
>overflow.value->cccd.peer_addr)) == BLE_HS_ENOENT) {
 
 Review comment:
   Hi @rymanluk Please let me know if I am missing something. As per my 
understanding CCCDs for unbonded devices can get stored as 
`ble_gatts_clt_cfg_access --> ble_store_write_cccd --> 
ble_store_write(BLE_STORE_OBJ_TYPE_CCCD, store_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] prasad-alatkar commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 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_r406222887
 
 

 ##
 File path: nimble/host/include/host/ble_gap.h
 ##
 @@ -1896,6 +1896,20 @@ int ble_gap_unpair(const ble_addr_t *peer_addr);
  */
 int ble_gap_unpair_oldest_peer(void);
 
+/**
+ * Similar to `ble_gap_unpair_oldest_peer()`, except it makes sure that current
+ * peer is not deleted.
+ *
+ * @param peer_addr Address of the current peer (not to be deleted)
+ *
+ * @return  0 on success;
+ *  A BLE host HCI return code if the controller
+ *  rejected the request;
+ *  A BLE host core return code on unexpected
+ *  error.
+ */
+int ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer);
 
 Review comment:
   Agreed !!


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 merged pull request #15: Update dates in NOTICE

2020-04-09 Thread GitBox
sjanc merged pull request #15: Update dates in NOTICE
URL: https://github.com/apache/mynewt-blinky/pull/15
 
 
   


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-blinky] branch master updated: Update dates in NOTICE

2020-04-09 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-blinky.git


The following commit(s) were added to refs/heads/master by this push:
 new 330010a  Update dates in NOTICE
330010a is described below

commit 330010a9a1481bc8c35062ec33ea0adfc403bd84
Author: Szymon Janc 
AuthorDate: Mon Mar 23 12:59:01 2020 +0100

Update dates in NOTICE
---
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NOTICE b/NOTICE
index 4ba7354..20a92e2 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Mynewt
-Copyright 2015-2017 The Apache Software Foundation
+Copyright 2015-2020 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[GitHub] [mynewt-site] sjanc opened a new pull request #528: Apache Mynewt 1.8.0 and Apache NimBLE 1.3.0 release

2020-04-09 Thread GitBox
sjanc opened a new pull request #528: Apache Mynewt 1.8.0 and Apache NimBLE 
1.3.0 release
URL: https://github.com/apache/mynewt-site/pull/528
 
 
   


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 #15: Update dates in NOTICE

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


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 #159: fixes from 1.8 relase and bump to 1.9-dev

2020-04-09 Thread GitBox
sjanc opened a new pull request #159: fixes from 1.8 relase and bump to 1.9-dev
URL: https://github.com/apache/mynewt-newtmgr/pull/159
 
 
   


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 #394: fixes from 1.8 release and bump to 1.9-dev

2020-04-09 Thread GitBox
sjanc opened a new pull request #394: fixes from 1.8 release and bump to 1.9-dev
URL: https://github.com/apache/mynewt-newt/pull/394
 
 
   


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 #798: fixes from 1.3 release

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #798: fixes from 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/798#issuecomment-611498534
 
 
   
   
   
   ## 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] sjanc opened a new pull request #798: fixes from 1.3 release

2020-04-09 Thread GitBox
sjanc opened a new pull request #798: fixes from 1.3 release
URL: https://github.com/apache/mynewt-nimble/pull/798
 
 
   


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 #2264: fixes from 1.8 release

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #2264: fixes from 1.8 release
URL: https://github.com/apache/mynewt-core/pull/2264#issuecomment-611497461
 
 
   
   
   
   ## 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 #2264: fixes from 1.8 release

2020-04-09 Thread GitBox
sjanc opened a new pull request #2264: fixes from 1.8 release
URL: https://github.com/apache/mynewt-core/pull/2264
 
 
   


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: Apache Mynewt 1.8.0 release

2020-04-09 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 ff8f488  Apache Mynewt 1.8.0 release
ff8f488 is described below

commit ff8f48814d68d35904458b844723047af1a45083
Author: Szymon Janc 
AuthorDate: Thu Apr 9 14:01:07 2020 +0200

Apache Mynewt 1.8.0 release
---
 repository.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/repository.yml b/repository.yml
index f6b4609..6beedc8 100644
--- a/repository.yml
+++ b/repository.yml
@@ -38,8 +38,8 @@ repo.versions:
 "1.7.0": "mynewt_1_7_0_tag"
 "1.8.0": "mynewt_1_8_0_tag"
 
-"0-latest": "1.7.0"
-"1-latest": "1.7.0"
+"0-latest": "1.8.0"
+"1-latest": "1.8.0"
 "0-dev": "0.0.0"   # master
 
 "0.8-latest": "0.8.0"



[mynewt-nimble] branch master updated: Apache Mynewt NimBLE 1.3.0 release

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

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


The following commit(s) were added to refs/heads/master by this push:
 new c743e9b  Apache Mynewt NimBLE 1.3.0 release
c743e9b is described below

commit c743e9b9dec429c29cd8f4c947f61176c907e5e9
Author: Szymon Janc 
AuthorDate: Thu Apr 9 14:03:17 2020 +0200

Apache Mynewt NimBLE 1.3.0 release
---
 repository.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/repository.yml b/repository.yml
index 0ead71a..4a097d3 100644
--- a/repository.yml
+++ b/repository.yml
@@ -22,8 +22,8 @@ repo.versions:
 "0.0.0": "master"
 
 "0-dev": "0.0.0"
-"0-latest": "1.2.0"
-"1-latest": "1.2.0"
+"0-latest": "1.3.0"
+"1-latest": "1.3.0"
 
 "1.0.0": "nimble_1_0_0_tag"
 "1.1.0": "nimble_1_1_0_tag"



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #796: Apps: central added

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796#issuecomment-611446715
 
 
   
   
   
   ## 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 #796: Apps: central added

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796#issuecomment-611439828
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/central/src/main.c
   
   
   ```diff
   @@ -56,7 +56,7 @@
} else {
MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
event->connect.status);
   -} 
   +}
break;
case BLE_GAP_EVENT_DISCONNECT:
MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   ```
   
   


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 #796: Apps: central added

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796#issuecomment-611425136
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/central/src/main.c
   
   
   ```diff
   @@ -56,7 +56,7 @@
} else {
MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
event->connect.status);
   -} 
   +}
break;
case BLE_GAP_EVENT_DISCONNECT:
MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   @@ -222,7 +222,7 @@
};

switch (event->type) {
   -/*advertising report has been received during discovery procedure*/   
   +/*advertising report has been received during discovery procedure*/
case BLE_GAP_EVENT_DISC:
MODLOG_DFLT(INFO, "Advertising report received!\n");
rc = ble_hs_adv_parse_fields(_fields, event->disc.data,
   @@ -236,7 +236,7 @@
   if doesn't fit - end procedure and go back to scanning,
   else - connect. UUID digits are printed in decimal form until
   they don't match */
   -for (int i = 0; i < sizeof(predef_uuid); i++) {
   +for (int i = 0; i < sizeof(predef_uuid); i++) {
MODLOG_DFLT(INFO, "%d, ", parsed_fields.uuids128->value[i]);
if (parsed_fields.uuids128->value[i] != predef_uuid[i]) {
MODLOG_DFLT(INFO, "doesn't fit\n");
   @@ -282,7 +282,7 @@
int rc;
/* Generate a non-resolvable private address. */
ble_app_set_addr();
   -
   +
/* g_own_addr_type will store type of addres our BSP uses */

rc = ble_hs_util_ensure_addr(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] apache-mynewt-bot commented on issue #796: Apps: central added

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796#issuecomment-611439828
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/central/src/main.c
   
   
   ```diff
   @@ -56,7 +56,7 @@
} else {
MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
event->connect.status);
   -} 
   +}
break;
case BLE_GAP_EVENT_DISCONNECT:
MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   ```
   
   


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 #797: Apps: readme added

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #797: Apps: readme added
URL: https://github.com/apache/mynewt-nimble/pull/797#issuecomment-611427696
 
 
   
   
   
   ## 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 #796: Apps: central added

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796#issuecomment-611425136
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/central/src/main.c
   
   
   ```diff
   @@ -56,7 +56,7 @@
} else {
MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
event->connect.status);
   -} 
   +}
break;
case BLE_GAP_EVENT_DISCONNECT:
MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   @@ -222,7 +222,7 @@
};

switch (event->type) {
   -/*advertising report has been received during discovery procedure*/   
   +/*advertising report has been received during discovery procedure*/
case BLE_GAP_EVENT_DISC:
MODLOG_DFLT(INFO, "Advertising report received!\n");
rc = ble_hs_adv_parse_fields(_fields, event->disc.data,
   @@ -236,7 +236,7 @@
   if doesn't fit - end procedure and go back to scanning,
   else - connect. UUID digits are printed in decimal form until
   they don't match */
   -for (int i = 0; i < sizeof(predef_uuid); i++) {
   +for (int i = 0; i < sizeof(predef_uuid); i++) {
MODLOG_DFLT(INFO, "%d, ", parsed_fields.uuids128->value[i]);
if (parsed_fields.uuids128->value[i] != predef_uuid[i]) {
MODLOG_DFLT(INFO, "doesn't fit\n");
   @@ -282,7 +282,7 @@
int rc;
/* Generate a non-resolvable private address. */
ble_app_set_addr();
   -
   +
/* g_own_addr_type will store type of addres our BSP uses */

rc = ble_hs_util_ensure_addr(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] Reynevan94 opened a new pull request #797: Apps: readme added

2020-04-09 Thread GitBox
Reynevan94 opened a new pull request #797: Apps: readme added
URL: https://github.com/apache/mynewt-nimble/pull/797
 
 
   Added readme describing sample applications


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] Reynevan94 closed pull request #795: Apps readme

2020-04-09 Thread GitBox
Reynevan94 closed pull request #795: Apps readme
URL: https://github.com/apache/mynewt-nimble/pull/795
 
 
   


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] Reynevan94 opened a new pull request #796: Apps: central added

2020-04-09 Thread GitBox
Reynevan94 opened a new pull request #796: Apps: central added
URL: https://github.com/apache/mynewt-nimble/pull/796
 
 
   Added central application which presents how to connect to peripheral.


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-09 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_r406038133
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5605,6 +5605,41 @@ ble_gap_unpair_oldest_peer(void)
 return 0;
 }
 
+int
+ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer)
+{
+ble_addr_t oldest_peer_id_addr[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
+int num_peers;
+int rc, i;
+
+rc = ble_store_util_bonded_peers(
+_peer_id_addr[0], _peers, 
MYNEWT_VAL(BLE_STORE_MAX_BONDS));
+if (rc != 0) {
+return rc;
+}
+
+if (num_peers == 0) {
+return BLE_HS_ENOENT;
+}
+
+for (i = 0; i < num_peers; i++) {
+if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) != 
0) {
 
 Review comment:
   Sure !!


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: Apps: peripheral added Added example of simple application that is capable of advertising with response and connecting

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

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


The following commit(s) were added to refs/heads/master by this push:
 new bc31c24  Apps: peripheral added Added example of simple application 
that is capable of advertising with response and connecting
bc31c24 is described below

commit bc31c240b30e7982d93fc0c932824be474b8369d
Author: Krzysztof Kopyściński 
AuthorDate: Wed Apr 8 11:44:11 2020 +0200

Apps: peripheral added
Added example of simple application that is capable of advertising with 
response and connecting
---
 apps/peripheral/pkg.yml|  37 ++
 apps/peripheral/src/main.c | 166 +
 2 files changed, 203 insertions(+)

diff --git a/apps/peripheral/pkg.yml b/apps/peripheral/pkg.yml
new file mode 100755
index 000..6167eda
--- /dev/null
+++ b/apps/peripheral/pkg.yml
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+pkg.name: "apps/peripheral"
+pkg.type: app
+pkg.description: "Basic perihperal application"
+pkg.author: "Krzysztof Kopyściński krzysztof.kopyscin...@codecoup.pl"
+
+
+pkg.deps:
+- "@apache-mynewt-core/kernel/os"
+- "@apache-mynewt-core/sys/console/full"
+- "@apache-mynewt-core/sys/log/full"
+- "@apache-mynewt-core/sys/stats/full"
+- "@apache-mynewt-core/sys/log/modlog"
+- "@apache-mynewt-nimble/nimble/host"
+- "@apache-mynewt-nimble/nimble/host/util/"
+- "@apache-mynewt-nimble/nimble/host/services/gap"
+- "@apache-mynewt-nimble/nimble/host/store/config"
+- "@apache-mynewt-nimble/nimble/transport"
+
diff --git a/apps/peripheral/src/main.c b/apps/peripheral/src/main.c
new file mode 100755
index 000..f22579a
--- /dev/null
+++ b/apps/peripheral/src/main.c
@@ -0,0 +1,166 @@
+/*
+ * 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 
+#include 
+#include 
+#include 
+
+#include "os/os.h"
+#include "sysinit/sysinit.h"
+#include "log/log.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "services/gap/ble_svc_gap.h"
+
+static uint8_t g_own_addr_type;
+static uint16_t conn_handle;
+static const char *device_name = "Mynewt";
+
+/* adv_event() calls advertise(), so forward declaration is required */
+static void advertise(void);
+
+static int
+adv_event(struct ble_gap_event *event, void *arg)
+{
+switch (event->type) {
+case BLE_GAP_EVENT_ADV_COMPLETE:
+MODLOG_DFLT(INFO,"Advertising completed, termination code: %d\n",
+event->adv_complete.reason);
+advertise();
+break;
+case BLE_GAP_EVENT_CONNECT:
+assert(event->connect.status == 0);
+MODLOG_DFLT(INFO, "connection %s; status=%d\n",
+event->connect.status == 0 ? "established" : "failed",
+event->connect.status);
+break;
+case BLE_GAP_EVENT_CONN_UPDATE_REQ:
+/* connected device requests update of connection parameters,
+   and these are being filled in - NULL sets default values */
+MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
+event->conn_update_req.conn_handle = conn_handle;
+event->conn_update_req.peer_params = NULL;
+MODLOG_DFLT(INFO, "connection parameters updated!\n");
+break;
+case BLE_GAP_EVENT_DISCONNECT:
+MODLOG_DFLT(INFO, "disconnect; reason=%d\n",
+

[GitHub] [mynewt-nimble] sjanc merged pull request #794: Apps: add peripheral

2020-04-09 Thread GitBox
sjanc merged pull request #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794
 
 
   


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 #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 Thread GitBox
rymanluk 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_r406024875
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5605,6 +5605,41 @@ ble_gap_unpair_oldest_peer(void)
 return 0;
 }
 
+int
+ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer)
+{
+ble_addr_t oldest_peer_id_addr[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
 
 Review comment:
   nitpick: please rename to `peer_id_addrs`


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 #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 Thread GitBox
rymanluk 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_r406032755
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,16 +372,24 @@ 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;
 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:
+/* Try to remove unbonded CCCDs first */
+if ((rc = ble_store_clean_old_cccds((void *) 
>overflow.value->cccd.peer_addr)) == BLE_HS_ENOENT) {
 
 Review comment:
   I don't think we need to clean unbodend CCCDs as we do not keep such in the 
storage. Unless I miss something, but CCCDs are stored only for bonded devices, 
and once unbonded, we do clean CCCDs. If it does not work like this (I believe 
it does) then we have problem somewhere else.
   
   In this case we just need to call the new function and that is it. Nothing 
else is needed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
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 #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 Thread GitBox
rymanluk 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_r406022480
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5605,6 +5605,41 @@ ble_gap_unpair_oldest_peer(void)
 return 0;
 }
 
+int
+ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer)
+{
+ble_addr_t oldest_peer_id_addr[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
+int num_peers;
+int rc, i;
+
+rc = ble_store_util_bonded_peers(
+_peer_id_addr[0], _peers, 
MYNEWT_VAL(BLE_STORE_MAX_BONDS));
+if (rc != 0) {
+return rc;
+}
+
+if (num_peers == 0) {
+return BLE_HS_ENOENT;
+}
+
+for (i = 0; i < num_peers; i++) {
+if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) != 
0) {
 
 Review comment:
   I would use here `ble_addr_cmp()`


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 #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 Thread GitBox
rymanluk 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_r406030239
 
 

 ##
 File path: nimble/host/include/host/ble_gap.h
 ##
 @@ -1896,6 +1896,20 @@ int ble_gap_unpair(const ble_addr_t *peer_addr);
  */
 int ble_gap_unpair_oldest_peer(void);
 
+/**
+ * Similar to `ble_gap_unpair_oldest_peer()`, except it makes sure that current
+ * peer is not deleted.
+ *
+ * @param peer_addr Address of the current peer (not to be deleted)
+ *
+ * @return  0 on success;
+ *  A BLE host HCI return code if the controller
+ *  rejected the request;
+ *  A BLE host core return code on unexpected
+ *  error.
+ */
+int ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer);
 
 Review comment:
   let us call it `ble_gap_unpair_oldest_except` () and change the parameter 
name to `peer_addr`. 
   This functionality is not really dedicated only to current device. You might 
want to have device which you don't want to unpair no matter what :)


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 #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-09 Thread GitBox
rymanluk 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_r406023837
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5605,6 +5605,41 @@ ble_gap_unpair_oldest_peer(void)
 return 0;
 }
 
+int
+ble_gap_unpair_oldest_except_curr(const ble_addr_t *curr_peer)
+{
+ble_addr_t oldest_peer_id_addr[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
+int num_peers;
+int rc, i;
+
+rc = ble_store_util_bonded_peers(
+_peer_id_addr[0], _peers, 
MYNEWT_VAL(BLE_STORE_MAX_BONDS));
+if (rc != 0) {
+return rc;
+}
+
+if (num_peers == 0) {
+return BLE_HS_ENOENT;
+}
+
+for (i = 0; i < num_peers; i++) {
+if (memcmp(curr_peer, _peer_id_addr[i], sizeof (ble_addr_t)) != 
0) {
+break;
+}
+}
+
+if (i < num_peers) {
 
 Review comment:
   
   I would do it little simpler.
   
   ```
   if (i >= num_peers) {
return BLE_HS_ENOMEM;
   }
   
   return ble_gap_unpair(_peer_id_addr[i]);
   
   ```
   
   


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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-611385239
 
 
   
   
   
   ## 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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-611368392
 
 
   
   
   
   ## 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] sjanc commented on a change in pull request #794: Apps: add peripheral

2020-04-09 Thread GitBox
sjanc commented on a change in pull request #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#discussion_r406007056
 
 

 ##
 File path: apps/peripheral/src/main.c
 ##
 @@ -0,0 +1,166 @@
+/*
+ * 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 
+#include 
+#include 
+#include 
+
+#include "os/os.h"
+#include "sysinit/sysinit.h"
+#include "log/log.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "services/gap/ble_svc_gap.h"
+
+static uint8_t g_own_addr_type;
+static uint16_t conn_handle;
+static const char *device_name = "Mynewt";
+
+/* adv_event() calls advertise(), so forward declaration is required */
+static void advertise(void);
+
+static int
+adv_event(struct ble_gap_event *event, void *arg)
+{
+switch (event->type) {
+case BLE_GAP_EVENT_ADV_COMPLETE:
+MODLOG_DFLT(INFO,"Advertising completed, termination code: %d\n",
+event->adv_complete.reason);
+advertise();
+break;
+case BLE_GAP_EVENT_CONNECT:
+assert(event->connect.status != 0);
 
 Review comment:
   shouldn't this be status == 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] apache-mynewt-bot commented on issue #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-611368392
 
 
   
   
   
   ## 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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-611356432
 
 
   
   
   
   ## 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 #795: Apps readme

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #795: Apps readme
URL: https://github.com/apache/mynewt-nimble/pull/795#issuecomment-611362982
 
 
   
   
   
   ## 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 #795: Apps readme

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #795: Apps readme
URL: https://github.com/apache/mynewt-nimble/pull/795#issuecomment-611361726
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/peripheral/src/main.c
   
   
   ```diff
   @@ -53,14 +53,13 @@
/* Connection failed; resume advertising */
advertise();
conn_handle = 0;
   -}
   -else {
   +} else   {
conn_handle = event->connect.conn_handle;
}
break;
case BLE_GAP_EVENT_CONN_UPDATE_REQ:
/* connected device requests update of connection parameters,
   -and these are being filled in - NULL sets default values */
   +   and these are being filled in - NULL sets default values */
MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
event->conn_update_req.conn_handle = conn_handle;
event->conn_update_req.peer_params = NULL;
   @@ -71,18 +70,18 @@
event->disconnect.reason);

/* reset conn_handle */
   -conn_handle = BLE_HS_CONN_HANDLE_NONE; 
   +conn_handle = BLE_HS_CONN_HANDLE_NONE;

/* Connection terminated; resume advertising */
advertise();
   -break; 
   +break;
default:
MODLOG_DFLT(ERROR, "Advertising event not handled,"
"event code: %u\n", event->type);
   -break;
   +break;
}
return 0;
   -}   
  
   +}

static void
advertise(void)
   @@ -93,8 +92,8 @@
struct ble_gap_adv_params adv_params;
struct ble_hs_adv_fields fields;
/* advertising payload is split into advertising data and advertising
   -response, because all data cannot fit into single packet; name of device
   -is sent as response to scan request */
   +   response, because all data cannot fit into single packet; name of 
device
   +   is sent as response to scan request */
struct ble_hs_adv_fields rsp_fields;

/*fill all fields and parameters with zeros*/
   @@ -103,7 +102,7 @@
memset(_fields, 0, sizeof(rsp_fields));

adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
   -adv_params.disc_mode =  BLE_GAP_DISC_MODE_GEN;
   +adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;

fields.flags = BLE_HS_ADV_F_DISC_GEN |
   BLE_HS_ADV_F_BREDR_UNSUP;
   @@ -117,7 +116,7 @@
rsp_fields.name = (uint8_t *)device_name;
rsp_fields.name_len = strlen(device_name);
rsp_fields.name_is_complete = 1;
   -
   +
rc = ble_gap_adv_set_fields();
assert(rc == 0);

   @@ -130,7 +129,7 @@
assert(rc == 0);
}

   -static void 
   +static void
on_sync(void)
{
int rc;
   @@ -150,10 +149,11 @@
MODLOG_DFLT(INFO, "Resetting state; reason=%d\n", reason);
}

   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
{
int rc;
   -
   +
/* Initialize all packages. */
sysinit();

   ```
   
   


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 #795: Apps readme

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #795: Apps readme
URL: https://github.com/apache/mynewt-nimble/pull/795#issuecomment-611361726
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/peripheral/src/main.c
   
   
   ```diff
   @@ -53,14 +53,13 @@
/* Connection failed; resume advertising */
advertise();
conn_handle = 0;
   -}
   -else {
   +} else   {
conn_handle = event->connect.conn_handle;
}
break;
case BLE_GAP_EVENT_CONN_UPDATE_REQ:
/* connected device requests update of connection parameters,
   -and these are being filled in - NULL sets default values */
   +   and these are being filled in - NULL sets default values */
MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
event->conn_update_req.conn_handle = conn_handle;
event->conn_update_req.peer_params = NULL;
   @@ -71,18 +70,18 @@
event->disconnect.reason);

/* reset conn_handle */
   -conn_handle = BLE_HS_CONN_HANDLE_NONE; 
   +conn_handle = BLE_HS_CONN_HANDLE_NONE;

/* Connection terminated; resume advertising */
advertise();
   -break; 
   +break;
default:
MODLOG_DFLT(ERROR, "Advertising event not handled,"
"event code: %u\n", event->type);
   -break;
   +break;
}
return 0;
   -}   
  
   +}

static void
advertise(void)
   @@ -93,8 +92,8 @@
struct ble_gap_adv_params adv_params;
struct ble_hs_adv_fields fields;
/* advertising payload is split into advertising data and advertising
   -response, because all data cannot fit into single packet; name of device
   -is sent as response to scan request */
   +   response, because all data cannot fit into single packet; name of 
device
   +   is sent as response to scan request */
struct ble_hs_adv_fields rsp_fields;

/*fill all fields and parameters with zeros*/
   @@ -103,7 +102,7 @@
memset(_fields, 0, sizeof(rsp_fields));

adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
   -adv_params.disc_mode =  BLE_GAP_DISC_MODE_GEN;
   +adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;

fields.flags = BLE_HS_ADV_F_DISC_GEN |
   BLE_HS_ADV_F_BREDR_UNSUP;
   @@ -117,7 +116,7 @@
rsp_fields.name = (uint8_t *)device_name;
rsp_fields.name_len = strlen(device_name);
rsp_fields.name_is_complete = 1;
   -
   +
rc = ble_gap_adv_set_fields();
assert(rc == 0);

   @@ -130,7 +129,7 @@
assert(rc == 0);
}

   -static void 
   +static void
on_sync(void)
{
int rc;
   @@ -150,10 +149,11 @@
MODLOG_DFLT(INFO, "Resetting state; reason=%d\n", reason);
}

   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
{
int rc;
   -
   +
/* Initialize all packages. */
sysinit();

   ```
   
   


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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
sjanc commented on a change in pull request #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#discussion_r405988029
 
 

 ##
 File path: apps/peripheral/pkg.yml
 ##
 @@ -0,0 +1,36 @@
+#
+# 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.
+#
+
+pkg.name: "apps/peripheral"
+pkg.type: app
+pkg.description: "Basic perihperal application"
+pkg.author: "Krzysztof Kopyściński krzysztof.kopyscin...@codecoup.pl"
+
+
+pkg.deps:
+- "@apache-mynewt-core/kernel/os"
+- "@apache-mynewt-core/sys/console/full"
+- "@apache-mynewt-core/sys/log/full"
+- "@apache-mynewt-core/sys/stats/full"
+- "@apache-mynewt-core/sys/log/modlog"
+- "@apache-mynewt-nimble/nimble/host"
+- "@apache-mynewt-nimble/nimble/host/util/"
+- "@apache-mynewt-nimble/nimble/host/services/gap"
+- "@apache-mynewt-nimble/nimble/host/store/config"
+- "@apache-mynewt-nimble/nimble/transport"
 
 Review comment:
   missing newline at the end


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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
sjanc commented on a change in pull request #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#discussion_r405988453
 
 

 ##
 File path: apps/peripheral/src/main.c
 ##
 @@ -0,0 +1,172 @@
+/*
+ * 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 
+#include 
+#include 
+#include 
+
+#include "os/os.h"
+#include "sysinit/sysinit.h"
+#include "log/log.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "services/gap/ble_svc_gap.h"
+
+static uint8_t g_own_addr_type;
+static uint16_t conn_handle;
+static const char *device_name = "Mynewt";
+
+/* adv_event() calls advertise(), so forward declaration is required */
+static void advertise(void);
+
+static int
+adv_event(struct ble_gap_event *event, void *arg)
+{
+switch (event->type) {
+case BLE_GAP_EVENT_ADV_COMPLETE:
+MODLOG_DFLT(INFO,"Advertising completed, termination code: %d\n",
+event->adv_complete.reason);
+advertise();
+break;
+case BLE_GAP_EVENT_CONNECT:
+MODLOG_DFLT(INFO, "connection %s; status=%d\n",
+event->connect.status == 0 ? "established" : "failed",
+event->connect.status);
+if (event->connect.status != 0) {
+/* Connection failed; resume advertising */
+advertise();
+conn_handle = 0;
+} else {
+conn_handle = event->connect.conn_handle;
+}
+break;
+case BLE_GAP_EVENT_CONN_UPDATE_REQ:
+/* connected device requests update of connection parameters,
+   and these are being filled in - NULL sets default values */
+MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
+event->conn_update_req.conn_handle = conn_handle;
+event->conn_update_req.peer_params = NULL;
+MODLOG_DFLT(INFO, "connection parameters updated!\n");
+break;
+case BLE_GAP_EVENT_DISCONNECT:
+MODLOG_DFLT(INFO, "disconnect; reason=%d\n",
+event->disconnect.reason);
+
+/* reset conn_handle */
+conn_handle = BLE_HS_CONN_HANDLE_NONE;
+
+/* Connection terminated; resume advertising */
+advertise();
+break;
+default:
+MODLOG_DFLT(ERROR, "Advertising event not handled,"
+"event code: %u\n", event->type);
+break;
+}
+return 0;
+}
+
+static void
+advertise(void)
+{
+int rc;
+
+/* set adv parameters */
+struct ble_gap_adv_params adv_params;
+struct ble_hs_adv_fields fields;
+/* advertising payload is split into advertising data and advertising
+   response, because all data cannot fit into single packet; name of device
+   is sent as response to scan request */
+struct ble_hs_adv_fields rsp_fields;
+
+/* fill all fields and parameters with zeros */
+memset(_params, 0, sizeof(adv_params));
+memset(, 0, sizeof(fields));
+memset(_fields, 0, sizeof(rsp_fields));
+
+adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
+adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
+
+fields.flags = BLE_HS_ADV_F_DISC_GEN |
+   BLE_HS_ADV_F_BREDR_UNSUP;
+fields.uuids128 = BLE_UUID128(BLE_UUID128_DECLARE(
+0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff));
+fields.num_uuids128 = 1;
+fields.uuids128_is_complete = 0;;
+fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
+
+rsp_fields.name = (uint8_t *)device_name;
+rsp_fields.name_len = strlen(device_name);
+rsp_fields.name_is_complete = 1;
+
+rc = ble_gap_adv_set_fields();
+assert(rc == 0);
+
+rc = ble_gap_adv_rsp_set_fields(_fields);
+
+MODLOG_DFLT(INFO,"Starting advertising...\n");
+
+rc = ble_gap_adv_start(g_own_addr_type, NULL, 100,
+  _params, adv_event, NULL);
 
 Review comment:
   some indentation issues


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:

[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #795: Apps readme

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #795: Apps readme
URL: https://github.com/apache/mynewt-nimble/pull/795#issuecomment-610897857
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/peripheral/src/main.c
   
   
   ```diff
   @@ -53,14 +53,13 @@
/* Connection failed; resume advertising */
advertise();
conn_handle = 0;
   -}
   -else {
   +} else   {
conn_handle = event->connect.conn_handle;
}
break;
case BLE_GAP_EVENT_CONN_UPDATE_REQ:
/* connected device requests update of connection parameters,
   -and these are being filled in - NULL sets default values */
   +   and these are being filled in - NULL sets default values */
MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
event->conn_update_req.conn_handle = conn_handle;
event->conn_update_req.peer_params = NULL;
   @@ -71,18 +70,18 @@
event->disconnect.reason);

/* reset conn_handle */
   -conn_handle = BLE_HS_CONN_HANDLE_NONE; 
   +conn_handle = BLE_HS_CONN_HANDLE_NONE;

/* Connection terminated; resume advertising */
advertise();
   -break; 
   +break;
default:
MODLOG_DFLT(ERROR, "Advertising event not handled,"
"event code: %u\n", event->type);
   -break;
   +break;
}
return 0;
   -}   
  
   +}

static void
advertise(void)
   @@ -93,8 +92,8 @@
struct ble_gap_adv_params adv_params;
struct ble_hs_adv_fields fields;
/* advertising payload is split into advertising data and advertising
   -response, because all data cannot fit into single packet; name of device
   -is sent as response to scan request */
   +   response, because all data cannot fit into single packet; name of 
device
   +   is sent as response to scan request */
struct ble_hs_adv_fields rsp_fields;

/*fill all fields and parameters with zeros*/
   @@ -103,7 +102,7 @@
memset(_fields, 0, sizeof(rsp_fields));

adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
   -adv_params.disc_mode =  BLE_GAP_DISC_MODE_GEN;
   +adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;

fields.flags = BLE_HS_ADV_F_DISC_GEN |
   BLE_HS_ADV_F_BREDR_UNSUP;
   @@ -117,7 +116,7 @@
rsp_fields.name = (uint8_t *)device_name;
rsp_fields.name_len = strlen(device_name);
rsp_fields.name_is_complete = 1;
   -
   +
rc = ble_gap_adv_set_fields();
assert(rc == 0);

   @@ -130,7 +129,7 @@
assert(rc == 0);
}

   -static void 
   +static void
on_sync(void)
{
int rc;
   @@ -150,10 +149,11 @@
MODLOG_DFLT(INFO, "Resetting state; reason=%d\n", reason);
}

   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
{
int rc;
   -
   +
/* Initialize all packages. */
sysinit();

   ```
   
   


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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
sjanc commented on a change in pull request #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#discussion_r405989498
 
 

 ##
 File path: apps/peripheral/src/main.c
 ##
 @@ -0,0 +1,172 @@
+/*
+ * 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 
+#include 
+#include 
+#include 
+
+#include "os/os.h"
+#include "sysinit/sysinit.h"
+#include "log/log.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "services/gap/ble_svc_gap.h"
+
+static uint8_t g_own_addr_type;
+static uint16_t conn_handle;
+static const char *device_name = "Mynewt";
+
+/* adv_event() calls advertise(), so forward declaration is required */
+static void advertise(void);
+
+static int
+adv_event(struct ble_gap_event *event, void *arg)
+{
+switch (event->type) {
+case BLE_GAP_EVENT_ADV_COMPLETE:
+MODLOG_DFLT(INFO,"Advertising completed, termination code: %d\n",
+event->adv_complete.reason);
+advertise();
+break;
+case BLE_GAP_EVENT_CONNECT:
+MODLOG_DFLT(INFO, "connection %s; status=%d\n",
+event->connect.status == 0 ? "established" : "failed",
+event->connect.status);
+if (event->connect.status != 0) {
 
 Review comment:
   hmm I don't think you can get error here when being peripheral that is not 
doing directed advertising. Maybe change this to assert?


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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot commented on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-611356432
 
 
   
   
   
   ## 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 #794: Apps: add peripheral

2020-04-09 Thread GitBox
apache-mynewt-bot removed a comment on issue #794: Apps: add peripheral
URL: https://github.com/apache/mynewt-nimble/pull/794#issuecomment-610926423
 
 
   
   
   
   ## 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-nimble] branch master updated (c98e1c3 -> 46db1ea)

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

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


from c98e1c3  nimble/ll: Drop ext adv event if aux is not sent
 add 46db1ea  apps: scanner added

No new revisions were added by this update.

Summary of changes:
 apps/{advertiser => scanner}/pkg.yml|  12 +-
 apps/{blecent/src/misc.c => scanner/src/main.c} | 174 +++-
 2 files changed, 120 insertions(+), 66 deletions(-)
 copy apps/{advertiser => scanner}/pkg.yml (80%)
 copy apps/{blecent/src/misc.c => scanner/src/main.c} (66%)



  1   2   >