[GitHub] [mynewt-core] caspermeijn commented on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


caspermeijn commented on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-742265538


   @andrzej-kaczmarek Thanks, with latest newt it builds.
   
   @wes3 So basically both question are for to get more accurate time handling. 
Got it.
   
   @kasjer `hw/util/button` build correctly for me with these changes.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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




[GitHub] [mynewt-core] wes3 edited a comment on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


wes3 edited a comment on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-742192110


   @caspermeijn I can answer some of the questions you posed.
   
   1) Why would someone want to change this value?
   Some may want to change this value so that the time resolution for the os 
tick to be greater or less than the default value set. Some folks may want a 1 
msec OS tick resolution whereas some may want longer. If you use 128 ticks per 
second the rate is, I believe 7.8125 msecs per tick. That may be too long for 
some applications (for example).
   2) Why do all mcu define their own value?
   The main reason for this, I believe, is the default timer used for 
generating the os tick. We wanted to be able to generate the tick period 
exactly. Consider a 1 MHz timer and a 32768 Hz timer. For the 32768 timer, 
generating a 10msec os tick is not easy given integer number of ticks. That is 
why 128 is chosen for those MCUs as the 7.8125msec period is an integer number 
of ticks for a 32768 timer. For 1MHz, a 10msec resolution was chosen since that 
is an integer number of ticks for that timer.
   3) Would it make sense to standardize the actual value?
   I think, given the reason all mcus define their own values, no. There are 
really only two values I think used that are "standard": 128 and 100. So this 
seems ok to me.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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




[GitHub] [mynewt-core] wes3 commented on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


wes3 commented on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-742192110


   @caspermeijn I can answer some of the questions you posed.
   
   1) Why would someone want to change this value?
   Some may want to change this value so that the time resolution for the os 
tick to be greater or less than the default value set. Some folks may want a 1 
msec OS tick resolution whereas some may want longer. If you use 128 ticks per 
second the rate is, I believe 7.8125 msecs per tick.
   2) Why do all mcu define their own value?
   The main reason for this, I believe, is the default timer used for 
generating the os tick. We wanted to be able to generate the tick period 
exactly. Consider a 1 MHz timer and a 32768 Hz timer. For the 32768 timer, 
generating a 10msec os tick is not easy given integer number of ticks. That is 
why 128 is chosen for those MCUs as the 7.8125msec period is an integer number 
of ticks for a 32768 timer. For 1MHz, a 10msec resolution was chosen since that 
is an integer number of ticks for that timer.
   3) Would it make sense to standardize the actual value?
   I think, given the reason all mcus define their own values, no. There are 
really only two values I think used that are "standard": 128 and 100. So this 
seems ok to me.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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




[mynewt-newt] branch master updated: newt: Support legacy TLV option

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

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


The following commit(s) were added to refs/heads/master by this push:
 new da16a62  newt: Support legacy TLV option
da16a62 is described below

commit da16a6226cad504ea8c700965f279b1d63592fac
Author: Andy Gross 
AuthorDate: Wed Nov 18 11:47:44 2020 -0600

newt: Support legacy TLV option

This patch adds support for generating images using legacy TLV values for
AES_NONCE and SECRET_ID.  This allows newer newt tool versions to be able to
create new application images for devices which only support legacy TLV 
values.

Signed-off-by: Andy Gross 
---
 go.mod  | 3 ++-
 newt/cli/image_cmds.go  | 8 ++--
 newt/cli/run_cmds.go| 4 ++--
 newt/imgprod/imgprod.go | 9 ++---
 newt/imgprod/v1.go  | 4 ++--
 5 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/go.mod b/go.mod
index 4ea3030..9494e6f 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.13
 
 require (
github.com/NickBall/go-aes-key-wrap v0.0.0-20170929221519-1c3aa3e4dfc5
-   github.com/apache/mynewt-artifact v0.0.20
+   github.com/apache/mynewt-artifact v0.0.21
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/shirou/gopsutil v2.20.8+incompatible
@@ -16,3 +16,4 @@ require (
github.com/ugorji/go/codec v1.1.7
golang.org/x/crypto v0.0.0-2019062107-cc06ce4a13d4
 )
+
diff --git a/newt/cli/image_cmds.go b/newt/cli/image_cmds.go
index fb5373d..6da30a7 100644
--- a/newt/cli/image_cmds.go
+++ b/newt/cli/image_cmds.go
@@ -35,6 +35,7 @@ import (
 
 var useV1 bool
 var useV2 bool
+var useLegacyTLV bool
 var encKeyFilename string
 var encKeyIndex int
 var hdrPad int
@@ -136,10 +137,10 @@ func createImageRunCmd(cmd *cobra.Command, args []string) 
{
 
if useV1 {
err = imgprod.ProduceAllV1(b, ver, keys, encKeyFilename, 
encKeyIndex,
-   hdrPad, imagePad, sections)
+   hdrPad, imagePad, sections, useLegacyTLV)
} else {
err = imgprod.ProduceAll(b, ver, keys, encKeyFilename, 
encKeyIndex,
-   hdrPad, imagePad, sections)
+   hdrPad, imagePad, sections, useLegacyTLV)
}
if err != nil {
NewtUsage(nil, err)
@@ -205,6 +206,9 @@ func AddImageCommands(cmd *cobra.Command) {
createImageCmd.PersistentFlags().StringVarP(§ions,
"sections", "S", "", "Section names for TLVs, comma delimited")
 
+   createImageCmd.PersistentFlags().BoolVarP(&useLegacyTLV,
+   "legacy-tlvs", "L", false, "Use legacy TLV values for NONCE and 
SECRET_ID")
+
cmd.AddCommand(createImageCmd)
AddTabCompleteFn(createImageCmd, targetList)
 
diff --git a/newt/cli/run_cmds.go b/newt/cli/run_cmds.go
index cd7ce09..936dde8 100644
--- a/newt/cli/run_cmds.go
+++ b/newt/cli/run_cmds.go
@@ -106,10 +106,10 @@ func runRunCmd(cmd *cobra.Command, args []string) {
 
if useV1 {
err = imgprod.ProduceAllV1(b, ver, keys, 
encKeyFilename, encKeyIndex,
-   hdrPad, imagePad, sections)
+   hdrPad, imagePad, sections, 
useLegacyTLV)
} else {
err = imgprod.ProduceAll(b, ver, keys, 
encKeyFilename, encKeyIndex,
-   hdrPad, imagePad, sections)
+   hdrPad, imagePad, sections, 
useLegacyTLV)
}
if err != nil {
NewtUsage(nil, err)
diff --git a/newt/imgprod/imgprod.go b/newt/imgprod/imgprod.go
index 8b25f85..1e82977 100644
--- a/newt/imgprod/imgprod.go
+++ b/newt/imgprod/imgprod.go
@@ -54,6 +54,7 @@ type ImageProdOpts struct {
HdrPadint
ImagePad  int
DummyC*toolchain.Compiler
+   UseLegacyTLV  bool
 }
 
 type ProducedImage struct {
@@ -153,6 +154,7 @@ func produceApp(opts ImageProdOpts, loaderHash []byte) 
(ProducedImage, error) {
LoaderHash:loaderHash,
HdrPad:opts.HdrPad,
ImagePad:  opts.ImagePad,
+   UseLegacyTLV:  opts.UseLegacyTLV,
}
 
ri, err := image.GenerateImage(igo)
@@ -270,7 +272,7 @@ func ProduceManifest(opts manifest.ManifestCreateOpts) 
error {
 
 func OptsFromTgtBldr(b *builder.TargetBuilder, ver image.ImageVersion,
sigKeys []sec.PrivSignKey, encKeyFilename string, encKeyIndex int,
-   hdrPad int, imagePad int, sections []image.Section) (ImageProdOpts, 
error) {
+   hdrPad int, imagePad int, sections []image.Secti

[GitHub] [mynewt-newt] utzig merged pull request #420: newt: Support legacy TLV option

2020-12-09 Thread GitBox


utzig merged pull request #420:
URL: https://github.com/apache/mynewt-newt/pull/420


   



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




[GitHub] [mynewt-newt] InternetofAwesome commented on pull request #420: newt: Support legacy TLV option

2020-12-09 Thread GitBox


InternetofAwesome commented on pull request #420:
URL: https://github.com/apache/mynewt-newt/pull/420#issuecomment-742120776


   Is there anything holding this from being merged? 
   If not, would someone with privileges mind merging?



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




[GitHub] [mynewt-newt] vrahane commented on issue #425: newt test does not work with Mac OS X Catalina

2020-12-09 Thread GitBox


vrahane commented on issue #425:
URL: https://github.com/apache/mynewt-newt/issues/425#issuecomment-742093132


   cc @ccollins476ad @nkaje @aditihilbert 



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




[GitHub] [mynewt-newt] vrahane opened a new issue #425: newt test does not work with Mac OS X Catalina

2020-12-09 Thread GitBox


vrahane opened a new issue #425:
URL: https://github.com/apache/mynewt-newt/issues/425


   ```
   ld: warning: The i386 architecture is deprecated for macOS (remove from the 
Xcode build setting: ARCHS)
   ld: warning: ignoring file 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libm.tbd, 
missing required architecture i386 in file 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libm.tbd
   ld: warning: ignoring file 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd, 
missing required architecture i386 in file 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd
   Undefined symbols for architecture i386:
 "_cfmakeraw", referenced from:
 _uart_dev_set_attr in 
@apache-mynewt-core_hw_mcu_native.a(native_uart_cfg.o)
 "_cfsetispeed", referenced from:
 _uart_dev_set_attr in 
@apache-mynewt-core_hw_mcu_native.a(native_uart_cfg.o)
 "_isalnum", referenced from:
 _uart_log_data in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 "___snprintf_chk", referenced from:
 _uart_pty in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 _uart_log_data in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 "_isdigit", referenced from:
 _uart_hal_init in 
@apache-mynewt-core_hw_drivers_uart_uart_hal.a(uart_hal.o)
 "_sigaction", referenced from:
 _sim_signals_init in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
 "_setitimer", referenced from:
 _sim_tick_idle in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
 "_tcgetattr", referenced from:
 _uart_pty_set_attr in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 "_sigprocmask", referenced from:
 _sim_save_sr in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
 _sim_restore_sr in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
 _sim_in_critical in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
 "_memcmp", referenced from:
 _addrcmp in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 "_if_nametoindex", referenced from:
 _native_sock_itf_getnext in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 _native_sock_itf_addr in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 _native_sock_itf_addr_getnext in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 "_freeifaddrs", referenced from:
 _native_sock_itf_getnext in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 _native_sock_itf_addr in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 _native_sock_itf_addr_getnext in 
@apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
 "_open$UNIX2003", referenced from:
 _flash_native_file_open in 
@apache-mynewt-core_hw_mcu_native.a(hal_flash.o)
 _uart_open_dev in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 _uart_open_log in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
 "_kill$UNIX2003", referenced from:
   ```



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




[GitHub] [mynewt-core] andrzej-kaczmarek commented on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


andrzej-kaczmarek commented on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-742069559


   @caspermeijn you need to use latest newt (master) to build



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




[GitHub] [mynewt-core] caspermeijn commented on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


caspermeijn commented on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-742057032


   I can't compile with this version of mynewt-core:
   ```
   $ newt build klok-pinetime
   Building target targets/klok-pinetime
   Error: Priority violations detected (Packages can only override settings 
defined by packages of lower priority):
   Package: @apache-mynewt-core/hw/mcu/nordic/nrf52xxx overriding setting: 
OS_TICKS_PER_SEC defined by @apache-mynewt-core/kernel/os
   
   Setting history (newest -> oldest):
   OS_TICKS_PER_SEC: [@apache-mynewt-core/hw/mcu/nordic/nrf52xxx:128, 
@apache-mynewt-core/kernel/os:]
   
   ```



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




[GitHub] [mynewt-core] caspermeijn commented on a change in pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


caspermeijn commented on a change in pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#discussion_r539636969



##
File path: net/ip/native_sockets/syscfg.yml
##
@@ -27,7 +27,7 @@ syscfg.defs:
 description: >
 The frequency at which to poll for received data.  Units
 are OS ticks.
-value: 'OS_TICKS_PER_SEC / 5'
+value: 'MYNEWT_VAL(OS_TICKS_PER_SEC) / 5'

Review comment:
   The `MYNEWT_VAL` macro is not needed, right? As `os_time.h` defines 
`OS_TICKS_PER_SEC`. So as long as all users of `NATIVE_SOCKETS_POLL_ITVL` 
include `os_time.h` it would work. 
   
   Or is the problem that you need a `MYNEWT_VAL` to evaluate the `MYNEWT_VAL`? 
Because that would still be 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




[mynewt-documentation] branch master updated: Update banner release and add 1.8.0 to chooser

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

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


The following commit(s) were added to refs/heads/master by this push:
 new bd68e10  Update banner release and add 1.8.0 to chooser
bd68e10 is described below

commit bd68e100b981ae05a1e40f4d9dd8504c22ecda1a
Author: Fabio Utzig 
AuthorDate: Tue Dec 8 19:22:15 2020 -0300

Update banner release and add 1.8.0 to chooser

Signed-off-by: Fabio Utzig 
---
 docs/themes/mynewt/main-banner.html | 2 +-
 docs/themes/mynewt/versions.html| 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/themes/mynewt/main-banner.html 
b/docs/themes/mynewt/main-banner.html
index 867efd7..0e661d1 100644
--- a/docs/themes/mynewt/main-banner.html
+++ b/docs/themes/mynewt/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/themes/mynewt/versions.html b/docs/themes/mynewt/versions.html
index 6c1f634..2736d0f 100644
--- a/docs/themes/mynewt/versions.html
+++ b/docs/themes/mynewt/versions.html
@@ -3,6 +3,9 @@
   
 Version: latest
   
+  
+Version: 1.8.0
+  
   
 Version: 1.7.0
   



[GitHub] [mynewt-core] kasjer commented on a change in pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


kasjer commented on a change in pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#discussion_r539434707



##
File path: net/ip/native_sockets/syscfg.yml
##
@@ -27,7 +27,7 @@ syscfg.defs:
 description: >
 The frequency at which to poll for received data.  Units
 are OS ticks.
-value: 'OS_TICKS_PER_SEC / 5'
+value: 'MYNEWT_VAL(OS_TICKS_PER_SEC) / 5'

Review comment:
   It turns out that such expressions are not handled sensible by newt tool.





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




[GitHub] [mynewt-nimble] lenzarda opened a new issue #892: ble_hs_cfg: .sm_oob_data_flag, is there an example of a client in linux or windows able to use it?

2020-12-09 Thread GitBox


lenzarda opened a new issue #892:
URL: https://github.com/apache/mynewt-nimble/issues/892


   ble_hs_cfg: .sm_oob_data_flag, is there an example of a client in linux or 
windows able to use it?
   
   If I set the sm_oob_data_flag=1 in 
https://github.com/apache/mynewt-nimble/tree/master/apps/bleprph which software 
in Linux or Windows can I use to test it?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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




[GitHub] [mynewt-nimble] lenzarda opened a new issue #891: ble_hs_cfg: .sm_our_key_dist and .sm_their_key_dist, what are they for?

2020-12-09 Thread GitBox


lenzarda opened a new issue #891:
URL: https://github.com/apache/mynewt-nimble/issues/891


   ble_hs_cfg: .sm_our_key_dist and .sm_their_key_dist, what are they for?
   



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




[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-739996011


   
   
   
   ## 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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2430: standardize OS_TICKS_PER_SEC definition

2020-12-09 Thread GitBox


apache-mynewt-bot commented on pull request #2430:
URL: https://github.com/apache/mynewt-core/pull/2430#issuecomment-741802404


   
   
   
   ## 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




[GitHub] [mynewt-newt] kasjer merged pull request #423: Relax empty values override restriction

2020-12-09 Thread GitBox


kasjer merged pull request #423:
URL: https://github.com/apache/mynewt-newt/pull/423


   



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




[mynewt-newt] branch master updated: Relax empty values override restriction

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 4ced60b  Relax empty values override restriction
4ced60b is described below

commit 4ced60b427b7c6310db8cc02168caaa192e084e6
Author: Jerzy Kasenberg 
AuthorDate: Fri Dec 4 12:41:03 2020 +0100

Relax empty values override restriction

With this change syscfg variables that are defined but don't have
default values in syscfg.defs, can be set in other packages and not only
bsp/app/target.

This way MCU packages can set values that otherwise would have to be
set by every BSP.

Since there is no default value, single package that provides value
is not creating any conflicts.
---
 newt/syscfg/syscfg.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index 80d42eb..f6ccfa7 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -383,7 +383,7 @@ func (entry *CfgEntry) priorityViolations() []CfgPriority {
curType := normalizePkgType(p.Source.Type())
defType := normalizePkgType(entry.PackageDef.Type())
 
-   if p.Source != entry.PackageDef && curType <= defType {
+   if p.Source != entry.PackageDef && curType <= defType && 
entry.History[0].Value != "" {
priority := CfgPriority{
PackageDef:  entry.PackageDef,
PackageSrc:  p.Source,



[GitHub] [mynewt-nimble] btsimonh opened a new issue #890: ble_gap_terminate timeout?

2020-12-09 Thread GitBox


btsimonh opened a new issue #890:
URL: https://github.com/apache/mynewt-nimble/issues/890


   Hi all, 
   trying to track down a problem in esp32 arduino-nimble in Tasmota.
   
   a 'normal' disconnect logs:
   ```
   GAP procedure initiated: terminate connection; conn_handle=0 hci_reason=19
   ble_hs_hci_cmd_send: ogf=0x01 ocf=0x0006 len=3
   0x06 0x04 0x03 0x00 0x00 0x13
   Command Status: status=0 cmd_pkts=5 ocf=0x6 ogf=0x1
   D NimBLEClient: "ble_gap_terminate success: rc=0 "
   D NimBLEClient: "<< disconnect()"
   Disconnection Complete: status=0 handle=0 reason=22
   D NimBLEClient: "Got Client event "
   I NimBLEClient: "disconnect; reason=534, "
   ```
   
   but my BLE stops after a few minutes of connect/write/disconnect cycles with 
the below.
   Seemingly, the disconnect confirmation never received, and there appears to 
be no timeout processing around the terminate procedure.
   What is the correct approach to resolve this?  Should arduino-nimble look 
for a timeout, and kill the connection?  if so how?
   Or is terminate timeout something which has been missed in mynewt?
   ```
   ble_hs_hci_acl_tx(): 0x00 0x00 0x08 0x00 0x04 0x00 0x04 0x00 0x12 0x11 0x04 
0x03
   Number of Completed Packets: num_handles=1
   handle:0 pkts:1
   ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=5 data=0x01 0x00 0x04 
0x00 0x13 
   rxed att command: write rsp; conn=0 
   I NimBLERemoteCharacteristic: "Write complete; status=0 conn_handle=0"
   D NimBLERemoteCharacteristic: "<< writeValue, rc: 0"
   09:51:08 SL1-29 write characteristic
   ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=13 data=0x09 0x00 0x04 
0x00 0x1b 0x21 0x04 0x02 0x01 0x08 0x00 0x04 0x2a 
   rxed att command: notify req; conn=0 handle=0x0421
   D NimBLEClient: "Got Client event "
   D NimBLEClient: "Notify Recieved for handle: 1057"
   D NimBLEClient: "checking service 3e135142-654f-9090-134a-a6ff5bb77046 for 
handle: 1057"
   D NimBLEClient: ">> disconnect()"
   **GAP procedure initiated: terminate connection; conn_handle=0 
hci_reason=19**
   ble_hs_hci_cmd_send: ogf=0x01 ocf=0x0006 len=3
   0x06 0x04 0x03 0x00 0x00 0x13
   Command Status: status=0 cmd_pkts=5 ocf=0x6 ogf=0x1
   D NimBLEClient: "ble_gap_terminate success: rc=0 "
   D NimBLEClient: "<< disconnect()"
   09:51:09 SL2-28 operation complete
   09:51:09 SL1-29 runTaskDoneOperation: disconnecting connected client
   [V][WebServer.cpp:291] handleClient(): New client
   [V][Parsing.cpp:113] _parseRequest(): method: GET url: /cs search: c2=244
   ...
   [V][Parsing.cpp:231] _parseRequest():  Arguments: c2=244
   09:51:11 SL1-29 # wait 
disconnect 1
   09:51:11 SL1-29 # wait 
disconnect 2
   09:51:12 SL1-29 # wait 
disconnect 3
   09:51:13 SL1-29 # wait 
disconnect 4
   [V][WebServer.cpp:291] handleClient(): New client
   [V][Parsing.cpp:113] _parseRequest(): method: GET url: /cs search: c2=244
   ```
   



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