Outdated firmware error messages were originally raised from
create_client, which would mean that a client for an outdated device
would not be created.
This had a number of undesirable outcomes due to "client does not exist"
being conflated with "no device is connected".
Instead, we raise in setup_client (which prevents creating new wallets
with outdated devices, BUT shows them in device list), and python-trezor
also raises on most calls (which gives us an error message when opening
wallet and/or trying to do basically anything with it).
This is still suboptimal - i.e., there's currently no way for Electrum to
claim higher version requirement than the underlying python-trezor, and
so minimum_firmware property is pretty much useless ATM.
we should not raise generic Exception when wanting to communicate with
the user. it makes distinguishing programming errors and messages hard,
as the caller will necessarily need to catch all Exceptions then
[trezor] connecting to device at bridge:hid...
[trezor] connected to device at bridge:hid...
Traceback (most recent call last):
File "...\electrum\electrum\base_wizard.py", line 255, in choose_hw_device
u = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices)
File "...\electrum\electrum\plugin.py", line 501, in unpaired_device_infos
client = self.create_client(device, handler, plugin)
File "...\electrum\electrum\plugin.py", line 374, in create_client
client = plugin.create_client(device, handler)
File "...\electrum\electrum\plugins\trezor\trezor.py", line 124, in create_client
client = self.client_class(transport, handler, self)
File "...\electrum\electrum\plugins\trezor\client.py", line 7, in __init__
ProtocolMixin.__init__(self, transport=transport)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 444, in __init__
self.init_device()
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 454, in init_device
self.features = expect(proto.Features)(self.call)(init_msg)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 115, in wrapped_f
ret = f(*args, **kwargs)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 129, in wrapped_f
client.transport.session_begin()
File "...\Python36-32\lib\site-packages\trezorlib\transport\__init__.py", line 42, in session_begin
self.open()
File "...\Python36-32\lib\site-packages\trezorlib\transport\bridge.py", line 69, in open
raise TransportException('trezord: Could not acquire session' + get_error(r))
trezorlib.transport.TransportException: trezord: Could not acquire session (error=400 str=wrong previous session)
[DeviceMgr] error getting device infos for trezor: trezord: Could not acquire session (error=400 str=wrong previous session)
It was disabled in 680df7d6b6 due to #4421,
but that has since been fixed.
Also related is #4060; and now that that is closed, the bridge transport
is not proxied anyway.
* substitute python prng generator with hmac_drbg
* add warning, change version
* brick cards version 0
* separate python-drbg module, include tests and license
* import to match PEP 8
* fix line break, minor changes in wording
* fixes noise_seed formatting errors
* fix import, include license exclude tests drbg module
build-wine/deterministic.spec: add Coldcard plugin and ckcc-protocol dependancy
Require version 0.7.2 of ckcc-protocol (window fixes)
Rework import paths to new standards
Updated icons
New minimum version, for latest PSBT constants
Upgrade to final PSBT (BIP 174) standard encoding
Remove log noise
Show bootloader version number as well
Handle case where libraries are missing better
Remove noise about missing packages, for rest of world
Add reference to ckcc-protocol module/data
Remove dead code
Beef up the README more
Slightly better looking
Add version numbers and upgrade firmware feature
Split out DFU support into own file
First pass at adding Coinkite Coldcard hardware wallet to Electrum