From 5aa74ed00153628ff327ab114c7ce114df8c75d7 Mon Sep 17 00:00:00 2001 From: "harshal.patil" Date: Fri, 21 Jun 2024 14:04:35 +0530 Subject: [PATCH] fix(tools/esp_prov): Fix incorrect input decoding when using console transport - Closes https://github.com/espressif/esp-idf/issues/14013 --- tools/esp_prov/transport/transport_console.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/esp_prov/transport/transport_console.py b/tools/esp_prov/transport/transport_console.py index 8fbcc2fe9c1d..246a15e7aaa9 100644 --- a/tools/esp_prov/transport/transport_console.py +++ b/tools/esp_prov/transport/transport_console.py @@ -1,8 +1,7 @@ -# SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 # - -from utils import hex_str_to_bytes, str_to_bytes +from utils import str_to_bytes from .transport import Transport @@ -16,4 +15,4 @@ async def send_data(self, path, data, session_id=0): except Exception as err: print('error:', err) return None - return hex_str_to_bytes(resp) + return bytearray.fromhex(resp).decode('latin-1')