[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2900: fs/littlefs: Update to v2.5.0 and some fixes

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #2900:
URL: https://github.com/apache/mynewt-core/pull/2900#issuecomment-1275475919

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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

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] apache-mynewt-bot commented on pull request #2900: fs/littlefs: Update to v2.5.0 and some fixes

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #2900:
URL: https://github.com/apache/mynewt-core/pull/2900#issuecomment-1275475785

   
   
   
   ## RAT Report (2022-10-12 01:42:00)
   
   ## New files with unknown licenses
   
   * https://github.com/apache/mynewt-core/blob/6161beb21b3506af4a2e2e181e7d53e7e803179b/fs/littlefs/LICENSE.md;>fs/littlefs/LICENSE.md
   
   ## 1 new files were excluded from check (.rat-excludes)
   
   
 Detailed analysis
   
   ## New files in this PR
   
   | License | File |
   |-|--|
   | ?  | https://github.com/apache/mynewt-core/blob/6161beb21b3506af4a2e2e181e7d53e7e803179b/fs/littlefs/LICENSE.md;>fs/littlefs/LICENSE.md
 |
   
   
   


-- 
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] apache-mynewt-bot commented on pull request #1396: nimble/host: Add host callback to provide security keys

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #1396:
URL: https://github.com/apache/mynewt-nimble/pull/1396#issuecomment-1275421588

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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

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 #1394: nimble/ll: Fix ifdefs for BLE_LL_EXT

2022-10-11 Thread GitBox


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


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



[mynewt-nimble] branch master updated (c6e6614c -> f6567c02)

2022-10-11 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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


from c6e6614c nimble/ll: Add init and reset for external code
 add f6567c02 nimble/ll: Fix ifdefs for BLE_LL_EXT

No new revisions were added by this update.

Summary of changes:
 nimble/controller/src/ble_ll.c  | 10 +-
 nimble/controller/src/ble_ll_scan.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)



[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #1393: nimble/ll: Add init and reset for external code

2022-10-11 Thread GitBox


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


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



[mynewt-nimble] branch master updated: nimble/ll: Add init and reset for external code

2022-10-11 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c6e6614c nimble/ll: Add init and reset for external code
c6e6614c is described below

commit c6e6614cf114526113f02321cf38c156417d675d
Author: Andrzej Kaczmarek 
AuthorDate: Sun Oct 9 21:44:30 2022 +0200

nimble/ll: Add init and reset for external code

This adds init and reset calls for external code so it can be
initialized and reset properly in sync with LL.
---
 nimble/controller/include/controller/ble_ll_ext.h |  4 
 nimble/controller/src/ble_ll.c| 12 
 2 files changed, 16 insertions(+)

diff --git a/nimble/controller/include/controller/ble_ll_ext.h 
b/nimble/controller/include/controller/ble_ll_ext.h
index fc46ad4d..5b3bb376 100644
--- a/nimble/controller/include/controller/ble_ll_ext.h
+++ b/nimble/controller/include/controller/ble_ll_ext.h
@@ -36,6 +36,10 @@ extern "C" {
 
 struct ble_ll_sched_item;
 
+/* Called when LL package is initialized (before ll_task is started) */
+void ble_ll_ext_init(void);
+/* Called when LL is reset (i.e. HCI_Reset) */
+void ble_ll_ext_reset(void);
 /* Called when LL is in "external" state and PHY starts to receive a PDU */
 int ble_ll_ext_rx_isr_start(uint8_t pdu_type, struct ble_mbuf_hdr *rxhdr);
 /* Called when LL is in "external" state and PHY finished to receive a PDU */
diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c
index d8d2e6bc..b3719c12 100644
--- a/nimble/controller/src/ble_ll.c
+++ b/nimble/controller/src/ble_ll.c
@@ -56,6 +56,10 @@
 #include "ble_ll_dtm_priv.h"
 #endif
 
+#if MYNEWT_VAL(BLE_LL_EXT)
+#include 
+#endif
+
 /* XXX:
  *
  * 1) use the sanity task!
@@ -1605,6 +1609,10 @@ ble_ll_reset(void)
 ble_ll_rfmgmt_reset();
 OS_EXIT_CRITICAL(sr);
 
+#if MYNEWT_VAL(BLE_LL_EXT)
+ble_ll_ext_reset();
+#endif
+
 #if MYNEWT_VAL(BLE_LL_ROLE_BROADCASTER)
 /* Stop any advertising */
 ble_ll_adv_reset();
@@ -1981,6 +1989,10 @@ ble_ll_init(void)
 ble_ll_hci_vs_init();
 #endif
 
+#if MYNEWT_VAL(BLE_LL_EXT)
+ble_ll_ext_init();
+#endif
+
 #if MYNEWT
 /* Initialize the LL task */
 os_task_init(_ble_ll_task, "ble_ll", ble_ll_task, NULL,



[mynewt-nimble] branch master updated: nimble/ll: Fix enabling extended scan with no configuration

2022-10-11 Thread janc
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b353ddc1 nimble/ll: Fix enabling extended scan with no configuration
b353ddc1 is described below

commit b353ddc1a44e1d4817e369d4a8b59a98aa3b0e7e
Author: Szymon Janc 
AuthorDate: Mon Oct 10 16:18:29 2022 +0200

nimble/ll: Fix enabling extended scan with no configuration

Core Specification 5.3, Vol 4, Part E, 7.8.65:
"If Enable is set to 0x01 and the Host has not issued the
HCI_LE_Set_Extended_Scan_Parameters command, the Controller shall
either use vendor-specified parameters or return the error code
Command Disallowed (0x0C)"

To keep things simple we just reject in such case.

This was affecting HCI/DDI/BV-06-C qualification test case.
---
 nimble/controller/src/ble_ll_scan.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/nimble/controller/src/ble_ll_scan.c 
b/nimble/controller/src/ble_ll_scan.c
index a0afbdcc..587ae6b2 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -2314,6 +2314,27 @@ ble_ll_scan_set_enable(uint8_t enable, uint8_t 
filter_dups, uint16_t period,
 scansm = _ble_ll_scan_sm;
 
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
+if (ext) {
+/*
+ * If Enable is set to 0x01 and the Host has not issued the
+ * HCI_LE_Set_Extended_Scan_Parameters command, the Controller shall
+ * either use vendor-specified parameters or return the error code
+ * Command Disallowed (0x0C)
+ *
+ * To keep things simple for devices without public address we
+ * reject in such case.
+ */
+for (i = 0; i < BLE_LL_SCAN_PHY_NUMBER; i++) {
+if (g_ble_ll_scan_params.scan_phys[i].configured) {
+break;
+}
+}
+
+if (i == BLE_LL_SCAN_PHY_NUMBER) {
+return BLE_ERR_CMD_DISALLOWED;
+}
+}
+
 /* we can do that here since value will never change until reset */
 scansm->ext_scanning = ext;
 



[GitHub] [mynewt-nimble] sjanc merged pull request #1395: nimble/ll: Fix enabling extended scan with no configuration

2022-10-11 Thread GitBox


sjanc merged PR #1395:
URL: https://github.com/apache/mynewt-nimble/pull/1395


-- 
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] apache-mynewt-bot commented on pull request #1395: nimble/ll: Fix enabling extended scan with no configuration

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #1395:
URL: https://github.com/apache/mynewt-nimble/pull/1395#issuecomment-1275127036

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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

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] apache-mynewt-bot commented on pull request #1397: nimble/ll: Add API to read random data from controller

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #1397:
URL: https://github.com/apache/mynewt-nimble/pull/1397#issuecomment-1275000171

   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    apps/bttester/src/gap.c
   
   
   ```diff
   @@ -685,302 +702,314 @@
 * If the resolution procedure fails, then the Host shall disconnect
 * with the error code "Authentication failure" [...]
 */
   -static void periph_privacy(struct ble_gap_conn_desc desc)
   +static void
   +periph_privacy(struct ble_gap_conn_desc desc)
{
#if !MYNEWT_VAL(BTTESTER_PRIVACY_MODE)
   -return;
   +return;
#endif
   -int count;
   -
   -SYS_LOG_DBG("");
   -
   -ble_store_util_count(BLE_STORE_OBJ_TYPE_PEER_SEC, );
   -if (count > 0 && BLE_ADDR_IS_RPA(_id_addr)) {
   -SYS_LOG_DBG("Authentication failure, disconnecting");
   -ble_gap_terminate(desc.conn_handle, BLE_ERR_AUTH_FAIL);
   -}
   -}
   -
   -static void device_connected_ev_send(struct os_event *ev)
   -{
   -struct ble_gap_conn_desc desc;
   -int rc;
   -
   -SYS_LOG_DBG("");
   -
   -rc = gap_conn_find_by_addr((ble_addr_t *)_ev, );
   -if (rc) {
   -tester_rsp(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   -   CONTROLLER_INDEX, BTP_STATUS_FAILED);
   -return;
   -}
   -
   -tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   -CONTROLLER_INDEX, (uint8_t *) _ev,
   -sizeof(connected_ev));
   -
   -periph_privacy(desc);
   -}
   -
   -static void le_connected(uint16_t conn_handle, int status)
   -{
   -struct ble_gap_conn_desc desc;
   -ble_addr_t *addr;
   -int rc;
   -
   -SYS_LOG_DBG("");
   -
   -if (status != 0) {
   -return;
   -}
   -
   -rc = ble_gap_conn_find(conn_handle, );
   -if (rc) {
   -return;
   -}
   -
   -peer_id_addr = desc.peer_id_addr;
   -peer_ota_addr = desc.peer_ota_addr;
   -
   -addr = _id_addr;
   -
   -memcpy(connected_ev.address, addr->val, sizeof(connected_ev.address));
   -connected_ev.address_type = addr->type;
   -connected_ev.conn_itvl = desc.conn_itvl;
   -connected_ev.conn_latency = desc.conn_latency;
   -connected_ev.supervision_timeout = desc.supervision_timeout;
   +int count;
   +
   +SYS_LOG_DBG("");
   +
   +ble_store_util_count(BLE_STORE_OBJ_TYPE_PEER_SEC, );
   +if (count > 0 && BLE_ADDR_IS_RPA(_id_addr)) {
   +SYS_LOG_DBG("Authentication failure, disconnecting");
   +ble_gap_terminate(desc.conn_handle, BLE_ERR_AUTH_FAIL);
   +}
   +}
   +
   +static void
   +device_connected_ev_send(struct os_event *ev)
   +{
   +struct ble_gap_conn_desc desc;
   +int rc;
   +
   +SYS_LOG_DBG("");
   +
   +rc = gap_conn_find_by_addr((ble_addr_t *)_ev, );
   +if (rc) {
   +tester_rsp(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   +   CONTROLLER_INDEX, BTP_STATUS_FAILED);
   +return;
   +}
   +
   +tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   +CONTROLLER_INDEX, (uint8_t *) _ev,
   +sizeof(connected_ev));
   +
   +periph_privacy(desc);
   +}
   +
   +static void
   +le_connected(uint16_t conn_handle, int status)
   +{
   +struct ble_gap_conn_desc desc;
   +ble_addr_t *addr;
   +int rc;
   +
   +SYS_LOG_DBG("");
   +
   +if (status != 0) {
   +return;
   +}
   +
   +rc = ble_gap_conn_find(conn_handle, );
   +if (rc) {
   +return;
   +}
   +
   +peer_id_addr = desc.peer_id_addr;
   +peer_ota_addr = desc.peer_ota_addr;
   +
   +addr = _id_addr;
   +
   +memcpy(connected_ev.address, addr->val, sizeof(connected_ev.address));
   +connected_ev.address_type = addr->type;
   +connected_ev.conn_itvl = desc.conn_itvl;
   +connected_ev.conn_latency = desc.conn_latency;
   +connected_ev.supervision_timeout = desc.supervision_timeout;

#if MYNEWT_VAL(BTTESTER_CONN_RETRY)
   -os_callout_reset(_ev_co,
   - os_time_ms_to_ticks32(
   - CONNECTED_EV_DELAY_MS(desc.conn_itvl)));
   +os_callout_reset(_ev_co,
   + os_time_ms_to_ticks32(
   + CONNECTED_EV_DELAY_MS(desc.conn_itvl)));
#else
   -tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   -CONTROLLER_INDEX, (uint8_t *) _ev,
   -sizeof(connected_ev));
   +tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
   +CONTROLLER_INDEX, (uint8_t *) _ev,
   +sizeof(connected_ev));
#endif
}

   -static void le_disconnected(struct ble_gap_conn_desc *conn, int reason)
   -{
   -struct gap_device_disconnected_ev ev;
   -ble_addr_t *addr = >peer_ota_addr;
   -
 

[GitHub] [mynewt-mcumgr] milansedlak opened a new issue, #163: error: function does not return NSString

2022-10-11 Thread GitBox


milansedlak opened a new issue, #163:
URL: https://github.com/apache/mynewt-mcumgr/issues/163

   Hi,
   During a clean install of the MCUmgr via "go install 
github.com/apache/mynewt-mcumgr-cli/mcumgr@latest"
   an error "error: function does not return NSString"  has occurred.
   
   MacBook-Pro-2:~ msedlak$ go install 
github.com/apache/mynewt-mcumgr-cli/mcumgr@latest
   go: downloading github.com/apache/mynewt-mcumgr-cli 
v0.0.0-20221004073047-5c56bd24066c
   go: downloading mynewt.apache.org/newtmgr v0.0.0-20201028150837-60b2da78788c
   go: downloading mynewt.apache.org/newt v0.0.0-20201028015609-b57111dbd19f
   go: downloading github.com/runtimeco/go-coap 
v0.0.0-20190911184520-8e5532820fc0
   go: downloading github.com/JuulLabs-OSS/cbgo v0.0.1
   go: downloading github.com/sirupsen/logrus v1.5.0
   go: downloading github.com/spf13/cast v1.3.0
   go: downloading github.com/spf13/cobra v0.0.5
   go: downloading gopkg.in/abiosoft/ishell.v2 v2.0.0
   go: downloading gopkg.in/cheggaaa/pb.v1 v1.0.28
   go: downloading github.com/pkg/errors v0.8.1
   go: downloading github.com/JuulLabs-OSS/ble 
v0.0.0-20200716215611-d4fcc9d598bb
   go: downloading github.com/mitchellh/go-homedir v1.1.0
   go: downloading github.com/joaojeronimo/go-crc16 
v0.0.0-20140729130949-59bd0194935e
   go: downloading github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
   go: downloading golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914
   go: downloading github.com/ugorji/go/codec v1.1.7
   go: downloading github.com/spf13/pflag v1.0.5
   go: downloading github.com/mattn/go-runewidth v0.0.6
   go: downloading golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68
   go: downloading github.com/ugorji/go v1.1.7
   go: downloading github.com/abiosoft/readline 
v0.0.0-20180607040430-155bce2042db
   go: downloading github.com/fatih/color v1.7.0
   go: downloading github.com/flynn-archive/go-shlex 
v0.0.0-20150515145356-3f9db97f8568
   go: downloading github.com/fatih/structs v1.1.0
   go: downloading github.com/mattn/go-isatty v0.0.12
   go: downloading github.com/mattn/go-colorable v0.1.6
   go: downloading github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab
   go: downloading github.com/raff/goble v0.0.0-20200327175727-d63360dcfd80
   go: downloading github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
   _# github.com/JuulLabs-OSS/cbgo
   In file included from 
go/pkg/mod/github.com/!juul!labs-!o!s!s/cbgo@v0.0.1/att.go:5:
   In file included from ./bt.h:4:
   In file included from 
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
   
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143:
 error: function does not return NSString
   -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key 
value:(nullable NSString *)value table:(nullable NSString *)tableName 
NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), 
ios(15.0), watchos(8.0), tvos(15.0));
~~  
 ^  
~
   
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48:
 note: expanded from macro 'NS_FORMAT_ARGUMENT'
   #define NS_FORMAT_ARGUMENT(A) __ attribute __ ((format_arg(A)))
 ^  ~
   1 error generated.
   
   I use macOS Big Sur (Version 11.5.2)
   
   Is there a way how to resolve this?
   Many Thanks.
   


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

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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1396: nimble/host: Add host callback to provide security keys

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #1396:
URL: https://github.com/apache/mynewt-nimble/pull/1396#issuecomment-1274902684

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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

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 diff in pull request #1396: nimble/host: Add host callback to provide security keys

2022-10-11 Thread GitBox


sjanc commented on code in PR #1396:
URL: https://github.com/apache/mynewt-nimble/pull/1396#discussion_r992396802


##
nimble/host/include/host/ble_store.h:
##
@@ -178,6 +178,36 @@ struct ble_store_status_event {
 };
 };
 
+/* blestore.ltk_periph, ediv and rand are valid */
+#define BLE_STORE_KEYS_MASK_LTK 0x01
+/* ble_store_keys.irk is valid */
+#define BLE_STORE_KEYS_MASK_IRK 0x02
+/* ble_store_keys.csrk is valid */
+#define BLE_STORE_KEYS_MASK_CSRK0x04
+
+struct ble_store_keys {
+uint8_t ltk_periph[16];
+uint16_t ediv;
+uint64_t rand;
+uint8_t irk[16];
+uint8_t csrk[16];
+};
+
+/**
+ * Generates keys required by security module.
+ * This can be used to use custom routines to generate keys instead of simply
+ * randomizing them.
+ *
+ * @param keys_mask Keys that shall be generated.
+ * @param keys  Storage for generated keys. Only keys indicated
+ *  by keys mask should be updated.
+ *
+ * @return  0 if keys were generated successfully
+ *  Other nonzero on error.
+ */
+typedef int ble_store_gen_keys_fn(uint8_t keys_mask,

Review Comment:
   key instead of keys_mask, since we always ask for single key



##
nimble/host/include/host/ble_store.h:
##
@@ -178,6 +178,36 @@ struct ble_store_status_event {
 };
 };
 
+/* blestore.ltk_periph, ediv and rand are valid */
+#define BLE_STORE_KEYS_MASK_LTK 0x01
+/* ble_store_keys.irk is valid */
+#define BLE_STORE_KEYS_MASK_IRK 0x02
+/* ble_store_keys.csrk is valid */
+#define BLE_STORE_KEYS_MASK_CSRK0x04
+
+struct ble_store_keys {
+uint8_t ltk_periph[16];

Review Comment:
   make this union



##
nimble/host/src/ble_hs_startup.c:
##
@@ -372,7 +373,18 @@ ble_hs_startup_go(void)
 return rc;
 }
 
-ble_hs_pvcy_set_our_irk(NULL);
+if (ble_hs_cfg.store_gen_keys_cb) {
+rc = ble_hs_cfg.store_gen_keys_cb(BLE_STORE_KEYS_MASK_IRK, );

Review Comment:
   maybe memset keys before calling callback



-- 
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 opened a new pull request, #1397: nimble/ll: Add API to read random data from controller

2022-10-11 Thread GitBox


andrzej-kaczmarek opened a new pull request, #1397:
URL: https://github.com/apache/mynewt-nimble/pull/1397

   This may be useful to get some random if MCU does not support trng, e.g. as 
on nRF5340 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] apache-mynewt-bot commented on pull request #2899: mcu/nrf5340: Add secure functions package

2022-10-11 Thread GitBox


apache-mynewt-bot commented on PR #2899:
URL: https://github.com/apache/mynewt-core/pull/2899#issuecomment-1274516557

   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/mcu/nordic/nrf5340/tfm/src/tfm.c
   
   
   ```diff
   @@ -47,7 +47,7 @@
err = TFM_ERR_INVALID_PARAM;
} else if pin_number < 32) && (MYNEWT_VAL(TFM_MCU_SEL_GPIO0) & 
pin_mask)) ||
((pin_number >= 32) && (pin_number < 64) &&
   -   (MYNEWT_VAL(TFM_MCU_SEL_GPIO1) & pin_mask {
   + (MYNEWT_VAL(TFM_MCU_SEL_GPIO1) & pin_mask {
nrf_gpio_pin_mcu_select(pin_number, mcu_sel);
} else {
err = TFM_ERR_ACCESS_DENIED;
   ```
   
   


-- 
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, #2899: mcu/nrf5340: Add secure functions package

2022-10-11 Thread GitBox


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

   New package will contain secure functions.
   Those functions will allow access to secure only peripherals.
   
   To start MCU assignment to GPIO function tfm_gpio_pin_mcu_select
   allows to redirect PIN to net core.
   
   tfm_uicr_otp_read() allows to read UICR->OTP from non-secure code.
   
   When tfm package build with bootloader or secure application
   functions are treated as every other function.
   
   When tfm is build with non-secure application function bodies
   are not present in the build and are expected to be linked with
   library that provides secure gateways.
   
   tfm can be also build into bootloader in this case it's the
   bootloader that provides secure functions.
   
   ELF that provides implementation of secure functions must be
   build with TFM_EXPORT_NSC: 1 syscfg value.
   
   Signed-off-by: Jerzy Kasenberg 


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