[GitHub] matthewwarnes opened a new pull request #829: add driver for ADXL345 sensor

2018-02-20 Thread GitBox
matthewwarnes opened a new pull request #829: add driver for ADXL345 sensor
URL: https://github.com/apache/mynewt-core/pull/829
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] wes3 commented on issue #826: soft pwm api questions

2018-02-20 Thread GitBox
wes3 commented on issue #826: soft pwm api questions
URL: https://github.com/apache/mynewt-core/issues/826#issuecomment-367196564
 
 
   I am not saying having a syscfg (or not having one) is a good/bad idea, but 
I would think it would be fine in most cases. Hard to say without getting hard 
numbers but it is not something I would be particularly worried about. What 
period/frequencies are being generally used here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] wes3 opened a new pull request #828: hal/uart: Fix nrf52840 (and nrf52) uart1 addition.

2018-02-20 Thread GitBox
wes3 opened a new pull request #828: hal/uart: Fix nrf52840 (and nrf52) uart1 
addition.
URL: https://github.com/apache/mynewt-core/pull/828
 
 
   The original commit and PR was not correct. It worked if only either
   uart0 or uart1 was enabled; if both were enabled it failed. This
   should address both uarts being enabled.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] jacobrosenthal opened a new issue #827: BLE_OWN_ADDR_PUBLIC

2018-02-20 Thread GitBox
jacobrosenthal opened a new issue #827: BLE_OWN_ADDR_PUBLIC
URL: https://github.com/apache/mynewt-core/issues/827
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] jacobrosenthal opened a new issue #826: soft pwm api questions

2018-02-20 Thread GitBox
jacobrosenthal opened a new issue #826: soft pwm api questions
URL: https://github.com/apache/mynewt-core/issues/826
 
 
   Current softpwm uses os cpu time, ie I think that means it shares with the 
system timer. At how often a timer would that get problematic?
   
   Would it be better to use a separate hal timer? or I guess maybe a syscfg 
flag to choose the source?
   
   
   Secondly,
   soft pwm appears to attempt to utilize the pwm api 1:1, why should it get a 
separate device name?
   
https://github.com/apache/mynewt-core/blob/master/apps/pwm_test/src/main.c#L41
   
   I would argue for the default bsps to resolve soft pwm to pwm0
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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 (a262016 -> 3b58dde)

2018-02-20 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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


from a262016  Merge pull request #791 from ccollins476ad/assert-msg
 add 95e438d  stm32cube - Add missing headers
 add c57f173  stm32f4xx - Use updated SPI syscfg names
 add e58a38f  nucleo413zh - SPI support
 add 931b795  nucleo-f413re - SPI support
 add a847483  Rename bsp: nucleo413zh --> nucleo-f413zh
 new 3b58dde  Merge pull request #797 from 
ccollins476ad/stm32cube-missing-headers

The 1 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:
 hw/bsp/nucleo-f413re/src/hal_bsp.c |   32 +
 .../boot-nucleo413zh.ld|0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/bsp.yml  |   12 +-
 .../include/bsp/bsp.h  |0
 .../include/bsp/cmsis_nvic.h   |0
 .../include/bsp/stm32f4xx_hal_conf.h   |0
 .../nucleo-f413zh.ld}  |0
 .../nucleo-f413zh_debug.cmd}   |0
 .../nucleo-f413zh_debug.sh}|0
 .../nucleo-f413zh_download.cmd}|0
 .../nucleo-f413zh_download.sh} |0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/pkg.yml  |4 +-
 .../src/arch/cortex_m4/startup_STM32F40x.s |0
 .../{nucleo413zh => nucleo-f413zh}/src/hal_bsp.c   |   32 +
 hw/bsp/{nucleo413zh => nucleo-f413zh}/src/sbrk.c   |0
 .../src/system_stm32f4xx.c |0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/syscfg.yml   |0
 .../stm/stm32f4xx/src/ext/Drivers/CMSIS/.gitignore |3 -
 .../Include/{stm32f412zx.h => stm32f413xx.h}   | 2056 +++---
 .../Include/{stm32f412zx.h => stm32f423xx.h}   | 2209 +---
 hw/mcu/stm/stm32f4xx/src/hal_spi.c |   55 +-
 21 files changed, 2918 insertions(+), 1485 deletions(-)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/boot-nucleo413zh.ld (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/bsp.yml (81%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/include/bsp/bsp.h (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/include/bsp/cmsis_nvic.h (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/include/bsp/stm32f4xx_hal_conf.h 
(100%)
 rename hw/bsp/{nucleo413zh/nucleo413zh.ld => nucleo-f413zh/nucleo-f413zh.ld} 
(100%)
 rename hw/bsp/{nucleo413zh/nucleo413zh_download.cmd => 
nucleo-f413zh/nucleo-f413zh_debug.cmd} (100%)
 rename hw/bsp/{nucleo413zh/nucleo413zh_debug.sh => 
nucleo-f413zh/nucleo-f413zh_debug.sh} (100%)
 rename hw/bsp/{nucleo413zh/nucleo413zh_debug.cmd => 
nucleo-f413zh/nucleo-f413zh_download.cmd} (100%)
 rename hw/bsp/{nucleo413zh/nucleo413zh_download.sh => 
nucleo-f413zh/nucleo-f413zh_download.sh} (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/pkg.yml (92%)
 rename hw/bsp/{nucleo413zh => 
nucleo-f413zh}/src/arch/cortex_m4/startup_STM32F40x.s (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/src/hal_bsp.c (78%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/src/sbrk.c (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/src/system_stm32f4xx.c (100%)
 rename hw/bsp/{nucleo413zh => nucleo-f413zh}/syscfg.yml (100%)
 delete mode 100644 hw/mcu/stm/stm32f4xx/src/ext/Drivers/CMSIS/.gitignore
 copy 
hw/mcu/stm/stm32f4xx/src/ext/Drivers/CMSIS/Device/ST/STM32F4xx/Include/{stm32f412zx.h
 => stm32f413xx.h} (90%)
 copy 
hw/mcu/stm/stm32f4xx/src/ext/Drivers/CMSIS/Device/ST/STM32F4xx/Include/{stm32f412zx.h
 => stm32f423xx.h} (90%)

-- 
To stop receiving notification emails like this one, please contact
ccoll...@apache.org.


[mynewt-core] 01/01: Merge pull request #791 from ccollins476ad/assert-msg

2018-02-20 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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

commit a262016adc3bf2f181271d50b07a77ca85d00581
Merge: e17911e ae08a48
Author: ccollins476ad 
AuthorDate: Tue Feb 20 14:41:10 2018 -0800

Merge pull request #791 from ccollins476ad/assert-msg

Always print file:line on assert failure if cfged.

 kernel/os/src/arch/arc/os_fault.c   |  4 ++--
 kernel/os/src/arch/cortex_m0/os_fault.c |  6 ++---
 kernel/os/src/arch/cortex_m3/os_fault.c |  5 +++--
 kernel/os/src/arch/cortex_m4/os_fault.c |  5 +++--
 kernel/os/src/arch/cortex_m7/os_fault.c | 10 +++--
 kernel/os/src/arch/mips/os_fault.c  |  5 +
 kernel/os/src/arch/pic32/os_fault.c |  4 ++--
 kernel/os/src/arch/rv32imac/os_fault.c  | 10 +
 kernel/os/src/arch/sim-armv7/os_arch.c  |  3 ++-
 kernel/os/src/arch/sim-mips/os_arch.c   |  3 ++-
 kernel/os/src/arch/sim/os_arch.c|  3 ++-
 kernel/os/src/os_priv.h | 18 +++
 kernel/sim/include/sim/sim.h| 21 ++---
 kernel/sim/src/sim_fault.c  | 40 -
 14 files changed, 64 insertions(+), 73 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
ccoll...@apache.org.


[mynewt-core] 01/01: Merge pull request #797 from ccollins476ad/stm32cube-missing-headers

2018-02-20 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

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

commit 3b58dde90fc4a9d7ad87f45a6350474dfd3af58e
Merge: a262016 a847483
Author: ccollins476ad 
AuthorDate: Tue Feb 20 14:41:29 2018 -0800

Merge pull request #797 from ccollins476ad/stm32cube-missing-headers

STM BSPs - SPI support

 hw/bsp/nucleo-f413re/src/hal_bsp.c |32 +
 .../boot-nucleo413zh.ld| 0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/bsp.yml  |12 +-
 .../include/bsp/bsp.h  | 0
 .../include/bsp/cmsis_nvic.h   | 0
 .../include/bsp/stm32f4xx_hal_conf.h   | 0
 .../nucleo-f413zh.ld}  | 0
 .../nucleo-f413zh_debug.cmd}   | 0
 .../nucleo-f413zh_debug.sh}| 0
 .../nucleo-f413zh_download.cmd}| 0
 .../nucleo-f413zh_download.sh} | 0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/pkg.yml  | 4 +-
 .../src/arch/cortex_m4/startup_STM32F40x.s | 0
 .../{nucleo413zh => nucleo-f413zh}/src/hal_bsp.c   |32 +
 hw/bsp/{nucleo413zh => nucleo-f413zh}/src/sbrk.c   | 0
 .../src/system_stm32f4xx.c | 0
 hw/bsp/{nucleo413zh => nucleo-f413zh}/syscfg.yml   | 0
 .../stm/stm32f4xx/src/ext/Drivers/CMSIS/.gitignore | 3 -
 .../Device/ST/STM32F4xx/Include/stm32f413xx.h  | 15088 ++
 .../Device/ST/STM32F4xx/Include/stm32f423xx.h  | 15241 +++
 hw/mcu/stm/stm32f4xx/src/hal_spi.c |55 +-
 21 files changed, 30432 insertions(+), 35 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
ccoll...@apache.org.


[GitHub] ccollins476ad opened a new pull request #136: Remove outdated newtmgr from newt repo.

2018-02-20 Thread GitBox
ccollins476ad opened a new pull request #136: Remove outdated newtmgr from newt 
repo.
URL: https://github.com/apache/mynewt-newt/pull/136
 
 
   The newtmgr tool was moved to its own repo several releases back
   (https://github.com/apache/mynewt-newtmgr).  This commit removes the
   outdated newtmgr code from the newt repo.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ccollins476ad opened a new pull request #67: Fix panic when BLE session is closed twice.

2018-02-20 Thread GitBox
ccollins476ad opened a new pull request #67: Fix panic when BLE session is 
closed twice.
URL: https://github.com/apache/mynewt-newtmgr/pull/67
 
 
   Prior to this commit, a panic like this would occur when a BLE session was
   closed twice:
   
   ```
   panic: close of closed channel
   goroutine 54 [running]:
   
github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble.(*NakedSesn).shutdown(0x10f33500,
 0xa311b8, 0x10ec0080, 0x0, 0x0)
   
#011/gopath/src/github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/naked_sesn.go:153
 +0x120
   
github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble.(*NakedSesn).Open(0x10f33500,
 0x0, 0x0)
   
#011/gopath/src/github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/naked_sesn.go:218
 +0x184
   
github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble.(*BleSesn).Open(0x10d11bc0,
 0x0, 0x0)
   
#011/gopath/src/github.com/runtimeinc/rtgw/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_sesn.go:63
 +0x80
   ```
   
   The bug was that nothing in `NakedSesn` prevented a second call to
   `shutdown()`.
   
   This commit adds more state to the `NakedSesn` type, allowing it detect
   when it has already been shut down without a subsequent reopen.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ccollins476ad opened a new pull request #68: Remove hardcoded "newtmgr" strings.

2018-02-20 Thread GitBox
ccollins476ad opened a new pull request #68: Remove hardcoded "newtmgr" strings.
URL: https://github.com/apache/mynewt-newtmgr/pull/68
 
 
   The newtmgr codebase is used in two tools:
   * newtmgr
   * mcumgr
   
   An earlier commit (a895655ebc82d0c57c15ae29eea68536c10b8a70) allowed the
   application to configure its own name for displaying help messages
   properly.  A few instances of "newtmgr" were missed in that commit.
   This commit catches the remaining instances.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ritikakapade opened a new pull request #825: Deleting Tooling Tutorials from mynewt-core

2018-02-20 Thread GitBox
ritikakapade opened a new pull request #825: Deleting Tooling Tutorials from 
mynewt-core
URL: https://github.com/apache/mynewt-core/pull/825
 
 
   - Moving Segger RTT and Segger Sysview from mynewt-core to 
mynewt-documentation


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] utzig opened a new pull request #824: Add stm32 common hal for shared drivers

2018-02-20 Thread GitBox
utzig opened a new pull request #824: Add stm32 common hal for shared drivers
URL: https://github.com/apache/mynewt-core/pull/824
 
 
   WIP - DO NOT MERGE (DO NOT!)
   
   This is an effort to remove duplication in STM32 based models, moving common 
hal infrastructure to a shared pkg and parametrizing stuff for the specific 
models. 
   
   Signed-off-by: Fabio Utzig 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] michal-narajowski closed pull request #823: mesh: shell: Fix build when shell is disabled

2018-02-20 Thread GitBox
michal-narajowski closed pull request #823: mesh: shell: Fix build when shell 
is disabled
URL: https://github.com/apache/mynewt-core/pull/823
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/net/nimble/host/mesh/src/shell.c b/net/nimble/host/mesh/src/shell.c
index 686c12ac2..668ec38cb 100644
--- a/net/nimble/host/mesh/src/shell.c
+++ b/net/nimble/host/mesh/src/shell.c
@@ -2262,9 +2262,7 @@ static void bt_mesh_shell_task_init(void)
 
 void ble_mesh_shell_init(void)
 {
-#if !(MYNEWT_VAL(BLE_MESH_SHELL))
-   return;
-#endif
+#if (MYNEWT_VAL(BLE_MESH_SHELL))
 
/* Initialize health pub message */
health_pub_init();
@@ -2274,4 +2272,5 @@ void ble_mesh_shell_init(void)
bt_mesh_shell_task_init();
shell_evq_set(_shell_queue);
shell_register("mesh", mesh_commands);
+#endif
 }


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] 01/01: Merge pull request #823 from michal-narajowski/blemesh-build-fix

2018-02-20 Thread naraj
This is an automated email from the ASF dual-hosted git repository.

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

commit 78d4e29518e2d3b8228414e411567e8c3e6e934a
Merge: 72a4287 5ed429b
Author: Michał Narajowski 
AuthorDate: Tue Feb 20 15:21:15 2018 +0100

Merge pull request #823 from michal-narajowski/blemesh-build-fix

mesh: shell: Fix build when shell is disabled

 net/nimble/host/mesh/src/shell.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
na...@apache.org.


[GitHub] michal-narajowski opened a new pull request #823: mesh: shell: Fix build when shell is disabled

2018-02-20 Thread GitBox
michal-narajowski opened a new pull request #823: mesh: shell: Fix build when 
shell is disabled
URL: https://github.com/apache/mynewt-core/pull/823
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] 02/03: Fix SVC naming issue

2018-02-20 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-core.git

commit 331ddb86484da62ff04fc8999de2397a85af5773
Author: Fabio Utzig 
AuthorDate: Wed Feb 14 07:42:36 2018 -0200

Fix SVC naming issue
---
 kernel/os/src/arch/cortex_m3/os_arch_arm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/os/src/arch/cortex_m3/os_arch_arm.c 
b/kernel/os/src/arch/cortex_m3/os_arch_arm.c
index a070076..ed577fe 100755
--- a/kernel/os/src/arch/cortex_m3/os_arch_arm.c
+++ b/kernel/os/src/arch/cortex_m3/os_arch_arm.c
@@ -210,7 +210,8 @@ os_arch_os_init(void)
 NVIC->IP[i] = -1;
 }
 
-NVIC_SetVector(SVCall_IRQn, (uint32_t)SVC_Handler);
+/* SVC_IRQn or SVCall_IRQn depending on specific model */
+NVIC_SetVector(-5, (uint32_t)SVC_Handler);
 NVIC_SetVector(PendSV_IRQn, (uint32_t)PendSV_Handler);
 NVIC_SetVector(SysTick_IRQn, (uint32_t)SysTick_Handler);
 
@@ -232,7 +233,7 @@ os_arch_os_init(void)
 NVIC_SetPriority(PendSV_IRQn, PEND_SV_PRIO);
 
 /* Set the SVC interrupt to priority 0 (highest configurable) */
-NVIC_SetPriority(SVCall_IRQn, SVC_PRIO);
+NVIC_SetPriority(-5, SVC_PRIO);
 
 /* Check if privileged or not */
 if ((__get_CONTROL() & 1) == 0) {

-- 
To stop receiving notification emails like this one, please contact
ut...@apache.org.


[mynewt-core] branch master updated (200cd39 -> 2cf52d5)

2018-02-20 Thread naraj
This is an automated email from the ASF dual-hosted git repository.

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


from 200cd39  Merge pull request #819 from mjurczak/feature/blecsc_app
 add dc3dc40  mesh: Initialize shell on sysinit
 add 2f48748  apps/blemesh_shell: Add new mesh testing app
 add 50b40c1  apps/blemesh_shell: Use net recv testing API
 add c22340d  apps/blemesh_shell: Use model bound Testing API
 add 635cb94  apps/blemesh_shell: Use Invalid Bearer cb Testing API
 add 8a195ca  apps/blemesh_shell: Use Incomplete Timer Expired event from 
Testing API
 add 5fa8f10  apps/blemesh_shell: Set default syscfg values for testing
 add bf1c017  mesh: shell: Add dummy vendor model for PTS testing
 add 1409b61  mesh: shell: Add LPN subscription commands to mesh shell
 add 77b7877  mesh: shell: Add command for printing mesh credentials
 add bc8f9b1  mesh: shell: Add command for printing mesh composition data
 add 7999ae2  mesh: glue: Fix k_sem_take() semaphore port
 add a0b45a5  mesh: Fix Friend os_mempool_size calculation
 add c147a42  mesh: shell: Use separate task to avoid deadlocks
 add 44d9a1e  mesh: shell: Use Runtime's company ID
 add cb2a7cb  mesh: cfg_cli: Set default message timeout to 5 seconds
 add 1eb0d58  mesh: glue: Fix calculating remaining time of delayed work
 add a14eec8  mesh: glue: Add sanity check in k_delayed_work_submit
 add 8d0155c  mesh: shell: Use random addr when public is unassigned
 new 2cf52d5  Merge pull request #815 from 
michal-narajowski/mesh-blemesh-shell

The 1 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:
 apps/{blemesh => blemesh_shell}/pkg.yml|   6 +-
 apps/blemesh_shell/src/main.c  | 116 +
 apps/{blemesh => blemesh_shell}/syscfg.yml |  23 +++-
 net/nimble/host/mesh/include/mesh/glue.h   |   5 +-
 net/nimble/host/mesh/pkg.yml   |   3 +
 net/nimble/host/mesh/src/cfg_cli.c |   2 +-
 net/nimble/host/mesh/src/friend.c  |   4 +-
 net/nimble/host/mesh/src/glue.c|   8 +-
 net/nimble/host/mesh/src/health_cli.c  |   2 +-
 net/nimble/host/mesh/src/mesh.c|   4 -
 net/nimble/host/mesh/src/shell.c   | 193 ++---
 net/nimble/host/mesh/src/shell.h   |   2 +-
 net/nimble/host/mesh/src/testing.c |  68 ++
 net/nimble/host/mesh/src/testing.h |   1 +
 14 files changed, 400 insertions(+), 37 deletions(-)
 copy apps/{blemesh => blemesh_shell}/pkg.yml (87%)
 create mode 100755 apps/blemesh_shell/src/main.c
 copy apps/{blemesh => blemesh_shell}/syscfg.yml (74%)

-- 
To stop receiving notification emails like this one, please contact
na...@apache.org.


[mynewt-core] 01/01: Merge pull request #815 from michal-narajowski/mesh-blemesh-shell

2018-02-20 Thread naraj
This is an automated email from the ASF dual-hosted git repository.

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

commit 2cf52d5bf0b83bf200d2ff5124270aa387ffcdb1
Merge: 200cd39 8d0155c
Author: Michał Narajowski 
AuthorDate: Tue Feb 20 10:21:24 2018 +0100

Merge pull request #815 from michal-narajowski/mesh-blemesh-shell

New mesh app with shell support for testing

 .../host/mesh => apps/blemesh_shell}/pkg.yml   |  35 ++--
 apps/blemesh_shell/src/main.c  | 116 +
 apps/blemesh_shell/syscfg.yml  |  65 +++
 net/nimble/host/mesh/include/mesh/glue.h   |   5 +-
 net/nimble/host/mesh/pkg.yml   |   3 +
 net/nimble/host/mesh/src/cfg_cli.c |   2 +-
 net/nimble/host/mesh/src/friend.c  |   4 +-
 net/nimble/host/mesh/src/glue.c|   8 +-
 net/nimble/host/mesh/src/health_cli.c  |   2 +-
 net/nimble/host/mesh/src/mesh.c|   4 -
 net/nimble/host/mesh/src/shell.c   | 193 +++--
 net/nimble/host/mesh/src/shell.h   |   2 +-
 net/nimble/host/mesh/src/testing.c |  68 
 net/nimble/host/mesh/src/testing.h |   1 +
 14 files changed, 457 insertions(+), 51 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
na...@apache.org.


[GitHub] michal-narajowski closed pull request #815: New mesh app with shell support for testing

2018-02-20 Thread GitBox
michal-narajowski closed pull request #815: New mesh app with shell support for 
testing
URL: https://github.com/apache/mynewt-core/pull/815
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apps/blemesh_shell/pkg.yml b/apps/blemesh_shell/pkg.yml
new file mode 100644
index 0..7febc3691
--- /dev/null
+++ b/apps/blemesh_shell/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/blemesh_shell
+pkg.type: app
+pkg.description: Sample application for BLE Mesh node with shell support
+pkg.author: "Micha? Narajowski "
+pkg.homepage: "http://mynewt.apache.org/;
+pkg.keywords:
+
+pkg.deps:
+- kernel/os 
+- net/nimble/controller
+- net/nimble/host
+- net/nimble/host/services/gap
+- net/nimble/host/services/gatt
+- net/nimble/host/store/ram
+- net/nimble/transport/ram
+- sys/console/full
+- sys/log/full
+- sys/stats/full
+- sys/shell
diff --git a/apps/blemesh_shell/src/main.c b/apps/blemesh_shell/src/main.c
new file mode 100755
index 0..3b5c9c691
--- /dev/null
+++ b/apps/blemesh_shell/src/main.c
@@ -0,0 +1,116 @@
+/*
+ * 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 "sysinit/sysinit.h"
+#include "os/os.h"
+#include "mesh/mesh.h"
+#include "console/console.h"
+#include "hal/hal_system.h"
+#include "hal/hal_gpio.h"
+#include "bsp/bsp.h"
+#include "shell/shell.h"
+
+/* BLE */
+#include "nimble/ble.h"
+#include "host/ble_hs.h"
+#include "services/gap/ble_svc_gap.h"
+#include "mesh/glue.h"
+#include "mesh/testing.h"
+
+
+void net_recv_ev(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst,
+ const void *payload, size_t payload_len)
+{
+console_printf("Received net packet: ttl 0x%02x ctl 0x%02x src 0x%04x "
+   "dst 0x%04x " "payload_len %d\n", ttl, ctl, src, dst,
+   payload_len);
+}
+
+static void model_bound_cb(u16_t addr, struct bt_mesh_model *model,
+   u16_t key_idx)
+{
+console_printf("Model bound: remote addr 0x%04x key_idx 0x%04x model %p\n",
+   addr, key_idx, model);
+}
+
+static void model_unbound_cb(u16_t addr, struct bt_mesh_model *model,
+ u16_t key_idx)
+{
+console_printf("Model unbound: remote addr 0x%04x key_idx 0x%04x "
+   "model %p\n", addr, key_idx, model);
+}
+
+static void invalid_bearer_cb(u8_t opcode)
+{
+console_printf("Invalid bearer: opcode 0x%02x\n", opcode);
+}
+
+static void incomp_timer_exp_cb(void)
+{
+console_printf("Incomplete timer expired\n");
+}
+
+static struct bt_test_cb bt_test_cb = {
+.mesh_net_recv = net_recv_ev,
+.mesh_model_bound = model_bound_cb,
+.mesh_model_unbound = model_unbound_cb,
+.mesh_prov_invalid_bearer = invalid_bearer_cb,
+.mesh_trans_incomp_timer_exp = incomp_timer_exp_cb,
+};
+
+static void
+blemesh_on_reset(int reason)
+{
+BLE_HS_LOG(ERROR, "Resetting state; reason=%d\n", reason);
+}
+
+static void
+blemesh_on_sync(void)
+{
+console_printf("Bluetooth initialized\n");
+
+shell_register_default_module("mesh");
+
+if (IS_ENABLED(CONFIG_BT_TESTING)) {
+bt_test_cb_register(_test_cb);
+}
+}
+

[mynewt-core] branch master updated (3f4067a -> 200cd39)

2018-02-20 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 3f4067a  Merge pull request #821 from mlaz/fix_pwm_nrf525
 add a0ca5ea  Implemented CSC BLE app. Added example implementation of BLE 
Cycling Speed and Cadence simulated sensor.
 add 4f0f183  Refactored CSC measurement notifications and cleaned-up 
legacy code.
 add e4221d8  Added device appearance setter and getter to GAP service.
 add aae388a  Minor code changes and clean-up.
 add ebfa37e  Fixed speed calculation error. Fixed header-guard define.
 add a7d82f9  Reverted accidentaly removed function prototype.
 add 72d5032  Sensor location opcode handling fix. Sensor location opcodes 
handled by SC control point only if multiple sensor locations feature is 
enabled.
 add 6cb978b  Changes after PR review. CSC profile specific ATT error 
added. Custom endianness handling functions replaced with system functions. 
Device appearance moved to syscfg.
 add 9b7df73  Minor code formatting fix.
 new 200cd39  Merge pull request #819 from mjurczak/feature/blecsc_app

The 1 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:
 apps/{blehr => blecsc}/README.md   |   2 +-
 apps/{blehr => blecsc}/pkg.yml |  10 +-
 apps/blecsc/src/blecsc_sens.h  | 114 ++
 apps/blecsc/src/gatt_svr.c | 385 +
 apps/blecsc/src/main.c | 320 +
 apps/{blehr => blecsc}/syscfg.yml  |   3 +
 .../gap/include/services/gap/ble_svc_gap.h |   5 +-
 net/nimble/host/services/gap/src/ble_svc_gap.c |  12 +-
 .../nimble/host/services/gap}/syscfg.yml   |   9 +-
 9 files changed, 847 insertions(+), 13 deletions(-)
 copy apps/{blehr => blecsc}/README.md (77%)
 copy apps/{blehr => blecsc}/pkg.yml (86%)
 create mode 100644 apps/blecsc/src/blecsc_sens.h
 create mode 100644 apps/blecsc/src/gatt_svr.c
 create mode 100644 apps/blecsc/src/main.c
 copy apps/{blehr => blecsc}/syscfg.yml (89%)
 copy {compiler/arm-none-eabi-m7 => net/nimble/host/services/gap}/syscfg.yml 
(86%)

-- 
To stop receiving notification emails like this one, please contact
j...@apache.org.


[GitHub] sjanc closed pull request #819: Feature/blecsc app: Cycling Speed and Cadence app

2018-02-20 Thread GitBox
sjanc closed pull request #819: Feature/blecsc app: Cycling Speed and Cadence 
app
URL: https://github.com/apache/mynewt-core/pull/819
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apps/blecsc/README.md b/apps/blecsc/README.md
new file mode 100644
index 0..bccf176a1
--- /dev/null
+++ b/apps/blecsc/README.md
@@ -0,0 +1,9 @@
+# BLE Cycling Speed and Cadence peripheral app.
+
+The source files are located in the src/ directory.
+
+pkg.yml contains the base definition of the app.
+
+syscfg.yml contains setting definitions and overrides.
+
+
diff --git a/apps/blecsc/pkg.yml b/apps/blecsc/pkg.yml
new file mode 100644
index 0..860ec4a34
--- /dev/null
+++ b/apps/blecsc/pkg.yml
@@ -0,0 +1,40 @@
+# 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/blecsc
+pkg.type: app
+pkg.description: BLE peripheral cycling speed and cadence sensor.
+pkg.author: "Maciej Jurczak"
+pkg.email: "mjurc...@gmail.com"
+pkg.homepage: "http://mynewt.apache.org/;
+pkg.keywords:
+
+pkg.deps:
+- boot/bootutil
+- kernel/os
+- net/nimble/controller
+- net/nimble/host
+- net/nimble/host/services/gap
+- net/nimble/host/services/gatt
+- net/nimble/host/store/config
+- net/nimble/transport
+- sys/console/full
+- sys/log/full
+- sys/stats/full
+- sys/sysinit
+- sys/id
diff --git a/apps/blecsc/src/blecsc_sens.h b/apps/blecsc/src/blecsc_sens.h
new file mode 100644
index 0..a73a3b8be
--- /dev/null
+++ b/apps/blecsc/src/blecsc_sens.h
@@ -0,0 +1,114 @@
+/*
+ * 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.
+ */
+
+#ifndef H_BLECSC_SENSOR_
+#define H_BLECSC_SENSOR_
+
+#include "log/log.h"
+#include "nimble/ble.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct log blecsc_log;
+
+/* blecsc uses the first "peruser" log module */
+#define BLECSC_LOG_MODULE (LOG_MODULE_PERUSER + 0)
+
+/* Convenience macro for logging to the blerh module */
+#define BLECSC_LOG(lvl, ...) \
+LOG_ ## lvl(_log, BLECSC_LOG_MODULE, __VA_ARGS__)
+
+/* Cycling Speed and Cadence configuration */
+#define GATT_CSC_UUID   0x1816
+#define GATT_CSC_MEASUREMENT_UUID   0x2A5B
+#define GATT_CSC_FEATURE_UUID   0x2A5C
+#define GATT_SENSOR_LOCATION_UUID   0x2A5D
+#define GATT_SC_CONTROL_POINT_UUID  0x2A55
+/* Device Information configuration */
+#define GATT_DEVICE_INFO_UUID   0x180A
+#define GATT_MANUFACTURER_NAME_UUID 0x2A29
+#define GATT_MODEL_NUMBER_UUID  0x2A24
+
+/*CSC Measurement flags*/
+#define CSC_MEASUREMENT_WHEEL_REV_PRESENT   0x01
+#define CSC_MEASUREMENT_CRANK_REV_PRESENT   0x02
+
+/* CSC feature flags */
+#define CSC_FEATURE_WHEEL_REV_DATA  0x01
+#define CSC_FEATURE_CRANK_REV_DATA  0x02
+#define CSC_FEATURE_MULTIPLE_SENSOR_LOC 0x04
+
+/* Sensor location enum */
+#define SENSOR_LOCATION_OTHER   0
+#define SENSOR_LOCATION_TOP_OF_SHOE 1
+#define SENSOR_LOCATION_IN_SHOE 2
+#define SENSOR_LOCATION_HIP 3
+#define SENSOR_LOCATION_FRONT_WHEEL 4
+#define SENSOR_LOCATION_LEFT_CRANK  5
+#define 

[GitHub] andrzej-kaczmarek commented on a change in pull request #819: Feature/blecsc app: Cycling Speed and Cadence app

2018-02-20 Thread GitBox
andrzej-kaczmarek commented on a change in pull request #819: Feature/blecsc 
app: Cycling Speed and Cadence app
URL: https://github.com/apache/mynewt-core/pull/819#discussion_r169242465
 
 

 ##
 File path: apps/blecsc/src/main.c
 ##
 @@ -0,0 +1,323 @@
+/*
+ * 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 "sysinit/sysinit.h"
+#include "os/os.h"
+#include "console/console.h"
+#include "config/config.h"
+#include "nimble/ble.h"
+#include "host/ble_hs.h"
+#include "services/gap/ble_svc_gap.h"
+#include "blecsc_sens.h"
+
+/* Wheel size for simulation calculations */
+#define CSC_SIM_WHEEL_CIRCUMFERENCE_MM2000
+/* Simulated cadence lower limit */
+#define CSC_SIM_CRANK_RPM_MIN 20
+/* Simulated cadence upper limit */
+#define CSC_SIM_CRANK_RPM_MAX 100
+/* Simulated speed lower limit */
+#define CSC_SIM_SPEED_KPH_MIN 0
+/* Simulated speed upper limit */
+#define CSC_SIM_SPEED_KPH_MAX 35
+
+/* Log data */
+struct log blecsc_log;
+
+/* Noticication status */
+static bool notify_state = false;
+
+/* Connection handle */
+static uint16_t conn_handle;
+
+static uint8_t blecsc_addr_type;
+
+/* Advertised device name  */
+static const char *device_name = "blecsc_sensor";
+
+/* Advertised device appearance  */
+static const uint16_t device_appearance = 1157;
+
+/* Measurement and notification timer */
+static struct os_callout blecsc_measure_timer;
+
+/* Variable holds current CSC measurement state */
+static struct ble_csc_measurement_state csc_measurement_state;
+
+/* Variable holds simulted speed (kilometers per hour) */
+static uint16_t csc_sim_speed_kph = CSC_SIM_SPEED_KPH_MIN;
+
+/* Variable holds simulated cadence (RPM) */
+static uint8_t csc_sim_crank_rpm = CSC_SIM_CRANK_RPM_MIN;
+
+
+static int blecsc_gap_event(struct ble_gap_event *event, void *arg);
+
+
+/*
+ * Enables advertising with parameters:
+ * o General discoverable mode
+ * o Undirected connectable mode
+ */
+static void
+blecsc_advertise(void)
+{
+struct ble_gap_adv_params adv_params;
+struct ble_hs_adv_fields fields;
+int rc;
+
+/*
+ *  Set the advertisement data included in our advertisements:
+ * o Flags (indicates advertisement type and other general info)
+ * o Advertising tx power
+ * o Device name
+ */
+memset(, 0, sizeof(fields));
+
+/*
+ * Advertise two flags:
+ *  o Discoverability in forthcoming advertisement (general)
+ *  o BLE-only (BR/EDR unsupported)
+ */
+fields.flags = BLE_HS_ADV_F_DISC_GEN |
+   BLE_HS_ADV_F_BREDR_UNSUP;
+
+/*
+ * Indicate that the TX power level field should be included; have the
+ * stack fill this value automatically.  This is done by assigning the
+ * special value BLE_HS_ADV_TX_PWR_LVL_AUTO.
+ */
+fields.tx_pwr_lvl_is_present = 1;
+fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
+
+fields.name = (uint8_t *)device_name;
+fields.name_len = strlen(device_name);
+fields.name_is_complete = 1;
+
+/*
+ * Set appearance to: Cycling Speed and Cadence Sensor.
+ */
+fields.appearance = device_appearance;
+fields.appearance_is_present = 1;
+
+rc = ble_gap_adv_set_fields();
+if (rc != 0) {
+BLECSC_LOG(ERROR, "error setting advertisement data; rc=%d\n", rc);
+return;
+}
+
+/* Begin advertising */
+memset(_params, 0, sizeof(adv_params));
+adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
+adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
+rc = ble_gap_adv_start(blecsc_addr_type, NULL, BLE_HS_FOREVER,
+   _params, blecsc_gap_event, NULL);
+if (rc != 0) {
+BLECSC_LOG(ERROR, "error enabling advertisement; rc=%d\n", rc);
+return;
+}
+}
+
+
+/* Update simulated CSC measurements.
+ * Each call increments wheel and crank revolution counters by one and
+ * computes last event time in order to match simulated candence and speed.
+ * Last event time is expressedd in 1/1024th of second units.
+ *
+ * 60 * 1024
+ * crank_dt =

[GitHub] andrzej-kaczmarek commented on issue #819: Feature/blecsc app: Cycling Speed and Cadence app

2018-02-20 Thread GitBox
andrzej-kaczmarek commented on issue #819: Feature/blecsc app: Cycling Speed 
and Cadence app
URL: https://github.com/apache/mynewt-core/pull/819#issuecomment-366899436
 
 
   Looks good to me after changes, thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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