mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
069b82401c
to enable multiplatform ble compatibility
24 lines
606 B
Python
24 lines
606 B
Python
# SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
from __future__ import print_function
|
|
|
|
from builtins import input
|
|
|
|
import utils
|
|
|
|
from .transport import Transport
|
|
|
|
|
|
class Transport_Console(Transport):
|
|
|
|
async def send_data(self, path, data, session_id=0):
|
|
print('Client->Device msg :', path, session_id, utils.str_to_hexstr(data))
|
|
try:
|
|
resp = input('Enter device->client msg : ')
|
|
except Exception as err:
|
|
print('error:', err)
|
|
return None
|
|
return utils.hexstr_to_str(resp)
|