diff --git a/trezorctl b/trezorctl index 01693d2c2f..5f13c0ea46 100755 --- a/trezorctl +++ b/trezorctl @@ -64,7 +64,7 @@ CHOICE_OUTPUT_SCRIPT_TYPE = ChoiceType({ def get_transport_class_by_name(name): - if name == 'usb': + if name == 'hid': from trezorlib.transport_hid import HidTransport return HidTransport @@ -94,7 +94,7 @@ def get_transport(transport_name, path): @click.group() -@click.option('-t', '--transport', type=click.Choice(['usb', 'webusb', 'udp', 'pipe', 'bridge']), default='usb', help='Select transport used for communication.') +@click.option('-t', '--transport', type=click.Choice(['hid', 'webusb', 'udp', 'pipe', 'bridge']), default='hid', help='Select transport used for communication.') @click.option('-p', '--path', help='Select device by transport-specific path.') @click.option('-v', '--verbose', is_flag=True, help='Show communication messages.') @click.option('-j', '--json', 'is_json', is_flag=True, help='Print result as JSON object') diff --git a/trezorlib/tests/device_tests/common.py b/trezorlib/tests/device_tests/common.py index c709e6822f..77c5eebd4a 100644 --- a/trezorlib/tests/device_tests/common.py +++ b/trezorlib/tests/device_tests/common.py @@ -40,7 +40,7 @@ try: from trezorlib.transport_webusb import WebUsbTransport WEBUSB_ENABLED = True except ImportError as e: - print('WebUsb transport disabled:', e) + print('WebUSB transport disabled:', e) WEBUSB_ENABLED = False try: diff --git a/trezorlib/transport_webusb.py b/trezorlib/transport_webusb.py index f2a6de8346..58a32d5d39 100644 --- a/trezorlib/transport_webusb.py +++ b/trezorlib/transport_webusb.py @@ -70,7 +70,7 @@ class WebUsbHandle(object): class WebUsbTransport(Transport): ''' - HidTransport implements transport over USB HID interface. + WebUsbTransport implements transport over WebUSB interface. ''' def __init__(self, device, protocol=None, handle=None, debug=False): @@ -109,12 +109,12 @@ class WebUsbTransport(Transport): for transport in WebUsbTransport.enumerate(): if path is None or dev_to_str(transport.device) == path: return transport - raise TransportException('HID device not found') + raise TransportException('WebUSB device not found') def find_debug(self): if isinstance(self.protocol, ProtocolV2): # TODO test this - # For v2 protocol, lets use the same HID interface, but with a different session + # For v2 protocol, lets use the same WebUSB interface, but with a different session protocol = ProtocolV2() debug = WebUsbTransport(self.device, protocol, self.handle) return debug @@ -123,7 +123,7 @@ class WebUsbTransport(Transport): protocol = ProtocolV1() debug = WebUsbTransport(self.device, protocol, None, True) return debug - raise TransportException('Debug HID device not found') + raise TransportException('Debug WebUSB device not found') def open(self): interface = DEBUG_INTERFACE if self.debug else INTERFACE