Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enumerate returns empty array if (some) device drivers are missing #74

Closed
Sjors opened this issue Dec 10, 2018 · 6 comments · Fixed by #92
Closed

enumerate returns empty array if (some) device drivers are missing #74

Sjors opened this issue Dec 10, 2018 · 6 comments · Fixed by #92

Comments

@Sjors
Copy link
Member

Sjors commented Dec 10, 2018

If I only install hidapi and btchip-python and then call ./hwi enumerate it returns []. Once I add trezor[hidapi], keepkey and pyaes it works (ckcc-protocol wasn't needed). Not sure which one did the trick. This stuff is easiest to test with pyenv. I tested with Python 3.4.9.

@instagibbs
Copy link
Collaborator

instagibbs commented Dec 10, 2018 via email

@instagibbs
Copy link
Collaborator

The intended behavior is to not return errors for devices there isn't installed dependencies for.

@achow101
Copy link
Member

What devices were you trying to use?

@achow101
Copy link
Member

achow101 commented Dec 10, 2018

I've just tested with a Ledger Nano S. It seems that the btchip-python library requires the ecdsa module but does not install it. It works when trezor is installed because trezor needs ecdsa and installs it. If you install ecdsa and btchip-python, it works.

This is something that needs to be brought up in the upstream repo.

@instagibbs
Copy link
Collaborator

instagibbs commented Dec 10, 2018 via email

@Sjors
Copy link
Member Author

Sjors commented Dec 10, 2018

I was trying this with a Ledger. Upstream forgetting to install ecdsa makes sense. We could just add it to the README after pip3 install btchip-python

achow101 added a commit that referenced this issue Jan 8, 2019
bdadd8e Coldcard: send keypresses to the simulator for user input things (Andrew Chow)
942969c Ensure RPC is available for each test case (Andrew Chow)
47c3951 Install all necessary libraries correctly (Andrew Chow)
0f6081f Return correct error code from tests (Andrew Chow)

Pull request description:

  Apparently `run_tests.py` was not exiting with a failure status code which caused travis to think that everything was fine when tests were actually failing. This fixes that by having it exit with the right status code.

  Some tests were also failing, so those were fixed. The Coldcard tests needed have `ckcc-protocol[cli]` installed (previously the `cli` extra was not being installed), so that was added to setup.py. At the same time, `ecdsa` was added to fix #74.

  Additionally, the tests for `displayaddress` and `signmessage` on the Coldcard were not working because a keypress is needed on the device. It turns out a keypress can be sent to the device if it is a simulator, so those commands have been changed to send the keypress necessary to simulators. Since `signtx` needs that too, I added it there and enabled the `signtx` test for Coldcard.

  Lastly there were broken pipe errors when sending RPC commands to bitcoind. This was fixed by making a new RPC object when setting up each test case.

Tree-SHA512: 61ab5b552dfbeb7a55a398a575f0a52d409855f96fcacd3f051bbf2ea4178148edd051026af1adf7d72f2442e81fd35401a2bb53f3a3ff475653ef016ca0d578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants