Skip to content

Reduce serial TX delay or make configurable #180

@sw

Description

@sw

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?

/* 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions