mynewt-newtmgr icon indicating copy to clipboard operation
mynewt-newtmgr copied to clipboard

Reduce serial TX delay or make configurable

Open sw opened this issue 4 years ago • 2 comments

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.

image (RX/TX as seen from the target)

With no Go experience, looking into the code, I suspect this is the culprit?

https://github.com/apache/mynewt-newtmgr/blob/87d51a23a7575b070335ececd0e240092860c24f/nmxact/nmserial/serial_xport.go#L276-L279

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.

sw avatar Jan 20 '21 09:01 sw