[GitHub] [mynewt-core] vrahane commented on pull request #2651: kernel/os: Fix semaphore release hazard

2021-08-02 Thread GitBox


vrahane commented on pull request #2651:
URL: https://github.com/apache/mynewt-core/pull/2651#issuecomment-891000777


   While both solutions work fine. I prefer this one.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer merged pull request #2652: hw/bsp: Use BLE_LL_SCA where needed

2021-08-02 Thread GitBox


kasjer merged pull request #2652:
URL: https://github.com/apache/mynewt-core/pull/2652


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer merged pull request #2645: pic32: Fix context initialization

2021-08-02 Thread GitBox


kasjer merged pull request #2645:
URL: https://github.com/apache/mynewt-core/pull/2645


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2652: hw/bsp: Use BLE_LL_SCA where needed

2021-08-02 Thread GitBox


kasjer opened a new pull request #2652:
URL: https://github.com/apache/mynewt-core/pull/2652


   Some BSPs still have deprecated BLL_LL_MASTER_SCA
   and BLE_LL_OUR_SCA when they should have BLE_LL_SCA.
   
   This replaces deprecated values with BLE_LL_SCA.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] andrzej-kaczmarek commented on pull request #2651: kernel/os: Fix semaphore release hazard

2021-08-02 Thread GitBox


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


   I prefer this one since it's simpler, fixes problem for all archs and does 
not have overhead on context switch.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1007: nimble/ll: Use callout for scan duration and period

2021-08-02 Thread GitBox


sjanc merged pull request #1007:
URL: https://github.com/apache/mynewt-nimble/pull/1007


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc commented on pull request #999: nimble/host: Fix txom leaks in ble_sm_tx and ble_l2cap_sig_tx

2021-08-02 Thread GitBox


sjanc commented on pull request #999:
URL: https://github.com/apache/mynewt-nimble/pull/999#issuecomment-890837984


   @haukepetersen does this fix issue we discussed in 
https://github.com/apache/mynewt-nimble/pull/987 ?


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID

2021-08-02 Thread GitBox


KKopyscinski commented on pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#issuecomment-890835539


   Added requested unit test


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] freeride01 opened a new issue #1009: NimBLE/Mynewt Documentation in PDF?

2021-08-02 Thread GitBox


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


   Hi, I am new to Doxygen and documentation-generating tools in general and 
find them somewhat complicated to use, I was wondering is there a PDF version 
of the NimBLE stack or Mynewt documentation available for download?
   Thanks in advance.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] vrahane edited a comment on pull request #1007: nimble/ll: Use callout for scan duration and period

2021-07-31 Thread GitBox


vrahane edited a comment on pull request #1007:
URL: https://github.com/apache/mynewt-nimble/pull/1007#issuecomment-890266246


   Tested this out, nrf5340 seems quite stable with periodic scanning. Most of 
the issues we were seeing before seem to be have been fixed by this including 
breaking in `gdb` which would cause crash in the app core.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane commented on pull request #2651: kernel/os: Fix semaphore release hazard

2021-07-30 Thread GitBox


vrahane commented on pull request #2651:
URL: https://github.com/apache/mynewt-core/pull/2651#issuecomment-890266577


   I did try out this one and seems to be working fine.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] vrahane commented on pull request #1007: nimble/ll: Use callout for scan duration and period

2021-07-30 Thread GitBox


vrahane commented on pull request #1007:
URL: https://github.com/apache/mynewt-nimble/pull/1007#issuecomment-890266246


   Tested this out, nrf5340 seems quite stable with periodic scanning.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] mkiiskila commented on pull request #2650: os/cortex_m: Fix semaphore release hazard

2021-07-30 Thread GitBox


mkiiskila commented on pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650#issuecomment-890048517


   LGTM


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1008: transport/nrf5340: Fix assignment in assert

2021-07-30 Thread GitBox


sjanc merged pull request #1008:
URL: https://github.com/apache/mynewt-nimble/pull/1008


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc opened a new pull request #1008: transport/nrf5340: Fix assignment in assert

2021-07-30 Thread GitBox


sjanc opened a new pull request #1008:
URL: https://github.com/apache/mynewt-nimble/pull/1008


   Fix typo in assert which make it never catch intended error.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc opened a new pull request #1007: nimble/ll: Use callout for scan duration and period

2021-07-30 Thread GitBox


sjanc opened a new pull request #1007:
URL: https://github.com/apache/mynewt-nimble/pull/1007


   hal_timer executes from ISR which was causing preempting LL task
   and could result in HCI flow issues if unlucky.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on pull request #2650: os/cortex_m: Fix semaphore release hazard

2021-07-30 Thread GitBox


kasjer commented on pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650#issuecomment-889779854


   alternative solution #2651 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on pull request #2651: kernel/os: Fix semaphore release hazard

2021-07-30 Thread GitBox


kasjer commented on pull request #2651:
URL: https://github.com/apache/mynewt-core/pull/2651#issuecomment-889779623


   this is alternative solution to #2650 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2651: kernel/os: Fix semaphore release hazard

2021-07-30 Thread GitBox


kasjer opened a new pull request #2651:
URL: https://github.com/apache/mynewt-core/pull/2651


   Context switch is performed in low priority interrupt.
   If higher priority interrupt code releases semaphore
   BEFORE g_current_task is updated in context switch,
   os_sem_release() function can see that task
   that entered os_sem_pend() and initiated context switch
   is still running and there is no need to switch tasks.
   As a result task is marked as ready.
   Then high priority interrupt ends and context switch is
   finished leaving lower priority task running.
   When this happens and current task is idle it may take
   a while till reschedule is done again leaving task that
   should be running in ready state.
   
   To prevent this, condition to reschedule is now changed
   so that if current task is same as task that should be woken
   context switch is also initiated just in case switching
   already started and g_current_task was not updated.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2650: os/cortex_m: Fix semaphore release hazard

2021-07-30 Thread GitBox


kasjer opened a new pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650


   Context switch is performed in low priority interrupt.
   If higher priority interrupt code releases semaphore
   BEFORE g_current_task is updated in context switch,
   os_sem_release() function can see that task
   that entered os_sem_pend() and initiated context switch
   is still running and there is no need to switch tasks.
   As a result task is marked as ready.
   Then high priority interrupt ends and context switch is
   finished leaving lower priority task running.
   When this happens and current task is idle it may take
   a while till reschedule is done again leaving task that
   should be running in ready state.
   
   To prevent this interrupts are now masked while context switch
   code check current task against ready list.
   Interrupts are enabled again once g_current_task is updated, rest of
   context switch may be performed (as it was) with interrupts enabled.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1005: apps: Add periodic advertising instance to ext_advertiser sample

2021-07-30 Thread GitBox


sjanc merged pull request #1005:
URL: https://github.com/apache/mynewt-nimble/pull/1005


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane merged pull request #2644: hw/bus/spi_hal: Fix bus_spi_write_read

2021-07-29 Thread GitBox


vrahane merged pull request #2644:
URL: https://github.com/apache/mynewt-core/pull/2644


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer merged pull request #2646: sys/console: Stop history auto search when echo is off

2021-07-29 Thread GitBox


kasjer merged pull request #2646:
URL: https://github.com/apache/mynewt-core/pull/2646


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-artifact] ccollins476ad commented on a change in pull request #32: Support Hardware Encryption is isEncrypted function

2021-07-29 Thread GitBox


ccollins476ad commented on a change in pull request #32:
URL: https://github.com/apache/mynewt-artifact/pull/32#discussion_r679300433



##
File path: image/image.go
##
@@ -790,7 +790,18 @@ func DecryptHwFull(img Image, secret []byte) (Image, 
error) {
return img, nil
 }
 
-// IsEncrypted indicates whether an image's "encrypted" flag is set.
+// IsEncrypted indicates whether an image's "encrypted" flag is set or hw 
encryption is used.
 func (img *Image) IsEncrypted() bool {
-   return img.Header.Flags_F_ENCRYPTED != 0
+   enc := false
+   if img.Header.Flags_F_ENCRYPTED != 0 {
+   enc = true
+   } else {
+   for _, tlv := range img.ProtTlvs {
+   if tlv.Header.Type_TLV_SECRET_ID_LEGACY != 0 || 
tlv.Header.Type_TLV_SECRET_ID != 0 {
+   enc = true
+   }
+   }

Review comment:
   `tlv.Header.Type` is a regular integer, not a bitmap.  So you should 
compare it with the constant directly using `==` rather than `&`.
   
   But I think it would be easier to just use the "find" functions that already 
exist.  That suggestion is up to you though.
   
   Are you sure this doesn't break anything?  I remember there being some 
tricky image types that used encryption, but whose encrypted flag was unset.  I 
recall it being important that these images appeared unencrypted during some 
parts of the image production process.  It has been a long time since I've 
looked at any of this, so I could definitely be wrong.  If you say it works, 
I'll take your word for it.

   ```suggestion
if img.FindAllUniqueTlv(IMAGE_TLV_SECRET_ID_LEGACY) != 
nil || img.FindAllUniqueTlv(IMAGE_TLV_SECRET_ID) != nil {
enc = true
}
   ```




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane merged pull request #2649: sys/console/minimal: Fix RTT console compiler error for minimal console

2021-07-28 Thread GitBox


vrahane merged pull request #2649:
URL: https://github.com/apache/mynewt-core/pull/2649


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane merged pull request #2648: sys/console/rtt_console: Fix CONSOLE_INPUT guards in RTT console

2021-07-28 Thread GitBox


vrahane merged pull request #2648:
URL: https://github.com/apache/mynewt-core/pull/2648


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy opened a new pull request #2649: sys/console/minimal: Fix RTT console compiler error for minimal console

2021-07-28 Thread GitBox


vikrant-proxy opened a new pull request #2649:
URL: https://github.com/apache/mynewt-core/pull/2649


   Compile `console_out` for UART console only. RTT console has it's own 
implementation of `console_out` which conflicts if RTT_CONSOLE is used with 
console/minimal


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy opened a new pull request #2648: sys/console/rtt_console: Fix CONSOLE_INPUT guards in RTT console

2021-07-28 Thread GitBox


vikrant-proxy opened a new pull request #2648:
URL: https://github.com/apache/mynewt-core/pull/2648


   Move console_rx_restart within CONSOLE_INPUT guards to compile correctly 
with CONSOLE_INPUT turned off


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rahult-github opened a new pull request #1006: nimble/host : Check stack status before executing stack command

2021-07-28 Thread GitBox


rahult-github opened a new pull request #1006:
URL: https://github.com/apache/mynewt-nimble/pull/1006


   Added change of checking stack status in the APIs exposed to user. This 
check exists in few functions, extending them to all.
   
   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-artifact] vrahane commented on pull request #28: Allow "extra" information in a manifest

2021-07-27 Thread GitBox


vrahane commented on pull request #28:
URL: https://github.com/apache/mynewt-artifact/pull/28#issuecomment-887680792


   @ccollins476ad this needs a rebase.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-artifact] vrahane merged pull request #24: image: Function to convert image to a byte slice

2021-07-27 Thread GitBox


vrahane merged pull request #24:
URL: https://github.com/apache/mynewt-artifact/pull/24


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] prasad-alatkar commented on pull request #540: nimble/host: Add support to accept or reject pairing request through GAP event

2021-07-27 Thread GitBox


prasad-alatkar commented on pull request #540:
URL: https://github.com/apache/mynewt-nimble/pull/540#issuecomment-887586637


   > @prasad-alatkar looks like unit tests are failing. newt test 
@apache-mynewt-nimble/nimble/host/test could you check that? Also could you 
please add a patch to btshell which would allow to test this patch? Thanks
   
   @rymanluk , as per my understanding the failure is seen in unit test : 
`ble_sm_test_case_peer_lgcy_fail_confirm`. However, I am a little confused with 
the error prints here: `nimble_host_test.elf: nimble/host/src/ble_hs.c:194: 
ble_hs_lock: Assertion `!ble_hs_locked_by_cur_task()' failed`. It seems that 
`ble_hs_lock` is getting called twice somewhere, but the PR changes do not add 
any extra host lock. Could you please help here to pass the CI tests ? I am not 
very familiar with BT tests here, could you please let me know if it is 
possible to collect debug logs through CI ? 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy commented on a change in pull request #2627: ipc nrf5340 flash

2021-07-27 Thread GitBox


vikrant-proxy commented on a change in pull request #2627:
URL: https://github.com/apache/mynewt-core/pull/2627#discussion_r677465530



##
File path: hw/bsp/nordic_pca10095_net/src/hal_bsp.c
##
@@ -48,13 +48,18 @@ hal_bsp_flash_dev(uint8_t id)
  * Internal flash mapped to id 0.
  */
 if (id == 0) {
-return _net_flash_dev;
+return _flash_dev;
 }
 #if MCUBOOT_MYNEWT
 if (id == 1) {
 return _net_vflash_dev.nv_flash;
 }
 #endif
+#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)

Review comment:
   should this have been `IPC_NRF5340_FLASH_SERVER` given appcore is the 
client?




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc opened a new pull request #1005: apps: Add periodic advertising instance to ext_advertiser sample

2021-07-27 Thread GitBox


sjanc opened a new pull request #1005:
URL: https://github.com/apache/mynewt-nimble/pull/1005


   Add new instance that advertises 1650 bytes of periodic 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.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy commented on a change in pull request #2627: ipc nrf5340 flash

2021-07-27 Thread GitBox


vikrant-proxy commented on a change in pull request #2627:
URL: https://github.com/apache/mynewt-core/pull/2627#discussion_r677465530



##
File path: hw/bsp/nordic_pca10095_net/src/hal_bsp.c
##
@@ -48,13 +48,18 @@ hal_bsp_flash_dev(uint8_t id)
  * Internal flash mapped to id 0.
  */
 if (id == 0) {
-return _net_flash_dev;
+return _flash_dev;
 }
 #if MCUBOOT_MYNEWT
 if (id == 1) {
 return _net_vflash_dev.nv_flash;
 }
 #endif
+#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)

Review comment:
   should this have been `IPC_NRF5340_FLASH_SERVER` given appcore is the 
client?




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane merged pull request #2647: hw/mcu/nordic/nrf5340: Update netcore build script syscfg names

2021-07-26 Thread GitBox


vrahane merged pull request #2647:
URL: https://github.com/apache/mynewt-core/pull/2647


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-artifact] WeekendSuperhero opened a new pull request #32: Support Hardware Encryption is isEncrypted function

2021-07-26 Thread GitBox


WeekendSuperhero opened a new pull request #32:
URL: https://github.com/apache/mynewt-artifact/pull/32


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy opened a new pull request #2647: hw/mcu/nordic/nrf5340: Update netcore build script syscfg names

2021-07-26 Thread GitBox


vikrant-proxy opened a new pull request #2647:
URL: https://github.com/apache/mynewt-core/pull/2647


   Update build script syscfg names to reflect nRF5340 netcore version and 
signing key


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2639: hw/bsp/dwm1001-dev Add LIS2DH12 accelerometer support

2021-07-26 Thread GitBox


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



##
File path: hw/bsp/dwm1001-dev/pkg.yml
##
@@ -41,3 +41,9 @@ pkg.deps.SOFT_PWM:
 
 pkg.deps.UARTBB_0:
 - "@apache-mynewt-core/hw/drivers/uart/uart_bitbang"
+
+pkg.deps.LIS2DH12_ONB:
+- "@apache-mynewt-core/hw/drivers/sensors/lis2dh12"
+
+pkg.init:

Review comment:
   Fist line of commit message would also be more consistent with what is 
used in mynewt if it looked like text that was chosen for PR title:
   ```
   hw/bsp/dwm1001-dev: Add LIS2DH12 accelerometer support
   ```
   instead of "Add LIS2DH12 accelerometer support for DWM1001-dev boards"




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2639: hw/bsp/dwm1001-dev Add LIS2DH12 accelerometer support

2021-07-26 Thread GitBox


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



##
File path: hw/bsp/dwm1001-dev/src/hal_bsp.c
##
@@ -93,6 +118,47 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 return cfg_pri;
 }
 
+int
+config_lis2dh12_sensor(void)
+{
+#if MYNEWT_VAL(LIS2DH12_ONB)
+int rc;
+struct os_dev *dev;
+struct lis2dh12_cfg cfg;
+
+dev = (struct os_dev *) os_dev_open("lis2dh12_0", OS_TIMEOUT_NEVER, NULL);
+assert(dev != NULL);
+

Review comment:
   extra empty line

##
File path: hw/bsp/dwm1001-dev/src/hal_bsp.c
##
@@ -93,6 +118,47 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 return cfg_pri;
 }
 
+int
+config_lis2dh12_sensor(void)
+{
+#if MYNEWT_VAL(LIS2DH12_ONB)
+int rc;
+struct os_dev *dev;
+struct lis2dh12_cfg cfg;
+
+dev = (struct os_dev *) os_dev_open("lis2dh12_0", OS_TIMEOUT_NEVER, NULL);
+assert(dev != NULL);
+
+
+memset(, 0, sizeof(cfg));
+
+cfg.lc_s_mask = SENSOR_TYPE_ACCELEROMETER;
+cfg.lc_rate = LIS2DH12_DATA_RATE_HN_1344HZ_L_5376HZ;
+cfg.lc_fs = LIS2DH12_FS_2G;
+cfg.lc_pull_up_disc = 1;
+
+rc = lis2dh12_config((struct lis2dh12 *)dev, );
+SYSINIT_PANIC_ASSERT(rc == 0);
+
+os_dev_close(dev);
+#endif
+return 0;
+}
+
+static void
+sensor_dev_create(void)
+{
+int rc;
+(void)rc;
+
+#if MYNEWT_VAL(LIS2DH12_ONB)
+rc = os_dev_create((struct os_dev *) , "lis2dh12_0",

Review comment:
   extra space after cast expression

##
File path: hw/bsp/dwm1001-dev/pkg.yml
##
@@ -41,3 +41,9 @@ pkg.deps.SOFT_PWM:
 
 pkg.deps.UARTBB_0:
 - "@apache-mynewt-core/hw/drivers/uart/uart_bitbang"
+
+pkg.deps.LIS2DH12_ONB:
+- "@apache-mynewt-core/hw/drivers/sensors/lis2dh12"
+
+pkg.init:

Review comment:
   if it was changed to:
   ```yml
   pkg.init.LIS2DH12_ONB:
   ```
   whole config_lis2dh12_sensor()  function could be ifdef'ed-out not just its 
body

##
File path: hw/bsp/dwm1001-dev/syscfg.yml
##
@@ -62,3 +71,6 @@ syscfg.vals.BLE_CONTROLLER:
 OS_CPUTIME_FREQ: 32768
 OS_CPUTIME_TIMER_NUM: 5
 BLE_LL_RFMGMT_ENABLE_TIME: 1500
+
+syscfg.restrictions:
+- "LIS2DH12_ONB && I2C_0_PIN_SCL == 28 && I2C_0_PIN_SDA == 29"

Review comment:
   if it was:
   ```yml
   syscfg.restrictions:
   - "!LIS2DH12_ONB || (I2C_0 == 1 && I2C_0_PIN_SCL == 28 && I2C_0_PIN_SDA 
== 29)"
   ```
   sensor could be turned on and off as syscfg value implies it could.
   notice extra `I2C_0 == 1` that is also needed I guess

##
File path: hw/bsp/dwm1001-dev/src/hal_bsp.c
##
@@ -93,6 +118,47 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 return cfg_pri;
 }
 
+int
+config_lis2dh12_sensor(void)
+{
+#if MYNEWT_VAL(LIS2DH12_ONB)
+int rc;
+struct os_dev *dev;
+struct lis2dh12_cfg cfg;
+
+dev = (struct os_dev *) os_dev_open("lis2dh12_0", OS_TIMEOUT_NEVER, NULL);

Review comment:
   in mynewt code it is custom not to put space after finishing ) in casts 
like this
   ```c
   dev = (struct os_dev *)os_dev_open(
   ```

##
File path: hw/bsp/dwm1001-dev/src/hal_bsp.c
##
@@ -33,6 +33,31 @@
 #include "mcu/nrf52_periph.h"
 #include "bsp/bsp.h"
 
+#if MYNEWT_VAL(LIS2DH12_ONB)
+#include "lis2dh12/lis2dh12.h"
+static struct lis2dh12 lis2dh12;
+#endif
+
+#if MYNEWT_VAL(LIS2DH12_ONB)
+static struct sensor_itf i2c_0_itf_lis = {
+.si_type = SENSOR_ITF_I2C,
+.si_num  = 0,
+.si_addr = 0x19,
+.si_ints = {
+{ /* TODO: determine correct values */
+.host_pin = 25,
+.device_pin = 0,
+.active = true
+},
+{ /* TODO: determine correct values */
+.host_pin = 25,
+.device_pin = 0,
+.active = true
+}

Review comment:
   I would remove this second table entry, first one seems to be correct




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer merged pull request #2642: hw/mcu/nordic/nrf5340: User defined image create flags for combined image

2021-07-26 Thread GitBox


kasjer merged pull request #2642:
URL: https://github.com/apache/mynewt-core/pull/2642


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2646: sys/console: Stop history auto search when echo is off

2021-07-26 Thread GitBox


kasjer opened a new pull request #2646:
URL: https://github.com/apache/mynewt-core/pull/2646


   When echo is off history auto search should not output anything.
   This allows to have **newtmgr** upload working while code
   is build with history auto search support.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2645: pic32: Fix context initialization

2021-07-26 Thread GitBox


kasjer opened a new pull request #2645:
URL: https://github.com/apache/mynewt-core/pull/2645


   Bit **EXL** of **Status** register was not set in initial context.
   When task was scheduled for the first time and some interrupt
   fired during initial context switch task would stack in never
   ending end of interrupt loop.
   
   Here is sequence that was broken due to missing **EXL** bit set,
   (at this point interrupts are disabled due to DI instruction
   and additionally EXL bit when set).
   
   ```asm
   lw k0, CTX_EPC(sp)
   mtc0   k0, _CP0_EPC  # here is correct value set to EPC register
   lw k0, CTX_STATUS(sp)
   mtc0   k0, _CP0_STATUS   # at this point interrupt IE is 0 and EXL 
should be 1
   ```
   In normal case when this happen interrupts are still disabled for **EXL** bit
   but for initial context switch they are not, it there is pending interrupt
   register **EPC** gets changed to address around this point instead of 
starting address
   of the task
   
   ```asm
   ehb
   lw k0, CTX_REG(26)(sp)
   wrpgpr sp, sp
   ```
   ; Now eret should jump to task function and enable interrupts by setting 
**EXL**=0,
   ; but instead it jumps few line above and it never starts the task
   ```asm
   eret
   ```
   
   It may happen to any task, when it happens to idle task watchdog will not be 
feed at all.
   It may be that some other task are running fine.
   
   This sets **EXL** bit to 1 in the initial value of **EPC** register 
eliminating problem.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #1004: Fix scanner assert on receiving AUX_ADV_IND

2021-07-26 Thread GitBox


sjanc merged pull request #1004:
URL: https://github.com/apache/mynewt-nimble/pull/1004


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] ncasaril commented on pull request #2644: hw/bus/spi_hal: Fix bus_spi_write_read

2021-07-26 Thread GitBox


ncasaril commented on pull request #2644:
URL: https://github.com/apache/mynewt-core/pull/2644#issuecomment-886505566


   I've now tested this change on nrf52 working with large reads / writes to a 
spi device (dw1000).  


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] ncasaril closed pull request #2643: hw/mcu/nrf52: Accept NULL txbuf in hal_spi_txrx by transmitting 0xFF

2021-07-26 Thread GitBox


ncasaril closed pull request #2643:
URL: https://github.com/apache/mynewt-core/pull/2643


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] ncasaril commented on pull request #2643: hw/mcu/nrf52: Accept NULL txbuf in hal_spi_txrx by transmitting 0xFF

2021-07-26 Thread GitBox


ncasaril commented on pull request #2643:
URL: https://github.com/apache/mynewt-core/pull/2643#issuecomment-886501412


   Closing as #2644 solves this problem for all mcus whilst my fix only 
addresses nrf52. 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] ncasaril commented on pull request #2644: hw/bus/spi_hal: Fix bus_spi_write_read

2021-07-26 Thread GitBox


ncasaril commented on pull request #2644:
URL: https://github.com/apache/mynewt-core/pull/2644#issuecomment-886500719


   This will work for me and as you pointed out it has fewer repercussions than 
having to update the hal_spi_txrx for all mcus. I'll withdraw PR #2643 in 
favour of this one. Thanks @kasjer!


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on pull request #2644: hw/bus/spi_hal: Fix bus_spi_write_read

2021-07-26 Thread GitBox


kasjer commented on pull request #2644:
URL: https://github.com/apache/mynewt-core/pull/2644#issuecomment-886498470


   > To be consistent with:
   > 
   > 
https://github.com/apache/mynewt-core/blob/ca3280bcd39b1dc44df307db27f243c9a3b39ab7/hw/bus/drivers/spi_hal/src/spi_hal.c#L145
   > 
   > the memset should probably be setting it to 0xFF instead of 0?
   
   @ncasaril thanks for pointing out inconsistency


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer commented on pull request #2643: hw/mcu/nrf52: Accept NULL txbuf in hal_spi_txrx by transmitting 0xFF

2021-07-26 Thread GitBox


kasjer commented on pull request #2643:
URL: https://github.com/apache/mynewt-core/pull/2643#issuecomment-886456440


   @ncasaril I'm not opposed to your change, but accepting it would make one 
MCU implementation ready to work with bus_node_write_read_transact while others 
would still fail.
   We could change them all of course but maybe this solution #2644 would work  
for you instead.
   Could you please check it it solves the issue (I will verify that it works 
if you don't have time but it will take some time).
   Thank you for your involvement.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2644: hw/bus/spi_hal: Fix bus_spi_write_read

2021-07-26 Thread GitBox


kasjer opened a new pull request #2644:
URL: https://github.com/apache/mynewt-core/pull/2644


   Function bus_spi_write_read() was calling hal_spi_txrx()
   with NULL for txbuf for transactions involving more then 16 bytes.
   NULL pointer is not valid for this function.
   When code was build with SPI_HAL_USE_NOBLOCK enabled, zeroed receive buffer
   was already used as argument for transmit buffer.
   Same approach is now used when SPI_HAL_USE_NOBLOCK is not set.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] prasad-alatkar commented on pull request #1000: nimble/host: Remove redundant check in connection latency

2021-07-25 Thread GitBox


prasad-alatkar commented on pull request #1000:
URL: https://github.com/apache/mynewt-nimble/pull/1000#issuecomment-886380808


   > Looks good. Please just update commit message with the information that 
params->latency is uint16_t and BLE_HCI_CONN_LATENCY_MIN is 0 which is why we 
can drop it.
   
   Thanks @rymanluk. Done!!


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] ncasaril opened a new pull request #2643: hw/mcu/nrf52: Accept NULL txbuf in hal_spi_txrx by transmitting 0xFF

2021-07-25 Thread GitBox


ncasaril opened a new pull request #2643:
URL: https://github.com/apache/mynewt-core/pull/2643


   The new bus_spi_write_read function in the bus driver doesn't handle 
write_reads with a combined length of more than 16 without passing NULL as the 
txbuf parameter:
   
   
https://github.com/apache/mynewt-core/blob/595a074aec88de2dc50688990debedb3c228e89c/hw/bus/drivers/spi_hal/src/spi_hal.c#L242
   
   This change allows nrf52:hal_spi_txrx to handle a NULL txbuf. 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1003: host/l2cap: disconnect if received packet is larger than MPS

2021-07-23 Thread GitBox


rymanluk commented on a change in pull request #1003:
URL: https://github.com/apache/mynewt-nimble/pull/1003#discussion_r675393315



##
File path: nimble/host/src/ble_l2cap.c
##
@@ -387,6 +387,23 @@ ble_l2cap_rx(struct ble_hs_conn *conn,
 goto err;
 }
 
+if ((chan->dcid >= 0x0040 && chan->dcid <= 0x007F && l2cap_hdr.len > 
chan->my_coc_mps) ||

Review comment:
   @KKopyscinski  don't you want just add `ble_l2cap_disconnect(chan);` 
after line 413 ?
   
   
   
   




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc opened a new pull request #1004: Fix scanner assert on receiving AUX_ADV_IND

2021-07-22 Thread GitBox


sjanc opened a new pull request #1004:
URL: https://github.com/apache/mynewt-nimble/pull/1004


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1003: host/l2cap: disconnect if received packet is larger than MPS

2021-07-22 Thread GitBox


KKopyscinski commented on a change in pull request #1003:
URL: https://github.com/apache/mynewt-nimble/pull/1003#discussion_r674545428



##
File path: nimble/host/src/ble_l2cap.c
##
@@ -387,6 +387,15 @@ ble_l2cap_rx(struct ble_hs_conn *conn,
 goto err;
 }
 
+if (l2cap_hdr.len > chan->my_coc_mps) {

Review comment:
   Yes, I think you are right. What's more, I think only dynamic range CIDs 
use `my_coc_mps` field, and for others MPS=MTU of channel, which varies from 
channel to channel. I added 3 cases for `BLE_L2CAP_CID_ATT`, 
`BLE_L2CAP_CID_SIG` and `BLE_L2CAP_CID_SM`.




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane opened a new issue #443: [restrictions] Not able to use a string comparison as a restriction

2021-07-21 Thread GitBox


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


   Currently this does not work, `spi0` needs to be made a `choice` for it to 
work or a workaround is to use it as a value and and use the `#` operator to 
convert it to a string.
   
   ```
   syscfg.defs:
   CHIP_ONB:
   description: 'On board chip'
   value: 1
   restrictions:
   - 'CHIP_ONB_SPI_BUS == "spi0"'
   
   CHIP_ONB_SPI_BUS:
   value: 'spi0'
   ```


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID

2021-07-21 Thread GitBox


KKopyscinski commented on a change in pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#discussion_r673979906



##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1543,6 +1543,7 @@ ble_l2cap_sig_disc_req_rx(uint16_t conn_handle, struct 
ble_l2cap_sig_hdr *hdr,
 if (!chan || (le16toh(req->scid) != chan->dcid)) {
 os_mbuf_free_chain(txom);
 ble_hs_unlock();
+ble_l2cap_sig_reject_invalid_cid_tx(conn_handle, hdr->identifier, 
req->dcid, req->scid);

Review comment:
   I pushed the change but I checked it out again and turns out that this 
requires another one PTS issue ticket: TS says that lower tester should send 
invalid DCID, but PTS sends invalid SCID and valid DCID and expects 
disconnection. Of course what we got here is OK, it just allowed test to pass 
when it was wrong (before the push)




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1003: host/l2cap: disconnect if received packet is larger than MPS

2021-07-21 Thread GitBox


rymanluk commented on a change in pull request #1003:
URL: https://github.com/apache/mynewt-nimble/pull/1003#discussion_r673859029



##
File path: nimble/host/src/ble_l2cap.c
##
@@ -387,6 +387,15 @@ ble_l2cap_rx(struct ble_hs_conn *conn,
 goto err;
 }
 
+if (l2cap_hdr.len > chan->my_coc_mps) {

Review comment:
   what about ATT ? in such a case chan->my_coc_mps is 0 I believe. Or not? 




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1002: host/l2cap: disconnect channel if received more than expected

2021-07-21 Thread GitBox


rymanluk commented on a change in pull request #1002:
URL: https://github.com/apache/mynewt-nimble/pull/1002#discussion_r673835204



##
File path: nimble/host/src/ble_l2cap_coc.c
##
@@ -255,6 +255,11 @@ ble_l2cap_coc_rx_fn(struct ble_l2cap_chan *chan)
 return 0;
 }
 
+if (OS_MBUF_PKTLEN(rx->sdu) > rx->data_offset) {

Review comment:
   This seems to be too late.
   I think we should add checks somewhere around line 201 and in case of 
fragmentation we should add additional checks  around 229.
   
   In addition, when we decide to disconnect, we probably need to clear already 
received 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.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID

2021-07-21 Thread GitBox


rymanluk commented on a change in pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#discussion_r673822701



##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1543,6 +1543,7 @@ ble_l2cap_sig_disc_req_rx(uint16_t conn_handle, struct 
ble_l2cap_sig_hdr *hdr,
 if (!chan || (le16toh(req->scid) != chan->dcid)) {
 os_mbuf_free_chain(txom);
 ble_hs_unlock();
+ble_l2cap_sig_reject_invalid_cid_tx(conn_handle, hdr->identifier, 
req->dcid, req->scid);

Review comment:
   actually we are doing here wrong.
   
   as per Bluetooth specification "If the DCID is not recognized by the
   receiver of this message, an L2CAP_COMMAND_REJECT_RSP
   packet with ‘invalid CID’ result code shall be sent in response. If the
   receiver finds a DCID match but the SCID fails to find the same match, the
   request should be silently discarded"
   
   That means - if (!chan) { we should send REJECT}
   if ((le16toh(req->scid) != chan->dcid))  -> we should silently discard a 
message




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane merged pull request #440: mfg: account for updated bootloader path in mfg command

2021-07-20 Thread GitBox


vrahane merged pull request #440:
URL: https://github.com/apache/mynewt-newt/pull/440


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane merged pull request #441: mfg: Add a base address field

2021-07-20 Thread GitBox


vrahane merged pull request #441:
URL: https://github.com/apache/mynewt-newt/pull/441


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski opened a new pull request #1003: host/l2cap: disconnect if received packet is larger than MPS

2021-07-20 Thread GitBox


KKopyscinski opened a new pull request #1003:
URL: https://github.com/apache/mynewt-nimble/pull/1003


   Peer sending packet larger than MPS is invalid, and should be met
   with L2CAP channel disconnection.
   
   This affects L2CAP/LE/CFC/BV-27-C


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] utzig merged pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-20 Thread GitBox


utzig merged pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] nvlsianpu commented on pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-20 Thread GitBox


nvlsianpu commented on pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128#issuecomment-882415138


   @utzig Can you take a look?


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] utzig merged pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-20 Thread GitBox


utzig merged pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski opened a new pull request #1002: host/l2cap: disconnect channel if received more than expected

2021-07-20 Thread GitBox


KKopyscinski opened a new pull request #1002:
URL: https://github.com/apache/mynewt-nimble/pull/1002


   If receive data lenght exceeds what was defined in first packet
   disconnect with peer.
   
   This is affecting L2CAP/LE/CFC/BV-28-C


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] utzig merged pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-19 Thread GitBox


utzig merged pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] nvlsianpu commented on pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-19 Thread GitBox


nvlsianpu commented on pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128#issuecomment-882415138


   @utzig Can you take a look?


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] KKopyscinski opened a new pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID

2021-07-19 Thread GitBox


KKopyscinski opened a new pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001


   If ble_hs_conn_chan_find_by_scid fails to find channel, it means
   that destination CID in L2CAP Disconnection Request is invalid.
   Send L2CAP_COMMAND_REJECT_RSP with BLE_L2CAP_SIG_ERR_INVALID_CID
   reason.
   
   This is affecting L2CAP/LE/CFC/BV-23-C


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] de-nordic edited a comment on pull request #128: zephyr: Allow to select slot for DFU as image

2021-07-16 Thread GitBox


de-nordic edited a comment on pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128#issuecomment-881351552


   ~~marked as DNM to change how Zephyr processes image numbers.~~
   Removed DNM


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] de-nordic commented on pull request #128: DNM: zephyr: Allow to select slot for DFU as image

2021-07-16 Thread GitBox


de-nordic commented on pull request #128:
URL: https://github.com/apache/mynewt-mcumgr/pull/128#issuecomment-881351552


   marked as DNM to change how Zephyr processes image numbers.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy opened a new pull request #2642: hw/mcu/nordic/nrf5340: User defined image create flags for combined image

2021-07-15 Thread GitBox


vikrant-proxy opened a new pull request #2642:
URL: https://github.com/apache/mynewt-core/pull/2642


   Presently, the netcore image bundled with the app core uses a default 
`timestamp` flag for `create-image` step. This PR introduces an environment 
variable `MYNEWT_USER_CREATE_IMAGE_ENV_VAR` that can be set to pass user 
defined flags to this call. If this variable is not provided, script will use 
the default `timestamp` flag


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] prasad-alatkar opened a new pull request #1000: nimble/host: Remove redundant check in connection latency

2021-07-15 Thread GitBox


prasad-alatkar opened a new pull request #1000:
URL: https://github.com/apache/mynewt-nimble/pull/1000


   ## Fix redundant check when extended advertisement flag is enabled.
   
   In `ble_gap.c`, as `params->latency` is of `unsigned uint16_t` type and 
`BLE_HCI_CONN_LATENCY_MIN` is `0`, the check `(params->latency < 
BLE_HCI_CONN_LATENCY_MIN)` will always be false and hence can be dropped.
   
   This can give below warnings if custom compiler options are used while 
compiling the code.
   ```
   warning: comparison is always false due to limited range of data type 
[-Wtype-limits]
   ```


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane opened a new issue #442: Add a way to specify syscfgs and dependencies for a different target from the current target

2021-07-14 Thread GitBox


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


   This is specially useful in the case of nrf5340:
   A syscfg/dependency needs to be overriden or migrated to the netcore target 
build from the appcore 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.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] sjanc merged pull request #2637: hw/ipc_nrf5340: (Re-)Fix enabling GPIO passing to network core

2021-07-14 Thread GitBox


sjanc merged pull request #2637:
URL: https://github.com/apache/mynewt-core/pull/2637


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] utzig merged pull request #2640: baselibc: Fix build with -Werror=array-parameter enabled

2021-07-14 Thread GitBox


utzig merged pull request #2640:
URL: https://github.com/apache/mynewt-core/pull/2640


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vrahane merged pull request #2641: spi_hal: Pull CS line back up if write / read_write operations fail

2021-07-13 Thread GitBox


vrahane merged pull request #2641:
URL: https://github.com/apache/mynewt-core/pull/2641


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] vikrant-proxy opened a new pull request #2641: spi_hal: Pull CS line back up if write / read_write operations fail

2021-07-13 Thread GitBox


vikrant-proxy opened a new pull request #2641:
URL: https://github.com/apache/mynewt-core/pull/2641


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] mlaz edited a comment on pull request #2639: hw/bsp/dwm1001-dev Add LIS2DH12 accelerometer support

2021-07-13 Thread GitBox


mlaz edited a comment on pull request #2639:
URL: https://github.com/apache/mynewt-core/pull/2639#issuecomment-879236598


   Sounds like you need to look at the module's (DWM1001, not DWM1001-dev) 
[schematic](https://www.qorvo.com/products/d/da007971) there you should find 
all the pinout info.
   I'd advise that if you need any help it might be easier if you reach out on 
slack before posting PRs.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] mlaz commented on pull request #2639: hw/bsp/dwm1001-dev Add LIS2DH12 accelerometer support

2021-07-13 Thread GitBox


mlaz commented on pull request #2639:
URL: https://github.com/apache/mynewt-core/pull/2639#issuecomment-879236598


   Sounds like you need to look at the module's (DWM1001, not DWM1001-dev) 
[schematic](https://www.qorvo.com/products/d/da007971) there you should find 
all the pinout info.
   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #995: nimble/ll: Fix TxAdd field for ADV_EXT_IND

2021-07-13 Thread GitBox


andrzej-kaczmarek merged pull request #995:
URL: https://github.com/apache/mynewt-nimble/pull/995


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-mcumgr] utzig merged pull request #126: samples/smp_svr/zephyr: Update stack size

2021-07-13 Thread GitBox


utzig merged pull request #126:
URL: https://github.com/apache/mynewt-mcumgr/pull/126


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vikrant-proxy opened a new pull request #441: mfg: Add a base address field

2021-07-12 Thread GitBox


vikrant-proxy opened a new pull request #441:
URL: https://github.com/apache/mynewt-newt/pull/441


   Chips with > 1 core, like `nrf53` have the second core mapped to a different 
address space (not based at 0x0). This PR adds a base address field that can be 
provided in the `mfg.yml` in an attempt to get `mfg` to create appropriately 
sized binaries. Without this change, the manufacturing image tends to become 
very large in size as the base address for that core is not 0x0.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #986: Blestress fixes

2021-07-12 Thread GitBox


sjanc commented on a change in pull request #986:
URL: https://github.com/apache/mynewt-nimble/pull/986#discussion_r667918856



##
File path: apps/blestress/src/tx_stress.c
##
@@ -848,6 +848,16 @@ tx_stress_9_gap_event(struct ble_gap_event *event, void 
*arg)
 {
 ble_addr_t addr;
 int test;
+struct ble_gap_conn_params conn_params = {
+.scan_itvl = 0x0010,
+.scan_window = 0x0010,
+.itvl_min = BLE_GAP_INITIAL_CONN_ITVL_MIN,
+.itvl_max = BLE_GAP_INITIAL_CONN_ITVL_MAX,
+.latency = 0,
+.supervision_timeout = 0x0C80,
+.min_ce_len = 0x0010,
+.max_ce_len = 0x0300,
+};

Review comment:
   are those connections maintained in test for at least this timeout after 
last one is created?




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane edited a comment on pull request #441: mfg: Add a base address field

2021-07-12 Thread GitBox


vrahane edited a comment on pull request #441:
URL: https://github.com/apache/mynewt-newt/pull/441#issuecomment-878454380


   I think this change is reasonable, it is required for nrf53 netcore for 
sure. Wonder if there is a way to make this mandatory somehow for BSPs with 
dual core with dedicated flash for both instead of making it optional.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #998: nimble/porting: Make os_mbuf/os_mpool work on 64-bit.

2021-07-12 Thread GitBox


sjanc commented on a change in pull request #998:
URL: https://github.com/apache/mynewt-nimble/pull/998#discussion_r667912101



##
File path: porting/nimble/src/os_mempool.c
##
@@ -38,7 +38,8 @@
 #define OS_MEMPOOL_TRUE_BLOCK_SIZE(mp) 
OS_MEM_TRUE_BLOCK_SIZE(mp->mp_block_size)
 #endif
 
-STAILQ_HEAD(, os_mempool) g_os_mempool_list;
+STAILQ_HEAD(, os_mempool) g_os_mempool_list =
+STAILQ_HEAD_INITIALIZER(g_os_mempool_list);

Review comment:
   Could you explain why is this needed?  (AFAIR initially it was like that 
to allow multiple initialization while executing tests)




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vrahane commented on pull request #441: mfg: Add a base address field

2021-07-12 Thread GitBox


vrahane commented on pull request #441:
URL: https://github.com/apache/mynewt-newt/pull/441#issuecomment-878448471






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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc merged pull request #898: NimBLE host: Modify `ble_gap_wl_set` to help remove all addresses from controller whitelist

2021-07-12 Thread GitBox


sjanc merged pull request #898:
URL: https://github.com/apache/mynewt-nimble/pull/898


   


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] jimmo commented on pull request #998: nimble/porting: Make os_mbuf/os_mpool work on 64-bit.

2021-07-12 Thread GitBox


jimmo commented on pull request #998:
URL: https://github.com/apache/mynewt-nimble/pull/998#issuecomment-878271358


   > Yes, lets fix it in core and then resync here.
   > In general I think we should simply start using uintptr where needed 
(although mynewt was/is 32bit os only).
   
   Thanks -- I'm not too familiar with mynewt (outside of NimBLE). Do you want 
me to follow this up or is this best left up to the maintainers?
   
   > Could you explain why is this needed? (AFAIR initially it was like that to 
allow multiple initialization while executing tests)
   
   I'm not too fussed either way, but I noticed that nothing in NimBLE calls 
os_mempool_module_init and there's no declaration for it in any header files. 
So this change seems like the safest way to prevent implementors missing 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.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vikrant-proxy opened a new pull request #440: mfg: account for updated bootloader path in mfg command

2021-07-12 Thread GitBox


vikrant-proxy opened a new pull request #440:
URL: https://github.com/apache/mynewt-newt/pull/440


   Bootloader binaries seem to have moved to `app/@mcuboot`, which causes `mfg` 
command to fail, see https://github.com/apache/mynewt-newt/issues/439. This PR 
attempts to account for this change.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc opened a new pull request #999: nimble/host: Fix txom leaks in ble_sm_tx and ble_l2cap_sig_tx

2021-07-12 Thread GitBox


sjanc opened a new pull request #999:
URL: https://github.com/apache/mynewt-nimble/pull/999


   Those functions are expected to always consume txom.


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] sjanc opened a new pull request #2640: baselibc: Fix build with -Werror=array-parameter enabled

2021-07-12 Thread GitBox


sjanc opened a new pull request #2640:
URL: https://github.com/apache/mynewt-core/pull/2640


   repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:8:29: error: argument 1 
of type
   ‘short unsigned int[3]’ with mismatched bound [-Werror=array-parameter=]
   8 | long jrand48(unsigned short xsubi[3])
 |  ~~~^~~~
   In file included from repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:5:
   repos/apache-mynewt-core/libc/baselibc/include/stdlib.h:66:23: note: 
previously declared
   as ‘short unsigned int *’
  66 | __extern long jrand48(unsigned short *);
 |   ^~~~
   cc1: all warnings being treated as errors


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-newt] vikrant-proxy opened a new issue #439: mfg command error

2021-07-09 Thread GitBox


vikrant-proxy opened a new issue #439:
URL: https://github.com/apache/mynewt-newt/issues/439


   I'm trying to use the mfg command with the following `newt`, and it's 
running into errors -
   ```
   $ newt version
   Apache Newt 1.10.0-dev / fd9df1e-dirty / 2021-05-17_16:21
   ```
   
   I pulled a simple test app with the following details -
   
   ```
   targets/nrf52_boot
     app=@mcuboot/boot/mynewt
     bsp=@apache-mynewt-core/hw/bsp/nordic_pca10040
     build_profile=optimized
   targets/nrf52_blinky
     app=apps/blinky
     bsp=@apache-mynewt-core/hw/bsp/nordic_pca10040
     build_profile=debug
   ```
   
   
   ```
   First complete build step for both targets
   ```
   
   ```
   $ newt mfg create blinky 1
   Error: failed to read manifest file: open 
/bin/targets/nrf52_boot/app/boot/mynewt/manifest.json: no such 
file or directory
   ```
   
   
   
   
   
   My `mfg.yml` looks like this -
   
   ```
  mfg.targets:
  -
  name: 'targets/nrf52_boot'
  area: FLASH_AREA_BOOTLOADER
  offset: 0
   
  -
  name: 'targets/nrf52_blinky'
  area: FLASH_AREA_IMAGE_0
  offset: 0
   
  mfg.meta:
  area: FLASH_AREA_IMAGE_SCRATCH
  offset: 0
   ```
   
   I believe this is because the bootloader binaries have now moved into 
`@mcuboot` folder, and `newt` cannot find them anymore. 


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] jimmo opened a new pull request #998: nimble/porting: Make os_mbuf/os_mpool work on 64-bit.

2021-07-07 Thread GitBox


jimmo opened a new pull request #998:
URL: https://github.com/apache/mynewt-nimble/pull/998


   We're using NimBLE in 
[MicroPython](https://github.com/micropython/micropython) and do much of our 
testing on (64-bit) Linux. @dpgeorge
   
   Similar to #96 (@turon). Please see commit messages for details.
   
   @KKopyscinski / @sjanc should I try and get this fixed in mynewt-core 
instead?


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-core] seijikun opened a new pull request #2639: hw/bsp/dwm1001-dev Add LIS2DH12 accelerometer support

2021-07-06 Thread GitBox


seijikun opened a new pull request #2639:
URL: https://github.com/apache/mynewt-core/pull/2639


   Hey guys,
   
   this is an attempt at adding support for the LIS2DH12 accelerometer sensor, 
which is integrated with 
[DWM1001-DEV](https://www.decawave.com/dwm1001dev/datasheet/) boards.
   I'm fairly new to mynewt, so this PR is more like a shot in the dark, and 
mostly copied from other BSPs with the same accelerometer.
   The `sensor_itf.si_ints` values are chosen, such that it does not crash - 
which does not mean that it's working ;). Would be good if somebody with more 
hardware knowledge could take a look at them (the `.active = true` certainly 
isn't true, this should be something like `HAL_GPIO_TRIG_RISING` or 
`HAL_GPIO_TRIG_FALLING`).
   
   Here is an example application:
   ```c
   #include 
   #include 
   #include 
   #include 
   #include "sysinit/sysinit.h"
   #include "os/os.h"
   #include "bsp/bsp.h"
   #include "hal/hal_gpio.h"
   #include "hal/hal_bsp.h"
   #include "hal/hal_i2c.h"
   #include "mcu/nrf52_hal.h"
   #ifdef ARCH_sim
   #include "mcu/mcu_sim.h"
   #endif
   
   #include 
   
   #include 
   #include "sensor/accel.h"
   #include 
   
   #if MYNEWT_VAL(DW1000_DEVICE_0)
   #include 
   #endif
   
   int accel_data_cb(struct sensor* sensor, void* a, void* databuf, 
sensor_type_t sensorType) {
   if(!databuf) { return SYS_EINVAL; }
   struct sensor_accel_data* sad = (struct sensor_accel_data*) databuf;
   if (!sad->sad_x_is_valid || !sad->sad_y_is_valid || 
!sad->sad_z_is_valid) { return SYS_EINVAL; }
   printf("%s: [ secs: %ld usecs: %d cputime: %u ]\n",
  "LISTENER_CB",
  (long int)sensor->s_sts.st_ostv.tv_sec,
  (int)sensor->s_sts.st_ostv.tv_usec,
  (unsigned int)sensor->s_sts.st_cputime);
   
   printf("x = %f, y = %f, z = %f\n", sad->sad_x, sad->sad_y, sad->sad_z);
   return 0;
   }
   
   static struct sensor_listener sensor_listener = {
   .sl_sensor_type = SENSOR_TYPE_ACCELEROMETER,
   .sl_func = accel_data_cb,  
   .sl_arg = NULL
   };
   

   
   int main(int argc, char **argv){
   sysinit();
   
   struct sensor* accel = sensor_mgr_find_next_bydevname("lis2dh12_0", 
NULL);
   assert(accel != NULL);
   
   assert(0 == lis2dh12_set_full_scale(>s_itf, LIS2DH12_FS_2G));
   assert(0 == lis2dh12_set_op_mode(>s_itf, 
LIS2DH12_OM_HIGH_RESOLUTION));
   
   sensor_set_poll_rate_ms(accel->s_dev->od_name, 1000 / 50);
   sensor_register_listener(accel, _listener);
   
   while (1) {
   os_eventq_run(os_eventq_dflt_get());
   }
   assert(0);
   return 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.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] fjmolinas opened a new pull request #997: porting/npl/riot: add namespaced syscfg symlink

2021-07-06 Thread GitBox


fjmolinas opened a new pull request #997:
URL: https://github.com/apache/mynewt-nimble/pull/997


   This PR symlinks the autogenerated `syscfg` so that it can be included while 
overriding settings in a custom `syscfg.h`, it's used when building in RIOT for 
multiple packages based on mynewt, see RIOT-OS/RIOT#16348 and 
RIOT-OS/RIOT#15528. With the namespace, the header can be included individually 
and not the whole include dir.
   
   @haukepetersen might be the right person to review this one!


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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #987: l2cap: implement echo request-response procedure (l2cap ping)

2021-07-06 Thread GitBox


sjanc commented on a change in pull request #987:
URL: https://github.com/apache/mynewt-nimble/pull/987#discussion_r664324471



##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1979,6 +1979,9 @@ ble_l2cap_sig_ping(uint16_t conn_handle, 
ble_l2cap_ping_fn cb,
 
 
 rc = ble_l2cap_sig_tx(proc->conn_handle, txom);
+if (rc != 0) {

Review comment:
   hmm but then, ble_l2cap_tx will consume txom even on error
   maybe ble_l2cap_sig_tx() should be updated to always consume txom,  btw I 
think ble_sm_tx() has same issue
   
   I'll try to lo review those code parts this week and propose some unified 
solution

##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1979,6 +1979,9 @@ ble_l2cap_sig_ping(uint16_t conn_handle, 
ble_l2cap_ping_fn cb,
 
 
 rc = ble_l2cap_sig_tx(proc->conn_handle, txom);
+if (rc != 0) {

Review comment:
   hmm but then, ble_l2cap_tx will consume txom even on error
   maybe ble_l2cap_sig_tx() should be updated to always consume txom,  btw I 
think ble_sm_tx() has same issue
   
   I'll try to review those code parts this week and propose some unified 
solution




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




[GitHub] [mynewt-nimble] haukepetersen commented on a change in pull request #987: l2cap: implement echo request-response procedure (l2cap ping)

2021-07-06 Thread GitBox


haukepetersen commented on a change in pull request #987:
URL: https://github.com/apache/mynewt-nimble/pull/987#discussion_r663946311



##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1979,6 +1979,9 @@ ble_l2cap_sig_ping(uint16_t conn_handle, 
ble_l2cap_ping_fn cb,
 
 
 rc = ble_l2cap_sig_tx(proc->conn_handle, txom);
+if (rc != 0) {

Review comment:
   Nope, unfortunately it does not. I have been debugging some of my nodes 
stopping to scan properly, until I found out that the node's msys buffer simply 
run out of mbufs, caused by this function not freeing `txom` on error...

##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1979,6 +1979,9 @@ ble_l2cap_sig_ping(uint16_t conn_handle, 
ble_l2cap_ping_fn cb,
 
 
 rc = ble_l2cap_sig_tx(proc->conn_handle, txom);
+if (rc != 0) {

Review comment:
   For further verification, here the code of `ble_l2cap_sig_tx()`:
   ```c
   int
   ble_l2cap_sig_tx(uint16_t conn_handle, struct os_mbuf *txom)
   {
   struct ble_l2cap_chan *chan;
   struct ble_hs_conn *conn;
   int rc;
   
   ble_hs_lock();
   rc = ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SIG,
, );
   if (rc == 0) {
   rc = ble_l2cap_tx(conn, chan, txom);
   }
   ble_hs_unlock();
   
   return rc;
   }
   ```
   As one can see, no freeing of `txom` in case 
`ble_hs_misc_conn_chan_find_reqd()` fails...
   

##
File path: nimble/host/src/ble_l2cap_sig.c
##
@@ -1979,6 +1979,9 @@ ble_l2cap_sig_ping(uint16_t conn_handle, 
ble_l2cap_ping_fn cb,
 
 
 rc = ble_l2cap_sig_tx(proc->conn_handle, txom);
+if (rc != 0) {

Review comment:
   I completely agree, this makes sense to be fixed coherently. Debugging 
this kind of inconsistency is no fun :-)
   
   Let me know where I can help!




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

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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




  1   2   3   4   5   6   7   8   9   10   >