[GitHub] ccollins476ad opened a new pull request #67: MYNEWT-778 newt - "newt run" fails for native tgts
ccollins476ad opened a new pull request #67: MYNEWT-778 newt - "newt run" fails for native tgts URL: https://github.com/apache/incubator-mynewt-newt/pull/67 This issue is described in https://issues.apache.org/jira/browse/MYNEWT-778. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wes3 opened a new pull request #326: No jira ticket: additional timing changes
wes3 opened a new pull request #326: No jira ticket: additional timing changes URL: https://github.com/apache/incubator-mynewt-core/pull/326 The main changes here were to make sure that code was using msecs and/or ticks in the appropriate places. Made some gratuitous format changes as well. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] vrahane opened a new pull request #325: MYNEWT-777 SensorAPI: Use util/parse pkg instead of using sensor_shell_stol()
vrahane opened a new pull request #325: MYNEWT-777 SensorAPI: Use util/parse pkg instead of using sensor_shell_stol() URL: https://github.com/apache/incubator-mynewt-core/pull/325 - Use util/parse package for parsing instead of using sensor_shell_stol() or parsing functions in individual drivers. - Removing the sensor_shell_stol() API. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] utzig closed pull request #324: Ensure Redbear Blend2 has i2c headers
utzig closed pull request #324: Ensure Redbear Blend2 has i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers
pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324#issuecomment-307475315 As a note, redbear does mark sda0 and scl0 in their pinout as an alternate function: https://github.com/redbear/nRF5x#ble-nano-2 If you suggest, in the future, I could look into implementing some code for that especially since it doesn't disable the primary TX/RX serial pins. Let me know what you think. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers
pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324#issuecomment-307473156 Aha, you're right. While I was testing the raw module I didn't notice the Nano didn't default to exposing i2c. Thanks for the feedback. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers
pctj101 commented on issue #324: Ensure Redbear Blend2 has i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324#issuecomment-307473156 Aha, you're right. While I was testing the raw module I didn't notice the Nano didn't default to exposing i2c. Thanks for the feedback. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow
ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121187064 ## File path: net/nimble/host/include/host/ble_store.h ## @@ -131,6 +137,40 @@ union ble_store_value { struct ble_store_value_cccd cccd; }; +struct ble_store_status_event { +/** + * The type of object that failed to persist; one of the + * BLE_STORE_OBJ_TYPE_[...] codes. + */ +int obj_type; + +/** + * The type of event being reported; one of the BLE_STORE_EVENT_TYPE_[...] + * codes. + */ +int event_code; + +/** + * Additional data related to the event; the valid field is inferred from + * the obj_type,event_code pair. + */ +union { +/** + * The record that failed to be written. Valid for the following event + * types: + * o BLE_STORE_EVENT_OVERFLOW Review comment: I didn't think that information is necessary for the reader to understand the code. The obj_type field isn't part of the union, so is valid for all events. The union fields, on the other hand, are not always valid; the user needs to know how to determine which one to use. I am a bit confused about what you are saying here. Which of these are you saying I should do: 1. Valid for all possible obj_types 2. Valid for the following obj_types: * BLE_STORE_OBJ_TYPE_OUR_SEC * BLE_STORE_OBJ_TYPE_PEER_SEC * BLE_STORE_OBJ_TYPE_CCCD This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow
ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121185868 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); +ble_hs_unlock(); + +if (count < MYNEWT_VAL(BLE_STORE_MAX_BONDS)) { +/* There is sufficient capacity for another bond. */ +return 0; +} + +/* No capacity for an additional bond. Tell the application to make + * room. + */ +memset(, 0, sizeof event); +event.obj_type = obj_type; Review comment: Isn't that what ble_store_status() does? Or were you thinking this function would take parameters and fill the event object in itself? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] utzig commented on issue #324: Ensure Redbear Blend2/Nano2 have i2c headers
utzig commented on issue #324: Ensure Redbear Blend2/Nano2 have i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324#issuecomment-307389181 The BSP for nano2 doesn't seem to use any `i2c` stuff. Why is the include required? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pctj101 opened a new pull request #324: Ensure Redbear Blend2/Nano2 have i2c headers
pctj101 opened a new pull request #324: Ensure Redbear Blend2/Nano2 have i2c headers URL: https://github.com/apache/incubator-mynewt-core/pull/324 This code at the end of the rb-* files requires the hal_i2c.h headers. ``` #if MYNEWT_VAL(I2C_0) rc = hal_i2c_init(0, (void *)_i2c_cfg); assert(rc == 0); #endif ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121058416 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); +ble_hs_unlock(); + +if (count < MYNEWT_VAL(BLE_STORE_MAX_BONDS)) { +/* There is sufficient capacity for another bond. */ +return 0; +} + +/* No capacity for an additional bond. Tell the application to make + * room. + */ +memset(, 0, sizeof event); +event.obj_type = obj_type; Review comment: I was hoping to extract that part of code as a helper which sends overflow event, but maybe we can do it when see need to construct same events in more places. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121056646 ## File path: net/nimble/host/include/host/ble_store.h ## @@ -131,6 +137,40 @@ union ble_store_value { struct ble_store_value_cccd cccd; }; +struct ble_store_status_event { +/** + * The type of object that failed to persist; one of the + * BLE_STORE_OBJ_TYPE_[...] codes. + */ +int obj_type; + +/** + * The type of event being reported; one of the BLE_STORE_EVENT_TYPE_[...] + * codes. + */ +int event_code; + +/** + * Additional data related to the event; the valid field is inferred from + * the obj_type,event_code pair. + */ +union { +/** + * The record that failed to be written. Valid for the following event + * types: + * o BLE_STORE_EVENT_OVERFLOW Review comment: Since a key for union data is pair (obj_type, event_code pair) could we extend comment here and say that value is valid for event type "BLE_STORE_EVENT_OVERFLOW" and all possible obj_type. Similar we could do for description to conn_handle, but int this case we have only couple of obj_types valid. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121058053 ## File path: net/nimble/host/include/host/ble_store.h ## @@ -31,6 +31,12 @@ extern "C" { #define BLE_STORE_OBJ_TYPE_PEER_SEC 2 #define BLE_STORE_OBJ_TYPE_CCCD 3 +/** Failed to persist record; insufficient storage capacity. */ +#define BLE_STORE_EVENT_OVERFLOW1 + +/** About to execute a procedure that may fail due to overflow. */ +#define BLE_STORE_EVENT_OVERFLOW_NEXT 2 Review comment: Well I don't have very strong opinion on this, so I suggest to leave it as it is. In the end I think that my confusion was created due to comments on the fields in union. Please check comment over there. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r121058416 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); +ble_hs_unlock(); + +if (count < MYNEWT_VAL(BLE_STORE_MAX_BONDS)) { +/* There is sufficient capacity for another bond. */ +return 0; +} + +/* No capacity for an additional bond. Tell the application to make + * room. + */ +memset(, 0, sizeof event); +event.obj_type = obj_type; Review comment: I was hoping to extract that part of code as a helper which sends overflow event, but maybe we can do it when see need to construct same events in more places. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services