From 13b461cab222be4d83d313ef99fc5c6d58ffcb4b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 22 May 2019 00:06:51 +0200 Subject: [PATCH] usart txrx: wait reply depends on rx waittime --- client/cmdusart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdusart.c b/client/cmdusart.c index 8d685f420..7da6d1298 100644 --- a/client/cmdusart.c +++ b/client/cmdusart.c @@ -173,7 +173,7 @@ static int usart_txrx(uint8_t *srcdata, size_t srclen, uint8_t *dstdata, size_t memcpy(payload.data, srcdata, srclen); SendCommandNG(CMD_USART_TXRX, (uint8_t *)&payload, srclen + sizeof(payload.waittime)); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_USART_TXRX, &resp, 1000)) { + if (!WaitForResponseTimeout(CMD_USART_TXRX, &resp, waittime + 500)) { return PM3_ETIMEOUT; } if (resp.status == PM3_SUCCESS) {