|
| 1 | +--- a/src/cli/cli_opts.c |
| 2 | ++++ b/src/cli/cli_opts.c |
| 3 | +@@ -543,7 +543,7 @@ int parse_cli_options(int argc, char *co |
| 4 | + copts->argv = argv; |
| 5 | + opterr = 0; |
| 6 | + copts->prgname = argv[0]; |
| 7 | +- copts->timeout = 3; |
| 8 | ++ copts->timeout = 1; |
| 9 | + |
| 10 | + return parse_mcumgr_options(copts); |
| 11 | + } |
| 12 | +--- a/src/mcumgr-client/commands/cmd_common.c |
| 13 | ++++ b/src/mcumgr-client/commands/cmd_common.c |
| 14 | +@@ -19,6 +19,9 @@ int cmd_run(struct smp_transport *transp |
| 15 | + rc = transport->ops->write(transport, buf, reqsz); |
| 16 | + |
| 17 | + /* TODO: try reconnecting ?*/ |
| 18 | ++ if (rc == -ETIMEDOUT) { |
| 19 | ++ continue; |
| 20 | ++ } |
| 21 | + if (rc < 0) { |
| 22 | + return rc; |
| 23 | + } |
| 24 | +--- a/src/mcumgr-client/transport/serial/smp_serial.c |
| 25 | ++++ b/src/mcumgr-client/transport/serial/smp_serial.c |
| 26 | +@@ -362,7 +362,7 @@ static int serial_transport_read(struct |
| 27 | + DBG("Read: maxlen: %zu\n", maxlen); |
| 28 | + |
| 29 | + now = time_get(); |
| 30 | +- end_time = now + tmo + 2; |
| 31 | ++ end_time = now + tmo; |
| 32 | + |
| 33 | + while (1) { |
| 34 | + /* read no more than buffers allow, and never more than one frame data |
| 35 | +--- a/src/cli/main.c |
| 36 | ++++ b/src/cli/main.c |
| 37 | +@@ -403,6 +403,7 @@ main(int argc, char **argv) |
| 38 | + } |
| 39 | + transport.verbose = copts.verbose; |
| 40 | + transport.timeout = copts.timeout; |
| 41 | ++ transport.retries = copts.retries; |
| 42 | + } |
| 43 | + |
| 44 | + if (copts.subcmd != CMD_IMAGE_INFO) { |
0 commit comments