I'm using mcumgr-cli to flash Zephyr application images. The communication is quite slow. Despite using 460800 baud, I only get about 1.9kbyte/s. Maximum throughput would be 45kbyte/s but I understand this is reduced due to base64 encoding overhead etc.
There seems to be a delay of ~20ms between each fragment. I believe that many targets can process the data faster.

(RX/TX as seen from the target)
With no Go experience, looking into the code, I suspect this is the culprit?
|
/* slower platforms take some time to process each segment |
|
* and have very small receive buffers. Give them a bit of |
|
* time here */ |
|
time.Sleep(20 * time.Millisecond) |
Could you reduce this or make it configurable?
Maybe set it to a low value in the beginning and increase it if there are timeouts due to the target not responding.
I'm using mcumgr-cli to flash Zephyr application images. The communication is quite slow. Despite using 460800 baud, I only get about 1.9kbyte/s. Maximum throughput would be 45kbyte/s but I understand this is reduced due to base64 encoding overhead etc.
There seems to be a delay of ~20ms between each fragment. I believe that many targets can process the data faster.
(RX/TX as seen from the target)
With no Go experience, looking into the code, I suspect this is the culprit?
mynewt-newtmgr/nmxact/nmserial/serial_xport.go
Lines 276 to 279 in 87d51a2
Could you reduce this or make it configurable?
Maybe set it to a low value in the beginning and increase it if there are timeouts due to the target not responding.