parent
ba326865f1
commit
61531fbd4a
@ -0,0 +1,21 @@
|
||||
from .device import Device
|
||||
|
||||
|
||||
class TrezorT(Device):
|
||||
def update_firmware(self, file=None):
|
||||
# reset to enter bootloader again
|
||||
self.power_off()
|
||||
self.power_on()
|
||||
|
||||
if not file:
|
||||
raise ValueError(
|
||||
"Uploading production firmware will replace the bootloader, it is not allowed!"
|
||||
)
|
||||
|
||||
self.wait(5)
|
||||
print("[software] Updating the firmware to {}".format(file))
|
||||
self.run_trezorctl("firmware-update -s -f {} &".format(file))
|
||||
|
||||
# upgrading to 2.3.2 took about 80s
|
||||
self.wait(80)
|
||||
self.check_version()
|
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Usage: $0 [model]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nix-shell --run "pipenv run trezorctl list | grep '$1' | cut -d' ' -f1 | tr -d '\n'"
|
@ -1,4 +1,13 @@
|
||||
[t1]
|
||||
location = 3-1.4
|
||||
# location of the uhub, can be found out by running `uhubctl`
|
||||
uhub_location = 3-1.4
|
||||
# to which port of the uhub the device is connected
|
||||
port = 3
|
||||
# arduino that pushes T1 buttons
|
||||
arduino_serial = /dev/ttyACM0
|
||||
|
||||
[tt]
|
||||
# location of the uhub, can be found out by running `uhubctl`
|
||||
uhub_location = 3-3
|
||||
# to which port of the uhub the device is connected
|
||||
port = 1
|
||||
|
Loading…
Reference in new issue