[GitHub] [mynewt-nimble] prasad-alatkar commented on issue #551: Not able to resolve RPA public address
prasad-alatkar commented on issue #551: URL: https://github.com/apache/mynewt-nimble/issues/551#issuecomment-635146166 Hi @marcogmaia AFAIK, If you are using 'NimBLE controller' then there should not be any issue with resolving RPA. We have ported only "NimBLE Host" on ESP32 where we were facing issues with RPA so we have tried our hands with `Host based RPA`, repo: https://github.com/espressif/esp-nimble This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] andrzej-kaczmarek opened a new pull request #2297: hw/mcu/dialog: Add callbacks on enter/exit sleep
andrzej-kaczmarek opened a new pull request #2297: URL: https://github.com/apache/mynewt-core/pull/2297 This patch adds callbacks to be called before and after deep sleep. Those are intended to be registered by BSP which can then decide to save/restore state of certain peripherals and release/acquire power domains in order to save some power while M33 goes into deep sleep. Note that similar power saving can usually be achieved if application uses os_dev_open/close consistently, i.e. opens device only when needed, which should properly acquire and release power domains (although the actual behavior depends on a driver implementation). However, there may still be some cases where quick save/restore is possible and this can be handled in new callbacks. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-mcumgr] lgl88911 commented on pull request #81: cmd/os_mgmt/port/zephyr: zephyr port os enhancement
lgl88911 commented on pull request #81: URL: https://github.com/apache/mynewt-mcumgr/pull/81#issuecomment-635394966 > Got informed that documentation is here: https://docs.zephyrproject.org/latest/guides/modules.html#changes-to-existing-modules so I am hiding my previous comment that describes the process. Thank you for your guidance, I am not sure if this is correct, please help check this pr https://github.com/zephyrproject-rtos/zephyr/pull/25711 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2297: hw/mcu/dialog: Add callbacks on enter/exit sleep
apache-mynewt-bot commented on pull request #2297: URL: https://github.com/apache/mynewt-core/pull/2297#issuecomment-635424526 ## Style check summary No suggestions at this time! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-newtmgr] ccollins476ad commented on a change in pull request #162: Optimize DFU
ccollins476ad commented on a change in pull request #162: URL: https://github.com/apache/mynewt-newtmgr/pull/162#discussion_r432001181 ## File path: nmxact/xact/image.go ## @@ -185,33 +209,189 @@ func nextImageUploadReq(s sesn.Sesn, upgrade bool, data []byte, off int, imageNu return r, nil } +func (t *ImageUploadIntTracker) UpdateTracker(off int, status int) { + if status == IMAGE_UPLOAD_STATUS_MISSED { + /* Upon error, set the value to missed for retransmission */ + t.RspMap[off] = IMAGE_UPLOAD_CHUNK_MISSED_WM + } else if status == IMAGE_UPLOAD_STATUS_EXPECTED { + /* When the chunk at a certain offset is transmitted, + a response requesting the next offset is expected. This + indicates that the chunk is successfully trasmitted. Wait + on the chunk in response e.g when offset 0, len 100 is sent, + expected offset in the ack is 100 etc. */ + t.RspMap[off] = 1 + } else if status == IMAGE_UPLOAD_STATUS_RQ { + /* If the chunk at this offset was already transmitted, value + goes to zero and that KV pair gets cleaned up subsequently. + If there is a repeated request for a certain offset, + that offset is not received by the remote side. Decrement + the value. Missed chunk processing routine retransmits it */ + t.RspMap[off] -= 1 + } +} + +func (t *ImageUploadIntTracker) CheckWindow() bool { + t.Mutex.Lock() + defer t.Mutex.Unlock() + + return t.CheckWindowUL() +} + +// Unlocked version, when the mutex is already held +func (t *ImageUploadIntTracker) CheckWindowUL() bool { + return t.WCount < t.WCap +} + +func (t *ImageUploadIntTracker) ProcessMissedChunks() { + for o, c := range t.RspMap { + if c < -(IMAGE_UPLOAD_MAX_WS * 2) { + delete(t.RspMap, o) + t.Off = o + log.Debugf("missed? off %d count %d", o, c) + } + // clean up done chunks + if c == 0 { + delete(t.RspMap, o) + } + } +} + +func (t *ImageUploadIntTracker) HandleResponse(c *ImageUploadCmd, off int, rsp nmp.NmpRsp, res *ImageUploadResult) bool { + var cmp int64 + cmp = 1 + wFull := false + + irsp := rsp.(*nmp.ImageUploadRsp) + res.Rsps = append(res.Rsps, irsp) + t.UpdateTracker(int(irsp.Off), IMAGE_UPLOAD_STATUS_RQ) + + if t.WCap == t.WCount { + wFull = true + } + if t.MaxRxOff < int64(irsp.Off) { + t.MaxRxOff = int64(irsp.Off) + } + if c.ProgressCb != nil { + c.ProgressCb(c, irsp) + } + if t.TuneWS && t.WCap < IMAGE_UPLOAD_MAX_WS { + atomic.AddInt64(, 1) Review comment: It seems like writes to WCount and WCap are atomic, but reads are not. This is usually a problem - if some accesses must be atomic, then all must be. However, it looks like these two variables are always protected by `Mutex` anyway, so I think you can just remove the `atomic` calls and be fine (i.e., just access the variables directly). (same comment applies to `HandleError()`) ## File path: nmxact/xact/image.go ## @@ -185,33 +209,189 @@ func nextImageUploadReq(s sesn.Sesn, upgrade bool, data []byte, off int, imageNu return r, nil } +func (t *ImageUploadIntTracker) UpdateTracker(off int, status int) { + if status == IMAGE_UPLOAD_STATUS_MISSED { + /* Upon error, set the value to missed for retransmission */ + t.RspMap[off] = IMAGE_UPLOAD_CHUNK_MISSED_WM + } else if status == IMAGE_UPLOAD_STATUS_EXPECTED { + /* When the chunk at a certain offset is transmitted, + a response requesting the next offset is expected. This + indicates that the chunk is successfully trasmitted. Wait + on the chunk in response e.g when offset 0, len 100 is sent, + expected offset in the ack is 100 etc. */ + t.RspMap[off] = 1 + } else if status == IMAGE_UPLOAD_STATUS_RQ { + /* If the chunk at this offset was already transmitted, value + goes to zero and that KV pair gets cleaned up subsequently. + If there is a repeated request for a certain offset, + that offset is not received by the remote side. Decrement + the value. Missed chunk processing routine retransmits it */ + t.RspMap[off] -= 1 + } +} + +func (t *ImageUploadIntTracker) CheckWindow() bool { + t.Mutex.Lock() + defer t.Mutex.Unlock() + + return t.CheckWindowUL() +} + +// Unlocked version, when the mutex is already held +func (t
[GitHub] [mynewt-core] jipanienko opened a new pull request #2298: missing syscfg for SPI2/SPI3 for stm32
jipanienko opened a new pull request #2298: URL: https://github.com/apache/mynewt-core/pull/2298 Code in stm32_periph,c use MYNEWT_VAL(SPI_2_MASTER) that are not define in yml file This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] utzig merged pull request #2298: missing syscfg for SPI2/SPI3 for stm32
utzig merged pull request #2298: URL: https://github.com/apache/mynewt-core/pull/2298 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[mynewt-core] branch master updated: missing syscfg for SPI2/SPI3 for stm32
This is an automated email from the ASF dual-hosted git repository. utzig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git The following commit(s) were added to refs/heads/master by this push: new 869c322 missing syscfg for SPI2/SPI3 for stm32 869c322 is described below commit 869c322312ed4a1f12dc808a074c031c09244bcb Author: J. Ipanienko AuthorDate: Thu May 28 11:58:58 2020 -0700 missing syscfg for SPI2/SPI3 for stm32 Code in stm32_periph,c use MYNEWT_VAL(SPI_2_MASTER) that are not define in yml file --- hw/mcu/stm/stm32_common/syscfg.yml | 58 ++ 1 file changed, 58 insertions(+) diff --git a/hw/mcu/stm/stm32_common/syscfg.yml b/hw/mcu/stm/stm32_common/syscfg.yml index 5da1d28..3d93adb 100644 --- a/hw/mcu/stm/stm32_common/syscfg.yml +++ b/hw/mcu/stm/stm32_common/syscfg.yml @@ -141,6 +141,64 @@ syscfg.defs: description: 'SS pin for SPI_1' value: '' +SPI_2_MASTER: +description: 'SPI 2 master' +value: 0 +restrictions: +- "!SPI_2_SLAVE" +SPI_2_SLAVE: +description: 'SPI 2 slave' +value: 0 +restrictions: +- "!SPI_2_MASTER" +SPI_2: +description: 'SPI 2 enabled' +value: 'MYNEWT_VAL_SPI_2_MASTER || MYNEWT_VAL_SPI_2_SLAVE' +SPI_2_CUSTOM_CFG: +description: 'Allow SPI_2 configuration override' +value: 0 +SPI_2_PIN_SCK: +description: 'SCK pin for SPI_2' +value: '' +SPI_2_PIN_MOSI: +description: 'MOSI pin for SPI_2' +value: '' +SPI_2_PIN_MISO: +description: 'MISO pin for SPI_2' +value: '' +SPI_2_PIN_SS: +description: 'SS pin for SPI_2' +value: '' + +SPI_3_MASTER: +description: 'SPI 2 master' +value: 0 +restrictions: +- "!SPI_3_SLAVE" +SPI_3_SLAVE: +description: 'SPI 2 slave' +value: 0 +restrictions: +- "!SPI_3_MASTER" +SPI_3: +description: 'SPI 2 enabled' +value: 'MYNEWT_VAL_SPI_3_MASTER || MYNEWT_VAL_SPI_3_SLAVE' +SPI_3_CUSTOM_CFG: +description: 'Allow SPI_3 configuration override' +value: 0 +SPI_3_PIN_SCK: +description: 'SCK pin for SPI_3' +value: '' +SPI_3_PIN_MOSI: +description: 'MOSI pin for SPI_3' +value: '' +SPI_3_PIN_MISO: +description: 'MISO pin for SPI_3' +value: '' +SPI_3_PIN_SS: +description: 'SS pin for SPI_3' +value: '' + I2C_0: description: 'I2C (TWI) interface 0' value: 0
[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2298: missing syscfg for SPI2/SPI3 for stm32
apache-mynewt-bot commented on pull request #2298: URL: https://github.com/apache/mynewt-core/pull/2298#issuecomment-635542947 ## Style check summary No suggestions at this time! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] vrahane commented on pull request #2300: TCP/IPv4 adaptor for CoAP
vrahane commented on pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#issuecomment-635695890 @ccollins476ad I think there is a style check issue most probably, hence the CI failure, rest looks good. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] ccollins476ad commented on a change in pull request #2300: TCP/IPv4 adaptor for CoAP
ccollins476ad commented on a change in pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#discussion_r432210346 ## File path: net/oic/src/messaging/coap/engine.c ## @@ -231,17 +231,19 @@ coap_receive(struct os_mbuf **mp) } transaction->type = response->type; } -} else { // Fix this -/* handle responses */ -if (message->type == COAP_TYPE_CON) { -erbium_status_code = EMPTY_ACK_RESPONSE; -} else if (message->type == COAP_TYPE_ACK) { -/* transactions are closed through lookup below */ -} else if (message->type == COAP_TYPE_RST) { +} else { +if (!oc_endpoint_use_tcp()) { +/* handle responses */ +if (message->type == COAP_TYPE_CON) { +erbium_status_code = EMPTY_ACK_RESPONSE; +} else if (message->type == COAP_TYPE_ACK) { +/* transactions are closed through lookup below */ +} else if (message->type == COAP_TYPE_RST) { #ifdef OC_SERVER -/* cancel possible subscriptions */ -coap_remove_observer_by_mid(OC_MBUF_ENDPOINT(m), message->mid); +/* cancel possible subscriptions */ Review comment: I think it is correct. The `#ifdef` just makes it look confusing. ``` if (!oc_endpoint_use_tcp()) { /* handle responses */ if (message->type == COAP_TYPE_CON) { erbium_status_code = EMPTY_ACK_RESPONSE; } else if (message->type == COAP_TYPE_ACK) { /* transactions are closed through lookup below */ } else if (message->type == COAP_TYPE_RST) { #ifdef OC_SERVER /* cancel possible subscriptions */ coap_remove_observer_by_mid(OC_MBUF_ENDPOINT(m), message->mid); #endif } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2299: Native sock fixes
apache-mynewt-bot commented on pull request #2299: URL: https://github.com/apache/mynewt-core/pull/2299#issuecomment-635667173 ## Style check summary ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md) net/ip/native_sockets/src/native_sock.c ```diff @@ -260,7 +260,7 @@ int native_sock_create(struct mn_socket **sp, uint8_t domain, - uint8_t type, uint8_t proto) + uint8_t type, uint8_t proto) { struct native_sock_state *nss = _sock_state; struct native_sock *ns; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] ccollins476ad opened a new pull request #2299: Native sock fixes
ccollins476ad opened a new pull request #2299: URL: https://github.com/apache/mynewt-core/pull/2299 Some miscellaneous fixes for the `net/ip/native_sock` package. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] ccollins476ad opened a new pull request #2300: TCP/IPv4 adaptor for CoAP
ccollins476ad opened a new pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300 This transport uses mn_sockets. Unlike other transports, this one does not listen for new connections on its own. Instead, the application needs to populate the transport with connections to be managed using oc_tcp4_add_conn(). There are a few too many parameters that need to be specified when listening for TCP connections. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2300: TCP/IPv4 adaptor for CoAP
apache-mynewt-bot commented on pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#issuecomment-635688152 ## Style check summary No suggestions at this time! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2300: TCP/IPv4 adaptor for CoAP
apache-mynewt-bot removed a comment on pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#issuecomment-635688152 ## Style check summary No suggestions at this time! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] vrahane commented on a change in pull request #2300: TCP/IPv4 adaptor for CoAP
vrahane commented on a change in pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#discussion_r432202610 ## File path: net/oic/src/messaging/coap/engine.c ## @@ -231,17 +231,19 @@ coap_receive(struct os_mbuf **mp) } transaction->type = response->type; } -} else { // Fix this -/* handle responses */ -if (message->type == COAP_TYPE_CON) { -erbium_status_code = EMPTY_ACK_RESPONSE; -} else if (message->type == COAP_TYPE_ACK) { -/* transactions are closed through lookup below */ -} else if (message->type == COAP_TYPE_RST) { +} else { +if (!oc_endpoint_use_tcp()) { +/* handle responses */ +if (message->type == COAP_TYPE_CON) { +erbium_status_code = EMPTY_ACK_RESPONSE; +} else if (message->type == COAP_TYPE_ACK) { +/* transactions are closed through lookup below */ +} else if (message->type == COAP_TYPE_RST) { #ifdef OC_SERVER -/* cancel possible subscriptions */ -coap_remove_observer_by_mid(OC_MBUF_ENDPOINT(m), message->mid); +/* cancel possible subscriptions */ Review comment: more spaces than required This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2300: TCP/IPv4 adaptor for CoAP
apache-mynewt-bot commented on pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#issuecomment-635696312 ## Style check summary No suggestions at this time! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[mynewt-core] branch master updated (869c322 -> a24dcf2)
This is an automated email from the ASF dual-hosted git repository. ccollins pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git. from 869c322 missing syscfg for SPI2/SPI3 for stm32 new 24e3d10 native_sock: Make accept()ed sockets nonblocking new 88c7f3d native_sock: Don't SIGPIPE on tx-over-closed conn new 7dada0b native_sock: Don't call mn_readable during receive new a24dcf2 Merge pull request #2299 from ccollins476ad/native_sock_fixes The 9641 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: net/ip/native_sockets/src/native_sock.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-)
[GitHub] [mynewt-core] ccollins476ad merged pull request #2299: Native sock fixes
ccollins476ad merged pull request #2299: URL: https://github.com/apache/mynewt-core/pull/2299 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-core] vrahane commented on pull request #2300: TCP/IPv4 adaptor for CoAP
vrahane commented on pull request #2300: URL: https://github.com/apache/mynewt-core/pull/2300#issuecomment-635695140 I guess we can call datagram transport as UDP but well it won't be a correct term for BLE :-) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org