From 8b146c4a16ccac2d545f80670dc685a6e0555927 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Sun, 27 Oct 2019 11:52:44 -0400 Subject: [PATCH] fix issue with bootloader not replying data --- fido2/ctaphid.c | 1 + targets/stm32l432/bootloader/bootloader.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fido2/ctaphid.c b/fido2/ctaphid.c index 33fdddc..f1e808c 100644 --- a/fido2/ctaphid.c +++ b/fido2/ctaphid.c @@ -710,6 +710,7 @@ uint8_t ctaphid_custom_command(int len, CTAP_RESPONSE * ctap_resp, CTAPHID_WRITE printf1(TAG_HID,"CTAPHID_BOOT\n"); u2f_set_writeback_buffer(ctap_resp); is_busy = bootloader_bridge(len, ctap_buffer); + wb->bcnt = 1 + ctap_resp->length; ctaphid_write(wb, &is_busy, 1); ctaphid_write(wb, ctap_resp->data, ctap_resp->length); diff --git a/targets/stm32l432/bootloader/bootloader.h b/targets/stm32l432/bootloader/bootloader.h index 4c0b5a6..cb3b200 100644 --- a/targets/stm32l432/bootloader/bootloader.h +++ b/targets/stm32l432/bootloader/bootloader.h @@ -9,7 +9,6 @@ #define _APP_H_ #include #include "version.h" - #define DEBUG_UART USART1 #ifndef DEBUG_LEVEL @@ -21,6 +20,7 @@ #define BOOT_TO_DFU 0 +#define SOLO 1 #define IS_BOOTLOADER 1 #define ENABLE_U2F_EXTENSIONS