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

RunApp.py fails with 'Exception : Invalid status 6d00' #31

Open
riordant opened this issue Feb 26, 2018 · 1 comment
Open

RunApp.py fails with 'Exception : Invalid status 6d00' #31

riordant opened this issue Feb 26, 2018 · 1 comment

Comments

@riordant
Copy link

riordant commented Feb 26, 2018

  • Python 2.7
  • Nano S - open at dashboard
  • ECPy version==0.8.1 (to get around 'ECPy requires Python '>=3' but the running Python is 2.7.13' issue)

Command:
$ python -m ledgerblue.runApp --targetId 0x31100002 --appName Bitcoin

Trace:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/site-packages/ledgerblue/runApp.py", line 61, in <module>
    loader.runApp(args.appName)
  File "/usr/local/lib/python2.7/site-packages/ledgerblue/hexLoader.py", line 242, in runApp
    self.exchange(self.cla, 0x00, 0x00, 0x00, data)
  File "/usr/local/lib/python2.7/site-packages/ledgerblue/hexLoader.py", line 86, in exchange
    return self.card.exchange(apdu)
  File "/usr/local/lib/python2.7/site-packages/ledgerblue/comm.py", line 130, in exchange
    raise CommException("Invalid status %04x" % sw, sw, response)
ledgerblue.commException.CommException: Exception : Invalid status 6d00

results appear to be the same regardless of the argument passed to --appName (or whether or not the argument is enclosed in quotes).

hkjn added a commit to hkjn/blue-loader-python that referenced this issue Sep 20, 2019
Before this change, tools like `ledger-agent` [1] give cryptic errors
like the following if the device has the Bitcoin app or the dashboard
open:

```
ledgerblue.commException.CommException: Exception : Invalid status 6d00 (Unknown reason)
ledgerblue.commException.CommException: Exception : Invalid status 6e00 (Unknown reason)
```

After this change, we try to provide a hint that there's nothing wrong
with the device, but that it's in an unexpected state.

Fixes LedgerHQ#26 LedgerHQ#31.

[1] https://github.com/romanz/trezor-agent
@hkjn
Copy link
Contributor

hkjn commented Sep 25, 2019

@btchip: Do you think we can close this issue as well, with #67 merged?

(I intended to close both this issue and #26 automatically by merging #67, but apparently 'Fixes #26 #31' isn't understood by Github..)

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

No branches or pull requests

2 participants