1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-05 22:18:16 +00:00
trezor-firmware/core/tools/hid-bridge
2021-10-13 11:53:17 +02:00
..
50-hid-bridge.rules MONOREPO CREATE FROM trezor-core 2019-04-15 19:14:40 +02:00
hid_interface.py style(all): use f-strings for formatting 2021-10-13 11:53:17 +02:00
hid-bridge feat(core): Ensure that WebAuthn runs on port 21326 by default for both production and debug emulator. 2021-03-09 16:13:21 +01:00
logger.py style(all): use f-strings for formatting 2021-10-13 11:53:17 +02:00
README.md core/tools: update hid-bridge readme 2020-09-01 14:18:57 +02:00
udp_interface.py style(all): use f-strings for formatting 2021-10-13 11:53:17 +02:00
uhid.py style(all): use f-strings for formatting 2021-10-13 11:53:17 +02:00

hid-bridge

Creates a virtual hid device which can be controlled by a user driver via a UDP port.

Installation

You need Python 3.5 or higher.

The uhid driver is required. If it is built as a module and not loaded, load it by modprobe uhid.

You must have read/write permission to the /dev/uhid/ device as well as to the newly created /dev/hidraw* device. This may be accomplished by copying 50-hid-bridge.rules into /etc/udev/rules.d/. You may need to reload the driver afterwards.

Usage

Run Trezor emulator and ./hid-bridge.

Known issues

It does not work with some older versions of Firefox. Firefox used to close hid devices upon loss of focus.

It does not work with the emulator in debug mode since the emulator doesn't start the hid interface in debug mode.