mynewt-newtmgr
mynewt-newtmgr copied to clipboard
Reduce serial TX delay or make configurable
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?
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.