[GitHub] ccollins476ad opened a new pull request #67: MYNEWT-778 newt - "newt run" fails for native tgts

2017-06-09 Thread git
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

2017-06-09 Thread git
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()

2017-06-09 Thread git
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] mkiiskila commented on a change in pull request #66: image: Add support for RSA-PSS signatures

2017-06-08 Thread git
mkiiskila commented on a change in pull request #66: image: Add support for 
RSA-PSS signatures
URL: 
https://github.com/apache/incubator-mynewt-newt/pull/66#discussion_r121031912
 
 

 ##
 File path: newt/image/image.go
 ##
 @@ -46,6 +46,10 @@ import (
"mynewt.apache.org/newt/util"
 )
 
+// Set this to enable RSA-PSS for RSA signatures, instead of PKCS#1
+// v1.5.  Eventually, this should be the default.
+var UseRsaPss = false
 
 Review comment:
   Ah, I forgot that there was a layer of indirection added between the CLI and 
image signing for split images. Reaching through that will be a bit cumbersome.
 

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 #293: apps/btshell: add bletiny clone that uses new shell

2017-06-08 Thread git
ccollins476ad commented on a change in pull request #293: apps/btshell: add 
bletiny clone that uses new shell
URL: 
https://github.com/apache/incubator-mynewt-core/pull/293#discussion_r121025656
 
 

 ##
 File path: net/nimble/host/src/ble_gatts.c
 ##
 @@ -2080,6 +2080,141 @@ ble_gatts_count_cfg(const struct ble_gatt_svc_def 
*defs)
 return 0;
 }
 
+static const char* ble_gatt_chr_f_names[] = {
+"BROADCAST",
+"READ",
+"WRITE_NO_RSP",
+"WRITE",
+"NOTIFY",
+"INDICATE",
+"AUTH_SIGN_WRITE",
+"RELIABLE_WRITE",
+"AUX_WRITE",
+"READ_ENC",
+"READ_AUTHEN",
+"READ_AUTHOR",
+"WRITE_ENC",
+"WRITE_AUTHEN",
+"WRITE_AUTHOR",
+NULL
+};
+
+static const char* ble_gatt_dsc_f_names[] = {
+"READ",
+"WRITE",
+"READ_ENC",
+"READ_AUTHEN",
+"READ_AUTHOR",
+"WRITE_ENC",
+"WRITE_AUTHEN",
+"WRITE_AUTHOR",
+NULL
+};
+
+#define BLE_CHR_FLAGS_STR_LEN 180
+
+static char *
+ble_gatts_flags_to_str(uint16_t flags, char *buf,
+   const char **names)
+{
+int bit;
+bool non_empty = false;
+size_t length = 0;
+
+buf[0] = '\0';
+strcpy(buf, "[");
+length += 1;
+for (bit = 0; names[bit]; ++bit) {
+if (flags & (1 << bit)) {
+length += strlen(names[bit]);
+if (length + 1 >= BLE_CHR_FLAGS_STR_LEN) {
+return buf;
+}
+if (non_empty) {
+strcat(buf, "|");
+length += 1;
+}
+strcat(buf, names[bit]);
+non_empty = true;
+}
+}
+strcat(buf, "]");
+return buf;
+}
+
+
+#define STRINGIFY(X) #X
+#define FIELD_NAME_LEN STRINGIFY(12)
+#define FIELD_INDENT STRINGIFY(2)
+
+static void
+ble_gatt_show_local_chr(const struct ble_gatt_svc_def *svc,
 
 Review comment:
   This may verge on nit-picking, but I am not sure about putting code to print 
the registered resources in this file (ble_gatts.c).  This file is already 
pretty big and ugly, and this new functionality feels different from what is 
already there.
   
   I would suggest one of the following:
   
   1. 
   * Move ble_gatt_show_local_chr() to a new file.
   * Create ble_gatt_show_local_svc() in the new file.
   * Modify ble_gatts_show_local() such that it just iterates the list of 
services, calling ble_gatt_show_local_svc() on each one.
   
   This removes most of the new code from ble_gatts.c
   
   2. Add accessor functions for the service list; move all new code into a new 
file.  ble_gatts_show_local() calls the new accessor function and prints each 
service.
   
   3. Add a generic ble_gatts_lcl_svc_foreach() function to ble_gatts.c.  This 
function takes a function pointer which gets called for each registered 
service.  The new print code could go in a new file and be implemented with a 
call to the new foreach function.
 

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

2017-06-09 Thread git
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

2017-06-09 Thread git
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

2017-06-09 Thread git
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

2017-06-09 Thread git
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] vrahane opened a new pull request #330: MYNEWT-781 BNO055 Shell: throw error on no type

2017-06-12 Thread git
vrahane opened a new pull request #330: MYNEWT-781 BNO055 Shell: throw error on 
no type
URL: https://github.com/apache/incubator-mynewt-core/pull/330
 
 
   For "r" command throw error on no type.
 

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 closed pull request #330: MYNEWT-781 BNO055 Shell: throw error on no type

2017-06-12 Thread git
vrahane closed pull request #330: MYNEWT-781 BNO055 Shell: throw error on no 
type
URL: https://github.com/apache/incubator-mynewt-core/pull/330
 
 
   
 

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 #332: MYNEWT-779 tcs34725 driver: remove os_time_delay()

2017-06-12 Thread git
vrahane opened a new pull request #332: MYNEWT-779 tcs34725 driver: remove 
os_time_delay()
URL: https://github.com/apache/incubator-mynewt-core/pull/332
 
 
   - Removing os_time_delay() from driver and moving it to shell for using it 
with shell.
   - Sensor framework polling timer should be used for reading instead of 
os_time_delay().
 

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] cwanda opened a new pull request #200: Removed outdated shell example.

2017-06-12 Thread git
cwanda opened a new pull request #200: Removed outdated shell example.
URL: https://github.com/apache/incubator-mynewt-site/pull/200
 
 
   This PR should be merged into 1.0 doc.  You can also merge this into the 
latest doc or just wait until the  PR for the 1.1 shell improvement doc is 
created. 
   1) Removed the blinky shell example
   2) Added a link the the enabling the Console and Shell tutorial as an 
example.
 

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 #331: MYNEWT-780 Sensor driver shells: expose ADDR syscf

2017-06-12 Thread git
vrahane opened a new pull request #331: MYNEWT-780 Sensor driver shells: expose 
ADDR syscf
URL: https://github.com/apache/incubator-mynewt-core/pull/331
 
 
   Sensor driver shells should expose ADDR syscfg since the shell should use a 
specific address to talk to a sensor device.
 

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] mkiiskila commented on a change in pull request #329: Wi-Fire: Implement hal_timer

2017-06-12 Thread git
IFS0CLR = _IFS0_T3IF_MASK;
+break;
+case 2:
+IEC0CLR = _IEC0_T4IE_MASK;
+IFS0CLR = _IFS0_T4IF_MASK;
+break;
+case 3:
+IEC0CLR = _IEC0_T5IE_MASK;
+IFS0CLR = _IFS0_T5IF_MASK;
+break;
+case 4:
+IEC0CLR = _IEC0_T6IE_MASK;
+IFS0CLR = _IFS0_T6IF_MASK;
+break;
+case 5:
+IEC1CLR = _IEC1_T7IE_MASK;
+IFS1CLR = _IFS1_T7IF_MASK;
+break;
+case 6:
+IEC1CLR = _IEC1_T8IE_MASK;
+IFS1CLR = _IFS1_T8IF_MASK;
+break;
+case 7:
+IEC1CLR = _IEC1_T9IE_MASK;
+IFS1CLR = _IFS1_T9IF_MASK;
+break;
+}
+
+}
+
+static void
+compute_next_expiry(struct pic32_timer *bsp_timer)
+{
+struct hal_timer *first = TAILQ_FIRST(_timer->hal_timer_queue);
+if (first != NULL) {
+bsp_timer->expiry = first->expiry;
+bsp_timer->expiry *= bsp_timer->interrupt_per_tick;
+}
+}
+
+static void
+handle_timer_list(int timer_num)
+{
+int i;
+int timers_to_remove = 0;
+uint32_t current_tick = hal_timer_read(timer_num);
+struct hal_timer *entry;
+
+TAILQ_FOREACH(entry, [timer_num].hal_timer_queue, link) {
+if (entry->expiry <= current_tick) {
+entry->cb_func(entry->cb_arg);
+++timers_to_remove;
+} else {
+break;
+}
+}
+
+for (i = 0; i < timers_to_remove; ++i) {
+TAILQ_REMOVE([timer_num].hal_timer_queue,
+ TAILQ_FIRST([timer_num].hal_timer_queue), link);
+}
 
 Review comment:
   This could be reduced to:
   
   while ((entry = TAILQ_FIRST([timer_num].hal_timer_queue)) != NULL) {
  if (entry->expiry <= current_tick) {
 TAILQ_REMOVE([timer_num].hal_timer_queue, entry, link);
 entry->link.tqe_prev = NULL;
 entry->cb_func(entry->cb_arg);
  } else {
 break;
   }
   
   I assume you'll need to also assign the next pointer to be NULL, as 
hal_timer_stop() below
   uses that to figure out if timer should be removed from this list?
   Also, you'll want to remove the timer from the list before calling the 
handler; the intent is that the called callback function will be able to 
restart this same timer.
 

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] mkiiskila commented on a change in pull request #329: Wi-Fire: Implement hal_timer

2017-06-12 Thread git
IFS0CLR = _IFS0_T3IF_MASK;
+break;
+case 2:
+IEC0CLR = _IEC0_T4IE_MASK;
+IFS0CLR = _IFS0_T4IF_MASK;
+break;
+case 3:
+IEC0CLR = _IEC0_T5IE_MASK;
+IFS0CLR = _IFS0_T5IF_MASK;
+break;
+case 4:
+IEC0CLR = _IEC0_T6IE_MASK;
+IFS0CLR = _IFS0_T6IF_MASK;
+break;
+case 5:
+IEC1CLR = _IEC1_T7IE_MASK;
+IFS1CLR = _IFS1_T7IF_MASK;
+break;
+case 6:
+IEC1CLR = _IEC1_T8IE_MASK;
+IFS1CLR = _IFS1_T8IF_MASK;
+break;
+case 7:
+IEC1CLR = _IEC1_T9IE_MASK;
+IFS1CLR = _IFS1_T9IF_MASK;
+break;
+}
+
+}
+
+static void
+compute_next_expiry(struct pic32_timer *bsp_timer)
+{
+struct hal_timer *first = TAILQ_FIRST(_timer->hal_timer_queue);
+if (first != NULL) {
+bsp_timer->expiry = first->expiry;
+bsp_timer->expiry *= bsp_timer->interrupt_per_tick;
+}
+}
+
+static void
+handle_timer_list(int timer_num)
+{
+int i;
+int timers_to_remove = 0;
+uint32_t current_tick = hal_timer_read(timer_num);
+struct hal_timer *entry;
+
+TAILQ_FOREACH(entry, [timer_num].hal_timer_queue, link) {
+if (entry->expiry <= current_tick) {
+entry->cb_func(entry->cb_arg);
+++timers_to_remove;
+} else {
+break;
+}
+}
+
+for (i = 0; i < timers_to_remove; ++i) {
+TAILQ_REMOVE([timer_num].hal_timer_queue,
+ TAILQ_FIRST([timer_num].hal_timer_queue), link);
+}
+if (timers_to_remove != 0) {
+compute_next_expiry([timer_num]);
+}
+}
+
+void
+__attribute__((interrupt(IPL3AUTO), vector(_TIMER_2_VECTOR)))
+timer2_isr(void)
+{
+++timers[0].interrupt_count;
+
+if (!(TAILQ_EMPTY([0].hal_timer_queue)) &&
+timers[0].expiry <= timers[0].interrupt_count) {
 
 Review comment:
   Is there a register you can read for the time instead of relying on 
interrupt count? If frequency of the timer is set to be high, there's a fair 
chance that interrupts are going to be missed when someone else is blocking 
interrupts for some amount of time.
   
   It would be useful to look at other hal_timer implementations to see how 
they deal with this issue.
 

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] aditihilbert closed pull request #199: warning: same priority for two tasks is not allowed, fires an assert.

2017-06-12 Thread git
aditihilbert closed pull request #199: warning: same priority for two tasks is 
not allowed, fires an assert. 
URL: https://github.com/apache/incubator-mynewt-site/pull/199
 
 
   
 

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] cwanda opened a new pull request #201: Use STATS_NAMES syscfg setting

2017-06-12 Thread git
cwanda opened a new pull request #201: Use STATS_NAMES syscfg setting
URL: https://github.com/apache/incubator-mynewt-site/pull/201
 
 
   **This PR can be merged into 1.0 and the latest documentation.** 
   Use STATS_NAMES syscfg setting instead of STAT_NAMES_ENABLE compile flag to
   enable stat names.
 

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] mkiiskila closed pull request #328: boot/bootutil; security fix - if BOOTUTIL_VALIDATE_SLOT0 was set,

2017-06-20 Thread git
mkiiskila closed pull request #328: boot/bootutil; security fix - if 
BOOTUTIL_VALIDATE_SLOT0 was set,
URL: https://github.com/apache/incubator-mynewt-core/pull/328
 
 
   
 

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

2017-06-19 Thread git
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_r122786922
 
 

 ##
 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 really do want to make changes that you suggest, but, subjectively, I'm 
just not sure its an improvement in the signal-to-noise of the code.  In my 
mind, the concept of "validity" doesn't really apply here.  This is a 
discriminated union, and the user needs to know which field can be validly 
read.  That selection is made via the "event_code" field (i.e., that is the 
descriminator).  The "obj_type" field has no effect on the validity of each 
member of the union.
   
   Also, I'm not sure we'll never use this event for the CCCD object type.  I 
think we should use it for all object types where possible.  The current CCCD 
persistence code doesn't do a good job of handling all the error cases, so 
hopefully we can improve it going forward.
 

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

2017-06-19 Thread git
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_r122791440
 
 

 ##
 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:
   OK, I understand.  Thanks, that is a good idea.  I have added two functions:
   
   ```
   int ble_store_overflow_event(int obj_type, const union ble_store_value 
*value);
   int ble_store_overflow_next_event(int obj_type, uint16_t conn_handle);
   ```
   
   and made `ble_store_status` static.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ccollins476ad opened a new pull request #340: MYNEWT-787 serial boot loader - newtmgr buffer overruns

2017-06-19 Thread git
ccollins476ad opened a new pull request #340: MYNEWT-787 serial boot loader - 
newtmgr buffer overruns
URL: https://github.com/apache/incubator-mynewt-core/pull/340
 
 
   This issue is described in: https://issues.apache.org/jira/browse/MYNEWT-787
 

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] mkiiskila closed pull request #329: Wi-Fire: Implement hal_timer

2017-06-19 Thread git
mkiiskila closed pull request #329: Wi-Fire: Implement hal_timer
URL: https://github.com/apache/incubator-mynewt-core/pull/329
 
 
   
 

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] cwanda opened a new pull request #189: Use nRF52 Development Kit (nRF52-DK) in blinky nrf52 tutorial

2017-05-26 Thread git
cwanda opened a new pull request #189: Use nRF52 Development Kit (nRF52-DK)  in 
blinky nrf52 tutorial
URL: https://github.com/apache/incubator-mynewt-site/pull/189
 
 
   Use nRF52 Development Kit (nRF52-DK)  in blinky nrf52 tutorial to avoid 
confusion that the patched openocd currently works with nRF52-DK
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal opened a new pull request #294: ibeacon: add fields.flags

2017-05-26 Thread git
jacobrosenthal opened a new pull request #294: ibeacon: add fields.flags
URL: https://github.com/apache/incubator-mynewt-core/pull/294
 
 
   Seems from sniffing existing beacons and googling were missing these flags
   
https://support.kontakt.io/hc/en-gb/articles/201492492-iBeacon-advertising-packet-structure
   https://en.wikipedia.org/wiki/IBeacon
 

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] spoonofpower opened a new pull request #188: newtmgr also moved to github

2017-05-26 Thread git
spoonofpower opened a new pull request #188: newtmgr also moved to github
URL: https://github.com/apache/incubator-mynewt-site/pull/188
 
 
   
 

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] simonratner opened a new pull request #295: Wrap RTT console buffer if full

2017-05-26 Thread git
simonratner opened a new pull request #295: Wrap RTT console buffer if full
URL: https://github.com/apache/incubator-mynewt-core/pull/295
 
 
   This ensures the RTT memory buffer always has the last 1kb of logs, as 
opposed to the first 1kb of logs. This is a lot more useful when dumping 
memory, for example. 
 

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] mkiiskila closed pull request #284: hw: mcu: pic32mz2048efg100: Rename ppc to pps

2017-05-30 Thread git
mkiiskila closed pull request #284: hw: mcu: pic32mz2048efg100: Rename ppc to 
pps
URL: https://github.com/apache/incubator-mynewt-core/pull/284
 
 
   
 

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] mkiiskila closed pull request #286: Wi-Fire: Add SPI support (master mode only)

2017-05-30 Thread git
mkiiskila closed pull request #286: Wi-Fire: Add SPI support (master mode only)
URL: https://github.com/apache/incubator-mynewt-core/pull/286
 
 
   
 

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 issue #55: MYNEWT-583; newt - allow use of specific tag/repository revision.

2017-05-30 Thread git
ccollins476ad commented on issue #55: MYNEWT-583; newt - allow use of specific 
tag/repository revision.
URL: 
https://github.com/apache/incubator-mynewt-newt/pull/55#issuecomment-305037486
 
 
   Thanks, Marko.  I don't think String() gets called automatically.  At least, 
it didn't when I tried it in the Go playground.  I did that test a while ago 
and no longer have the exact code I tested, though.
   
   
 

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] mkiiskila commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
mkiiskila commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119240061
 
 

 ##
 File path: sys/flash_map/src/flash_map.c
 ##
 @@ -131,6 +132,40 @@ flash_area_align(const struct flash_area *fa)
 return hal_flash_align(fa->fa_device_id);
 }
 
+int
+flash_area_is_empty(const struct flash_area *fa, bool *empty)
+{
+uint32_t data[64 >> 2];
+uint32_t data_off = 0;
+int8_t bytes_to_read;
+uint8_t i;
+int rc;
+
+while(data_off < fa->fa_size)
+{
 
 Review comment:
   Can you fix the coding style?
   See 
https://github.com/apache/incubator-mynewt-core/blob/master/CODING_STANDARDS.md
 

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] mkiiskila commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
mkiiskila commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119241026
 
 

 ##
 File path: sys/flash_map/src/flash_map.c
 ##
 @@ -131,6 +132,40 @@ flash_area_align(const struct flash_area *fa)
 return hal_flash_align(fa->fa_device_id);
 }
 
+int
+flash_area_is_empty(const struct flash_area *fa, bool *empty)
+{
+uint32_t data[64 >> 2];
+uint32_t data_off = 0;
+int8_t bytes_to_read;
+uint8_t i;
+int rc;
+
+while(data_off < fa->fa_size)
+{
+bytes_to_read = min(64, fa->fa_size - data_off);
+rc = flash_area_read(fa, data_off, data, bytes_to_read);
+if (rc) {
+return rc;
+}
+for (i = 0; i < bytes_to_read >> 2; i++){
+  if (data[i] != (uint32_t) -1) {
+goto not_empty;
+  }
+}
+for (i = i << 2; i < bytes_to_read; i++) {
+  if (*(((uint8_t *) data) + i) != (uint8_t) -1) {
+goto not_empty;
+  }
+}
 
 Review comment:
   I don't think this 2nd for loop is needed. I have not encountered a flash 
sector which would not be a multiple of minimally 4 bytes.
 

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] mkiiskila commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
mkiiskila commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119239939
 
 

 ##
 File path: sys/flash_map/src/flash_map.c
 ##
 @@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 
 Review comment:
   Do we need this inclusion?
 

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] mkiiskila commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
mkiiskila commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119239877
 
 

 ##
 File path: sys/flash_map/include/flash_map/flash_map.h
 ##
 @@ -41,6 +41,7 @@ extern "C" {
  * match the linker scripts when platform executes from flash,
  * and match the target offset specified in download script.
  */
+#include 
 
 Review comment:
   Do we need this inclusion?
 

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] mkiiskila commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
mkiiskila commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119239770
 
 

 ##
 File path: mgmt/imgmgr/src/imgmgr.c
 ##
 @@ -223,6 +228,70 @@ imgr_find_by_hash(uint8_t *find, struct image_version 
*ver)
 }
 
 static int
+imgr_erase(struct mgmt_cbuf *cb)
+{
+struct image_version ver;
+int area_id;
+int best = -1;
+int rc;
+int i;
+CborError g_err = CborNoError;
+
+for (i = 0; i < 2; i++) {
+rc = imgr_read_info(i, , NULL, NULL);
+if (rc < 0) {
+continue;
+}
+if (rc == 0) {
+/* Image in slot is ok. */
+if (imgmgr_state_slot_in_use(i)) {
+/* Slot is in use; can't erase to this. */
+continue;
+} else {
+/*
+ * Not active slot, but image is ok. Use it if there are
+ * no better candidates.
+ */
+best = i;
+}
+continue;
+}
+best = i;
+break;
+}
+if (best >= 0) {
+area_id = flash_area_id_from_image_slot(best);
+if (imgr_state.upload.fa) {
+flash_area_close(imgr_state.upload.fa);
+imgr_state.upload.fa = NULL;
+}
+rc = flash_area_open(area_id, _state.upload.fa);
+if (rc) {
+return MGMT_ERR_EINVAL;
+}
+rc = flash_area_erase(imgr_state.upload.fa, 0,
+  imgr_state.upload.fa->fa_size);
 
 Review comment:
   Could call flash_area_close() for completeness.
 

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 closed pull request #55: MYNEWT-583; newt - allow use of specific tag/repository revision.

2017-05-30 Thread git
ccollins476ad closed pull request #55: MYNEWT-583; newt - allow use of specific 
tag/repository revision.
URL: https://github.com/apache/incubator-mynewt-newt/pull/55
 
 
   
 

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 issue #55: MYNEWT-583; newt - allow use of specific tag/repository revision.

2017-05-30 Thread git
ccollins476ad commented on issue #55: MYNEWT-583; newt - allow use of specific 
tag/repository revision.
URL: 
https://github.com/apache/incubator-mynewt-newt/pull/55#issuecomment-305039698
 
 
   Just an FYI- here is a playground program which I think reproduces this 
case: https://play.golang.org/p/UP8i8vo1oZ
   
   ```
   package main
   
   import (
"fmt"
   )
   
   type S struct {
a int
   }
   
   func (s *S) String() string {
return fmt.Sprintf("%d", s.a)
   }
   
   func main() {
s := S{5}
fmt.Printf("s=%s\n", s)
   }
   ```
   
   Output:
   ```
   s={%!s(int=5)}
   
   Program exited.
   ```
   
   Maybe there is something different in this example?
 

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] PierreKircher opened a new pull request #194: slack logo in footer

2017-05-30 Thread git
PierreKircher opened a new pull request #194: slack logo in footer
URL: https://github.com/apache/incubator-mynewt-site/pull/194
 
 
   title says it all 
   
   why ? to get more people to engagne in the amazing community around mynewt
   
   icon/logo is debateable c on it 
   
   thanks
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
jacobrosenthal commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119244347
 
 

 ##
 File path: sys/flash_map/src/flash_map.c
 ##
 @@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 
 Review comment:
   yes for min, though that could be duplicated so os isnt needed, or put 
somewhere else
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
jacobrosenthal commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119244439
 
 

 ##
 File path: sys/flash_map/include/flash_map/flash_map.h
 ##
 @@ -41,6 +41,7 @@ extern "C" {
  * match the linker scripts when platform executes from flash,
  * and match the target offset specified in download script.
  */
+#include 
 
 Review comment:
   Yes for bool
 

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 #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
ccollins476ad commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119246418
 
 

 ##
 File path: sys/flash_map/include/flash_map/flash_map.h
 ##
 @@ -41,6 +41,7 @@ extern "C" {
  * match the linker scripts when platform executes from flash,
  * and match the target offset specified in download script.
  */
+#include 
 
 Review comment:
   For bool, you should include 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
jacobrosenthal commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119246721
 
 

 ##
 File path: sys/flash_map/include/flash_map/flash_map.h
 ##
 @@ -41,6 +41,7 @@ extern "C" {
  * match the linker scripts when platform executes from flash,
  * and match the target offset specified in download script.
  */
+#include 
 
 Review comment:
   Ah yes. Roger
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal commented on issue #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
jacobrosenthal commented on issue #281: imgmgr: add erase command, remove erase 
from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#issuecomment-305046664
 
 
   BTW hold on this until I get this last discussion finished on why nrf51 
radio doesnt appear to come back up cleanly and advertise after a flash_erase 
disconnect. 
   
   Its interesting though if I break and step a bit it does come back, so it 
seems like a timing issue?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jacobrosenthal commented on a change in pull request #281: imgmgr: add erase command, remove erase from upload command

2017-05-30 Thread git
jacobrosenthal commented on a change in pull request #281: imgmgr: add erase 
command, remove erase from upload command
URL: 
https://github.com/apache/incubator-mynewt-core/pull/281#discussion_r119246771
 
 

 ##
 File path: mgmt/imgmgr/src/imgmgr.c
 ##
 @@ -223,6 +228,70 @@ imgr_find_by_hash(uint8_t *find, struct image_version 
*ver)
 }
 
 static int
+imgr_erase(struct mgmt_cbuf *cb)
+{
+struct image_version ver;
+int area_id;
+int best = -1;
+int rc;
+int i;
+CborError g_err = CborNoError;
+
+for (i = 0; i < 2; i++) {
+rc = imgr_read_info(i, , NULL, NULL);
+if (rc < 0) {
+continue;
+}
+if (rc == 0) {
+/* Image in slot is ok. */
+if (imgmgr_state_slot_in_use(i)) {
+/* Slot is in use; can't erase to this. */
+continue;
+} else {
+/*
+ * Not active slot, but image is ok. Use it if there are
+ * no better candidates.
+ */
+best = i;
+}
+continue;
+}
+best = i;
+break;
+}
+if (best >= 0) {
+area_id = flash_area_id_from_image_slot(best);
+if (imgr_state.upload.fa) {
+flash_area_close(imgr_state.upload.fa);
+imgr_state.upload.fa = NULL;
+}
+rc = flash_area_open(area_id, _state.upload.fa);
+if (rc) {
+return MGMT_ERR_EINVAL;
+}
+rc = flash_area_erase(imgr_state.upload.fa, 0,
+  imgr_state.upload.fa->fa_size);
 
 Review comment:
   Done
 

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] mkiiskila closed pull request #295: Wrap RTT console buffer if full

2017-05-30 Thread git
mkiiskila closed pull request #295: Wrap RTT console buffer if full
URL: https://github.com/apache/incubator-mynewt-core/pull/295
 
 
   
 

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] mkiiskila closed pull request #289: Shell fixes from review #256

2017-05-30 Thread git
mkiiskila closed pull request #289: Shell fixes from review #256
URL: https://github.com/apache/incubator-mynewt-core/pull/289
 
 
   
 

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] PierreKircher opened a new pull request #193: Slack logo + link in footer

2017-05-30 Thread git
PierreKircher opened a new pull request #193: Slack logo + link in footer
URL: https://github.com/apache/incubator-mynewt-site/pull/193
 
 
   title says it all .. icon is debateable.
   
   why? to get more people to join the community and engage in a healthy 
conversation.
   
   like to hear comments/critics
 

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] PierreKircher closed pull request #193: Slack logo + link in footer

2017-05-30 Thread git
PierreKircher closed pull request #193: Slack logo + link in footer
URL: https://github.com/apache/incubator-mynewt-site/pull/193
 
 
   
 

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] mkiiskila commented on issue #288: MYNEWT-742 Initialize OIC automatically.

2017-05-30 Thread git
mkiiskila commented on issue #288: MYNEWT-742 Initialize OIC automatically.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/288#issuecomment-305041180
 
 
   I would hold off from this change for now.
   
   The reason is that this would break the existing platforms where OIC runs 
over IP. When OIC initializes, it joins multicast groups on all existing 
interfaces. If interfaces come up later, they will not be enabled.
   What we should have before this commit is merged is a way for net/oic to 
notice that interface state has changed (or periodically poll for new 
interfaces). At the moment we don't have this facility.
 

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] aditihilbert closed pull request #188: newtmgr also moved to github

2017-05-30 Thread git
aditihilbert closed pull request #188: newtmgr also moved to github
URL: https://github.com/apache/incubator-mynewt-site/pull/188
 
 
   
 

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 issue #55: MYNEWT-583; newt - allow use of specific tag/repository revision.

2017-05-31 Thread git
ccollins476ad commented on issue #55: MYNEWT-583; newt - allow use of specific 
tag/repository revision.
URL: 
https://github.com/apache/incubator-mynewt-newt/pull/55#issuecomment-305100811
 
 
   Btw, I figured out why my playground example wasn't working.  The String() 
function operated on a `*S`, but I was passing a plain `S` to Printf.  I 
updated the example code and now it does work 
(https://play.golang.org/p/4kMNJ8NdEB):
   
   ```
   package main
   
   import (
"fmt"
   )
   
   type S struct {
a int
   }
   
   func (s *S) String() string {
return fmt.Sprintf("%d", s.a)
   }
   
   func main() {
s := {5}
fmt.Printf("s=%s\n", s)
   }
   ```
   
   ```
   s=5
   
   Program exited.
   ```
 

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

2017-05-31 Thread git
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_r119288035
 
 

 ##
 File path: net/nimble/host/src/ble_store.c
 ##
 @@ -28,49 +28,98 @@ ble_store_read(int obj_type, const union ble_store_key 
*key,
 {
 int rc;
 
+ble_hs_lock();
+
 if (ble_hs_cfg.store_read_cb == NULL) {
 rc = BLE_HS_ENOTSUP;
 } else {
 rc = ble_hs_cfg.store_read_cb(obj_type, key, val);
 }
 
+ble_hs_unlock();
+
 return rc;
 }
 
 int
 ble_store_write(int obj_type, const union ble_store_value *val)
 {
+struct ble_store_status_event event;
 int rc;
 
 if (ble_hs_cfg.store_write_cb == NULL) {
-rc = BLE_HS_ENOTSUP;
-} else {
-rc = ble_hs_cfg.store_write_cb(obj_type, val);
+return BLE_HS_ENOTSUP;
 }
 
-return rc;
+while (1) {
+ble_hs_lock();
+rc = ble_hs_cfg.store_write_cb(obj_type, val);
+ble_hs_unlock();
+
+switch (rc) {
+case 0:
+return 0;
+case BLE_HS_ESTORE_CAP:
+/* Record didn't fit.  Give the application the opportunity to free
+ * up some space.
+ */
+event.obj_type = obj_type;
+event.event_code = BLE_STORE_EVENT_OVERFLOW;
+event.value = val;
+rc = ble_store_status();
+if (rc != 0) {
+return rc;
+}
+
+/* Application made room for the record; try again. */
+break;
+
+default:
+return rc;
+}
+}
 }
 
 int
 ble_store_delete(int obj_type, const union ble_store_key *key)
 {
 int rc;
 
+ble_hs_lock();
 
 Review comment:
   same as above
 

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 issue #255: BLE Host - Fix peer OTA addr and type on pairing.

2017-05-31 Thread git
rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on 
pairing.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/255#issuecomment-305096812
 
 
   For me it looks good. 
 

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 closed pull request #255: BLE Host - Fix peer OTA addr and type on pairing.

2017-05-31 Thread git
rymanluk closed pull request #255: BLE Host - Fix peer OTA addr and type on 
pairing.
URL: https://github.com/apache/incubator-mynewt-core/pull/255
 
 
   
 

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 issue #255: BLE Host - Fix peer OTA addr and type on pairing.

2017-05-31 Thread git
rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on 
pairing.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/255#issuecomment-305115006
 
 
   Talked to sjanc and he don't have objections - merging.
 

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

2017-05-31 Thread git
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_r119286680
 
 

 ##
 File path: net/nimble/host/src/ble_sm.c
 ##
 @@ -1610,6 +1693,7 @@ ble_sm_pair_rsp_rx(uint16_t conn_handle, struct os_mbuf 
**om,
 struct ble_sm_pair_cmd *rsp;
 struct ble_sm_proc *proc;
 uint8_t ioact;
+int rc;
 
 Review comment:
   This seems to be not related to this patch
 

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

2017-05-31 Thread git
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_r119285543
 
 

 ##
 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:
   since for BLE_STORE_EVENT_OVERFLOW_NEXT we specify conn_handle because it is 
used during pairing,  why not to name type BLE_STORE_EVENT_OVERFLOW_BONDING or 
similar? That would make clear for application what is going wrong and what to 
do i.e. remove old bonded devices.
 

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

2017-05-31 Thread git
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_r119286487
 
 

 ##
 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)
 
 Review comment:
   maybe instead of is_our_sec we could provide obj_type? 
   
   But actually maybe it would be better to create helper 
ble_store_overflow_event(obj_type, event_code, void *event_data) and keep this 
function to basically check if there is a sufficient place.
   
   I see that helper could be used at least in three places in this code.
   
   
   
   
   
 

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

2017-05-31 Thread git
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_r119287662
 
 

 ##
 File path: net/nimble/host/src/ble_store.c
 ##
 @@ -28,49 +28,98 @@ ble_store_read(int obj_type, const union ble_store_key 
*key,
 {
 int rc;
 
+ble_hs_lock();
 
 Review comment:
   Is this related to this patch? BTW why we need it in ble_store?
 

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

2017-05-31 Thread git
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_r119285625
 
 

 ##
 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();
 
 Review comment:
   count is not initialized
 

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] aditihilbert closed pull request #194: slack logo in footer

2017-05-31 Thread git
aditihilbert closed pull request #194: slack logo in footer
URL: https://github.com/apache/incubator-mynewt-site/pull/194
 
 
   
 

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] aditihilbert commented on issue #194: slack logo in footer

2017-05-31 Thread git
aditihilbert commented on issue #194: slack logo in footer
URL: 
https://github.com/apache/incubator-mynewt-site/pull/194#issuecomment-305171005
 
 
   Thanks - This is cool!
 

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] mkiiskila opened a new pull request #302: Oic update

2017-06-01 Thread git
mkiiskila opened a new pull request #302: Oic update
URL: https://github.com/apache/incubator-mynewt-core/pull/302
 
 
   Mostly moving header files which are depended from outside net/oic to be 
under include/oic.
   Also minor bug fixes to BLE adapter and a dup-free of an mbuf in certain 
memory shortage situation.
 

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 closed pull request #301: oic - Fix for missing 128-bit iotivity svc.

2017-06-01 Thread git
ccollins476ad closed pull request #301: oic - Fix for missing 128-bit iotivity 
svc.
URL: https://github.com/apache/incubator-mynewt-core/pull/301
 
 
   
 

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] PierreKircher opened a new pull request #195: community slack link

2017-05-31 Thread git
PierreKircher opened a new pull request #195: community slack link
URL: https://github.com/apache/incubator-mynewt-site/pull/195
 
 
   community slack link . req by sterling
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ccollins476ad opened a new pull request #300: Re-add 128-bit iotivity service UUID.

2017-05-31 Thread git
ccollins476ad opened a new pull request #300: Re-add 128-bit iotivity service 
UUID.
URL: https://github.com/apache/incubator-mynewt-core/pull/300
 
 
   Earlier, we started using a 16-bit UUID (0x9923) instead of the 128-bit
   UUID for this service.  The 128-bit UUID was actually the iotivity
   service UUID which we want to support.  This commit adds the 128-bit
   UUID back.
 

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] aditihilbert closed pull request #185: MYNEWT-761 Update 1.1 doc for newtmgr taskstats/mpstats commands.

2017-06-02 Thread git
aditihilbert closed pull request #185: MYNEWT-761 Update 1.1 doc for  newtmgr 
taskstats/mpstats commands.
URL: https://github.com/apache/incubator-mynewt-site/pull/185
 
 
   
 

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] aditihilbert closed pull request #191: MYNEWT-763 1.1 Doc for newt target amend command.

2017-06-02 Thread git
aditihilbert closed pull request #191: MYNEWT-763 1.1 Doc for newt target amend 
command.
URL: https://github.com/apache/incubator-mynewt-site/pull/191
 
 
   
 

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] PierreKircher commented on issue #192: gdb in vscode

2017-06-02 Thread git
PierreKircher commented on issue #192: gdb in vscode
URL: 
https://github.com/apache/incubator-mynewt-site/pull/192#issuecomment-305822107
 
 
   oki . thanks aditi .. gona close that one and use the dev branch -
 

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] PierreKircher opened a new pull request #196: Develop

2017-06-02 Thread git
PierreKircher opened a new pull request #196: Develop
URL: https://github.com/apache/incubator-mynewt-site/pull/196
 
 
   
 

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] PierreKircher closed pull request #196: Develop

2017-06-02 Thread git
PierreKircher closed pull request #196: Develop
URL: https://github.com/apache/incubator-mynewt-site/pull/196
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ccollins476ad opened a new pull request #301: oic - Fix for missing 128-bit iotivity svc.

2017-06-01 Thread git
ccollins476ad opened a new pull request #301: oic - Fix for missing 128-bit 
iotivity svc.
URL: https://github.com/apache/incubator-mynewt-core/pull/301
 
 
   Due to a typo in the BLE service definition array, the 16-bit Runtime
   UUID was overwriting the 128-bit iotivity UUID.
   
   Also, the Runtime characteristics were overwriting the iotivity value
   handle variables.  This caused notifications to be sent for the wrong
   characteristic.
 

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] aditihilbert commented on issue #192: gdb in vscode

2017-06-02 Thread git
aditihilbert commented on issue #192: gdb in vscode
URL: 
https://github.com/apache/incubator-mynewt-site/pull/192#issuecomment-305807548
 
 
   Hi Pierre, could you please re-submit this PR against develop instead of 
master? The way the site is structured, the technical Documentation section 
(including the faqs) go into the "develop" branch which represents the latest 
version. PRs that deal with website changes other than the "Documentation" 
section are done against "master". 
 

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] aditihilbert commented on issue #192: gdb in vscode

2017-06-02 Thread git
aditihilbert commented on issue #192: gdb in vscode
URL: 
https://github.com/apache/incubator-mynewt-site/pull/192#issuecomment-305807548
 
 
   Hi Pierre, could you please re-submit this PR against develop instead of 
master? The way the site is structured, the technical Documentation section 
(including the faqs) go into the "develop" branch which represents the latest 
version. PRs that deal with website changes other than the "Documentation" 
section are done against "master". 
 

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] aditihilbert closed pull request #190: MYNEWT-764 Document 1.1 newt run command behavior when version is not provided

2017-06-02 Thread git
aditihilbert closed pull request #190: MYNEWT-764 Document 1.1 newt run command 
behavior when version is not provided
URL: https://github.com/apache/incubator-mynewt-site/pull/190
 
 
   
 

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] aditihilbert closed pull request #195: community slack link

2017-06-02 Thread git
aditihilbert closed pull request #195: community slack link
URL: https://github.com/apache/incubator-mynewt-site/pull/195
 
 
   
 

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] cwanda opened a new pull request #197: Fix broken link to task_lesson.png

2017-06-04 Thread git
cwanda opened a new pull request #197: Fix broken link to task_lesson.png
URL: https://github.com/apache/incubator-mynewt-site/pull/197
 
 
   changed link from task_lesson1.png to task_lesson.png.  Please merged this 
into 1.0 and latest doc.
 

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] francois-berder opened a new pull request #305: Wi-Fire: Implement watchdog

2017-06-05 Thread git
francois-berder opened a new pull request #305: Wi-Fire: Implement watchdog
URL: https://github.com/apache/incubator-mynewt-core/pull/305
 
 
   
 

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] aditihilbert closed pull request #197: Fix broken link to task_lesson.png

2017-06-05 Thread git
aditihilbert closed pull request #197: Fix broken link to task_lesson.png
URL: https://github.com/apache/incubator-mynewt-site/pull/197
 
 
   
 

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 closed pull request #304: make uart1 on rb-blend2 bitbanged

2017-06-05 Thread git
wes3 closed pull request #304: make uart1 on rb-blend2 bitbanged
URL: https://github.com/apache/incubator-mynewt-core/pull/304
 
 
   
 

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] mkiiskila closed pull request #303: hw: mcu: pic32mz2048efg100: Implement hal_system_reset

2017-06-05 Thread git
mkiiskila closed pull request #303: hw: mcu: pic32mz2048efg100: Implement 
hal_system_reset
URL: https://github.com/apache/incubator-mynewt-core/pull/303
 
 
   
 

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] mkiiskila closed pull request #305: Wi-Fire: Implement watchdog

2017-06-05 Thread git
mkiiskila closed pull request #305: Wi-Fire: Implement watchdog
URL: https://github.com/apache/incubator-mynewt-core/pull/305
 
 
   
 

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] mkiiskila commented on issue #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.

2017-06-07 Thread git
mkiiskila commented on issue #314: MYNEWT_689: Make CONSOLE_UART a syscfg 
variable.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/314#issuecomment-306824665
 
 
   Is there going to be another PR against BSPs in arduino zero repo 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] wes3 commented on issue #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.

2017-06-07 Thread git
wes3 commented on issue #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/314#issuecomment-306847932
 
 
   Yes, there will be PRs for the other repos. Thanks for reminding me.
 

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 #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.

2017-06-06 Thread git
wes3 opened a new pull request #314: MYNEWT_689: Make CONSOLE_UART a syscfg 
variable.
URL: https://github.com/apache/incubator-mynewt-core/pull/314
 
 
   Removed CONSOLE_UART from bsp.h and made it a syscfg variable.
   The variable is called CONSOLE_UART_DEV and is defined in the
   sys/console directories. This can be overridden by the bsp, app,
   or target. Some bsps used different settings for the console uart
   and those bsps override the default uart (which is uart0).
 

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 commented on a change in pull request #258: MYNEWT-744 SensorAPI: improvements

2017-06-07 Thread git
vrahane commented on a change in pull request #258: MYNEWT-744 SensorAPI: 
improvements
URL: 
https://github.com/apache/incubator-mynewt-core/pull/258#discussion_r120715999
 
 

 ##
 File path: apps/sensors_test/src/main.c
 ##
 @@ -182,6 +189,7 @@ sensor_oic_advertise(void)
 return;
 }
 
+#if 0
 
 Review comment:
   Removed, thanks for pointing it out. 
 

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 closed pull request #258: MYNEWT-744 SensorAPI: improvements

2017-06-07 Thread git
vrahane closed pull request #258: MYNEWT-744 SensorAPI: improvements
URL: https://github.com/apache/incubator-mynewt-core/pull/258
 
 
   
 

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] mkiiskila commented on a change in pull request #258: MYNEWT-744 SensorAPI: improvements

2017-06-07 Thread git
mkiiskila commented on a change in pull request #258: MYNEWT-744 SensorAPI: 
improvements
URL: 
https://github.com/apache/incubator-mynewt-core/pull/258#discussion_r120697146
 
 

 ##
 File path: apps/sensors_test/src/main.c
 ##
 @@ -182,6 +189,7 @@ sensor_oic_advertise(void)
 return;
 }
 
+#if 0
 
 Review comment:
   If it's #if 0, maybe you should consider removing the code block altogether?
 

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 commented on a change in pull request #258: MYNEWT-744 SensorAPI: improvements

2017-06-07 Thread git
vrahane commented on a change in pull request #258: MYNEWT-744 SensorAPI: 
improvements
URL: 
https://github.com/apache/incubator-mynewt-core/pull/258#discussion_r120711292
 
 

 ##
 File path: hw/bsp/ruuvi_tag_revb2/src/hal_bsp.c
 ##
 @@ -187,71 +164,62 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 return cfg_pri;
 }
 
-#if MYNEWT_VAL(LSM303DLHC_PRESENT) || MYNEWT_VAL(BNO055_PRESENT)
+/**
+ * BME280 Sensor default configuration used by the creator package
+ *
+ * @return 0 on success, non-zero on failure
+ */
+#if MYNEWT_VAL(BME280_ONB)
 static int
-accel_init(struct os_dev *dev, void *arg)
+config_bme280_sensor(void)
 {
-   return (0);
-}
-#endif
+int rc;
+struct os_dev *dev;
+struct bme280_cfg bmecfg;
 
-#if MYNEWT_VAL(TSL2561_PRESENT)
-static int
-slinky_light_init(struct os_dev *dev, void *arg)
-{
-return (0);
-}
-#endif
+dev = (struct os_dev *) os_dev_open("bme280_0", OS_TIMEOUT_NEVER, NULL);
+assert(dev != NULL);
 
-#if MYNEWT_VAL(TCS34725_PRESENT)
-static int
-color_init(struct os_dev *dev, void *arg)
-{
-return (0);
-}
-#endif
+if (!(dev->od_flags & OS_DEV_F_STATUS_READY)) {
+rc = SYS_EINVAL;
+goto err;
+}
 
-#if MYNEWT_VAL(BME280_PRESENT)
-static int
-press_init(struct os_dev *dev, void *arg)
-{
-return (0);
+memset(, 0, sizeof(bmecfg));
+
+bmecfg.bc_mode = BME280_MODE_NORMAL;
+bmecfg.bc_iir = BME280_FILTER_X16;
+bmecfg.bc_sby_dur = BME280_STANDBY_MS_0_5;
+bmecfg.bc_boc[0].boc_type = SENSOR_TYPE_RELATIVE_HUMIDITY;
+bmecfg.bc_boc[1].boc_type = SENSOR_TYPE_PRESSURE;
+bmecfg.bc_boc[2].boc_type = SENSOR_TYPE_AMBIENT_TEMPERATURE;
+bmecfg.bc_boc[0].boc_oversample = BME280_SAMPLING_X1;
+bmecfg.bc_boc[1].boc_oversample = BME280_SAMPLING_X16;
+bmecfg.bc_boc[2].boc_oversample = BME280_SAMPLING_X2;
+bmecfg.bc_s_mask = SENSOR_TYPE_AMBIENT_TEMPERATURE|
+   SENSOR_TYPE_PRESSURE|
+   SENSOR_TYPE_RELATIVE_HUMIDITY;
+
+rc = bme280_config((struct bme280 *)dev, );
+
+err:
+os_dev_close(dev);
+return rc;
 }
 #endif
 
 static void
 sensor_dev_create(void)
 {
 int rc;
-
 (void)rc;
-#if MYNEWT_VAL(LSM303DLHC_PRESENT)
-rc = os_dev_create((struct os_dev *) , "accel0",
-  OS_DEV_INIT_PRIMARY, 0, accel_init, NULL);
-assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(BNO055_PRESENT)
-rc = os_dev_create((struct os_dev *) , "accel1",
-  OS_DEV_INIT_PRIMARY, 0, accel_init, NULL);
-assert(rc == 0);
-#endif
 
-#if MYNEWT_VAL(TSL2561_PRESENT)
-rc = os_dev_create((struct os_dev *) , "light0",
-  OS_DEV_INIT_PRIMARY, 0, light_init, NULL);
-assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(TCS34725_PRESENT)
-rc = os_dev_create((struct os_dev *) , "color0",
-  OS_DEV_INIT_PRIMARY, 0, color_init, NULL);
+#if MYNEWT_VAL(BME280_ONB)
+rc = os_dev_create((struct os_dev *) , "bme280",
+  OS_DEV_INIT_PRIMARY, 0, bme280_init, (void *)_0_itf_bme);
 assert(rc == 0);
-#endif
 
-#if MYNEWT_VAL(BME280_PRESENT)
-rc = os_dev_create((struct os_dev *) , "bme280",
-  OS_DEV_INIT_PRIMARY, 0, press_init, NULL);
+rc = config_bme280_sensor();
 
 Review comment:
   The consensus was, there would be an initial config that happens at the bsp 
level. The user of the sensor can then go and re-config the sensor in the app 
if needed.
 
----
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] mkiiskila commented on a change in pull request #258: MYNEWT-744 SensorAPI: improvements

2017-06-07 Thread git
mkiiskila commented on a change in pull request #258: MYNEWT-744 SensorAPI: 
improvements
URL: 
https://github.com/apache/incubator-mynewt-core/pull/258#discussion_r120697958
 
 

 ##
 File path: hw/bsp/ruuvi_tag_revb2/src/hal_bsp.c
 ##
 @@ -187,71 +164,62 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 return cfg_pri;
 }
 
-#if MYNEWT_VAL(LSM303DLHC_PRESENT) || MYNEWT_VAL(BNO055_PRESENT)
+/**
+ * BME280 Sensor default configuration used by the creator package
+ *
+ * @return 0 on success, non-zero on failure
+ */
+#if MYNEWT_VAL(BME280_ONB)
 static int
-accel_init(struct os_dev *dev, void *arg)
+config_bme280_sensor(void)
 {
-   return (0);
-}
-#endif
+int rc;
+struct os_dev *dev;
+struct bme280_cfg bmecfg;
 
-#if MYNEWT_VAL(TSL2561_PRESENT)
-static int
-slinky_light_init(struct os_dev *dev, void *arg)
-{
-return (0);
-}
-#endif
+dev = (struct os_dev *) os_dev_open("bme280_0", OS_TIMEOUT_NEVER, NULL);
+assert(dev != NULL);
 
-#if MYNEWT_VAL(TCS34725_PRESENT)
-static int
-color_init(struct os_dev *dev, void *arg)
-{
-return (0);
-}
-#endif
+if (!(dev->od_flags & OS_DEV_F_STATUS_READY)) {
+rc = SYS_EINVAL;
+goto err;
+}
 
-#if MYNEWT_VAL(BME280_PRESENT)
-static int
-press_init(struct os_dev *dev, void *arg)
-{
-return (0);
+memset(, 0, sizeof(bmecfg));
+
+bmecfg.bc_mode = BME280_MODE_NORMAL;
+bmecfg.bc_iir = BME280_FILTER_X16;
+bmecfg.bc_sby_dur = BME280_STANDBY_MS_0_5;
+bmecfg.bc_boc[0].boc_type = SENSOR_TYPE_RELATIVE_HUMIDITY;
+bmecfg.bc_boc[1].boc_type = SENSOR_TYPE_PRESSURE;
+bmecfg.bc_boc[2].boc_type = SENSOR_TYPE_AMBIENT_TEMPERATURE;
+bmecfg.bc_boc[0].boc_oversample = BME280_SAMPLING_X1;
+bmecfg.bc_boc[1].boc_oversample = BME280_SAMPLING_X16;
+bmecfg.bc_boc[2].boc_oversample = BME280_SAMPLING_X2;
+bmecfg.bc_s_mask = SENSOR_TYPE_AMBIENT_TEMPERATURE|
+   SENSOR_TYPE_PRESSURE|
+   SENSOR_TYPE_RELATIVE_HUMIDITY;
+
+rc = bme280_config((struct bme280 *)dev, );
+
+err:
+os_dev_close(dev);
+return rc;
 }
 #endif
 
 static void
 sensor_dev_create(void)
 {
 int rc;
-
 (void)rc;
-#if MYNEWT_VAL(LSM303DLHC_PRESENT)
-rc = os_dev_create((struct os_dev *) , "accel0",
-  OS_DEV_INIT_PRIMARY, 0, accel_init, NULL);
-assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(BNO055_PRESENT)
-rc = os_dev_create((struct os_dev *) , "accel1",
-  OS_DEV_INIT_PRIMARY, 0, accel_init, NULL);
-assert(rc == 0);
-#endif
 
-#if MYNEWT_VAL(TSL2561_PRESENT)
-rc = os_dev_create((struct os_dev *) , "light0",
-  OS_DEV_INIT_PRIMARY, 0, light_init, NULL);
-assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(TCS34725_PRESENT)
-rc = os_dev_create((struct os_dev *) , "color0",
-  OS_DEV_INIT_PRIMARY, 0, color_init, NULL);
+#if MYNEWT_VAL(BME280_ONB)
+rc = os_dev_create((struct os_dev *) , "bme280",
+  OS_DEV_INIT_PRIMARY, 0, bme280_init, (void *)_0_itf_bme);
 assert(rc == 0);
-#endif
 
-#if MYNEWT_VAL(BME280_PRESENT)
-rc = os_dev_create((struct os_dev *) , "bme280",
-  OS_DEV_INIT_PRIMARY, 0, press_init, NULL);
+rc = config_bme280_sensor();
 
 Review comment:
   Sensor config is not done by the user of the sensor?
 
----
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] mkiiskila commented on a change in pull request #306: Nosig armv7

2017-06-07 Thread git
mkiiskila commented on a change in pull request #306: Nosig armv7
URL: 
https://github.com/apache/incubator-mynewt-core/pull/306#discussion_r120698693
 
 

 ##
 File path: hw/bsp/native-armv7/include/bsp/bsp.h
 ##
 @@ -16,24 +16,32 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#include 
-#include 
-#include 
-
-#include "os/os.h"
-#include "os_priv.h"
-
-void
-__assert_func(const char *file, int line, const char *func, const char *e)
-{
-char msg[256];
-
-if (file) {
-snprintf(msg, sizeof(msg), "assert at %s:%d\n", file, line);
-} else {
-snprintf(msg, sizeof(msg), "assert @ %p\n",
- __builtin_return_address(0));
-}
-write(1, msg, strlen(msg));
-_exit(1);
+
+#ifndef __NATIVE_ARMV7_BSP_H
+#define __NATIVE_ARMV7_BSP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define special stackos sections */
+#define sec_data_core
+#define sec_bss_core
+#define sec_bss_nz_core
+
+/* More convenient section placement macros. */
+#define bssnz_t
+
+/* LED pins */
+#define LED_BLINK_PIN   (0x1)
+
+/* UART info */
+#define CONSOLE_UART   "uart0"
 
 Review comment:
   Dont' forget to remove this line, and the other one in native-mips bsp when 
pull request #314 gets merged.
 
--------
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 closed pull request #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.

2017-06-07 Thread git
wes3 closed pull request #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.
URL: https://github.com/apache/incubator-mynewt-core/pull/314
 
 
   
 

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] cwanda commented on issue #65: MYNEWT-649 Validate target variable target set command.

2017-06-07 Thread git
cwanda commented on issue #65: MYNEWT-649 Validate target variable target set 
command.
URL: 
https://github.com/apache/incubator-mynewt-newt/pull/65#issuecomment-306903446
 
 
   Hi Chris,
   Good catch. I added the space.  Thanks  for your reviews of all the newt prs.
   
 

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] jonathanpallant opened a new pull request #315: BSP for STM32F7-Discovery board

2017-06-07 Thread git
jonathanpallant opened a new pull request #315: BSP for STM32F7-Discovery board
URL: https://github.com/apache/incubator-mynewt-core/pull/315
 
 
   See http://www.st.com/en/evaluation-tools/32f746gdiscovery.html
   
   LED blink and serial console (using VCP) tested OK.
 

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] d3zd3z opened a new pull request #66: image: Add support for RSA-PSS signatures

2017-06-07 Thread git
d3zd3z opened a new pull request #66: image: Add support for RSA-PSS signatures
URL: https://github.com/apache/incubator-mynewt-newt/pull/66
 
 
   Currently, RSA signatures are done with PKCS#1 v1.5.  Newer versions of
   this standard (starting with 2.1) define a newer signing algorithm, PSS,
   and enourage adoption of this algorithm over the older method.
   
   Add support for this to the 'newt' tool so that create-image can sign
   RSA with PSS.  Since the keys are the same, add a command line argument
   `--rsa-pss` to use the new algorithm.  Once this is adopted more fully
   by the bootloader this could be made the default.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ccollins476ad opened a new pull request #317: mn_socket: Unix domain socket support.

2017-06-07 Thread git
ccollins476ad opened a new pull request #317: mn_socket: Unix domain socket 
support.
URL: https://github.com/apache/incubator-mynewt-core/pull/317
 
 
   This adds unix domain socket support to the mn_socket / native_sockets 
packages.  This is needed for blehostd.
 

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 #318: MYNEWT-681 remove flash write protection in download scripts

2017-06-07 Thread git
vrahane opened a new pull request #318: MYNEWT-681 remove flash write 
protection in download scripts 
URL: https://github.com/apache/incubator-mynewt-core/pull/318
 
 
   - removing write protection in download script by setting the write
 protection bits in the BPROT config registers. Also, setting the
 DISABLEINDEBUG register.
 

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 #315: BSP for STM32F7-Discovery board

2017-06-07 Thread git
utzig closed pull request #315: BSP for STM32F7-Discovery board
URL: https://github.com/apache/incubator-mynewt-core/pull/315
 
 
   
 

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 #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.

2017-06-07 Thread git
utzig commented on issue #314: MYNEWT_689: Make CONSOLE_UART a syscfg variable.
URL: 
https://github.com/apache/incubator-mynewt-core/pull/314#issuecomment-306773774
 
 
   I just merged `stm32f7discovery` which will probably require those changes 
applied too.
 

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] francois-berder opened a new pull request #316: hw: mcu: pic32mz2048efg100: Implement hal_reset_cause

2017-06-07 Thread git
francois-berder opened a new pull request #316: hw: mcu: pic32mz2048efg100: 
Implement hal_reset_cause
URL: https://github.com/apache/incubator-mynewt-core/pull/316
 
 
   Tested on a Wi-Fire board the following resets: POR, Watchdog, EXTR (MCLR 
pin) and soft reset caused by hal_system_reset. I did not manage to cause a BOR 
reset.
   
   Signed-off-by: Francois Berder <fber...@outlook.fr>
 

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


  1   2   3   >