fix(tools/esp_prov): Fix incorrect input decoding when using console transport

- Closes https://github.com/espressif/esp-idf/issues/14013
This commit is contained in:
harshal.patil
2024-06-21 14:04:35 +05:30
parent c1f50a8eae
commit a2993ab3a6
2 changed files with 4 additions and 5 deletions

View File

@@ -180,7 +180,6 @@ tools/esp_prov/security/security1.py
tools/esp_prov/transport/ble_cli.py
tools/esp_prov/transport/transport.py
tools/esp_prov/transport/transport_ble.py
tools/esp_prov/transport/transport_console.py
tools/esp_prov/transport/transport_http.py
tools/gen_esp_err_to_name.py
tools/gen_soc_caps_kconfig/test/test_gen_soc_caps_kconfig.py

View File

@@ -1,8 +1,8 @@
# 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
# type: ignore
from utils import str_to_bytes
from .transport import Transport
@@ -16,4 +16,4 @@ class Transport_Console(Transport):
except Exception as err:
print('error:', err)
return None
return hex_str_to_bytes(resp)
return bytearray.fromhex(resp).decode('latin-1')