Skip to content

Commit

Permalink
Merge branch 'fix/incorrect_console_input_decoding_wifi_prov_mgr_v5.1…
Browse files Browse the repository at this point in the history
…' into 'release/v5.1'

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

See merge request espressif/esp-idf!31691
  • Loading branch information
jack0c committed Jul 1, 2024
2 parents dc164cd + a2993ab commit 321ffde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion tools/ci/mypy_ignore_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tools/esp_prov/transport/transport_console.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -16,4 +16,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')

0 comments on commit 321ffde

Please sign in to comment.