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

Open
#31 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
cli, embedded-iot

Research direction

Start with ledgerblue/runApp.py and follow the failing call into ledgerblue/hexLoader.py and ledgerblue/comm.py, using the reported command and traceback as the reproduction. Determine why the Nano S returns status 6d00 and verify that the loader handles the reported invocation successfully.

Written by the indexing model from the issue text.

Description

  • 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).

Dominant language
Python
Stars
125
Forks
75
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LedgerHQ/blue-loader-python

All issues in LedgerHQ/blue-loader-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.