checkGenuine returns Invalid status 6814 (Unknown reason)

Open
#96 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start with ledgerblue/checkGenuine.py and ledgerblue/comm.py, using the reported checkGenuine and checkGenuineRemote commands as entry points. Compare how target IDs and returned status codes are handled for Nano S firmware 2.0.0, then verify the documented command and its genuine-device result.

Written by the indexing model from the issue text.

Description

Hello, I'm trying to check a Nano S on firmware 2.0.0 by running

python3 -m ledgerblue.checkGenuine --targetId 0x31100003

The docs indicate that 0x31100003 is correct for my firmware: https://support.ledger.com/hc/en-us/articles/4404382029329-Check-hardware-integrity?support=true.

I'm getting the following error

Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/moshe/Library/Python/3.8/lib/python/site-packages/ledgerblue/checkGenuine.py", line 137, in <module>
    secret = getDeployedSecretV2(dongle, bytearray.fromhex(args.rootPrivateKey), args.targetId, args.issuerKey)
  File "/Users/moshe/Library/Python/3.8/lib/python/site-packages/ledgerblue/checkGenuine.py", line 44, in getDeployedSecretV2
    dongle.exchange(apdu)
  File "/Users/moshe/Library/Python/3.8/lib/python/site-packages/ledgerblue/comm.py", line 145, in exchange
    raise CommException("Invalid status %04x (%s)" % (sw, possibleCause), sw, response)
ledgerblue.commException.CommException: Exception : Invalid status 6814 (Unknown reason)

When I try checkGenuineRemote it works.

python3 -m ledgerblue.checkGenuineRemote --targetId 0x31100003

However, the docs indicate the checkGenuineRemote is the right script for a Nano X, not a Nano S. What's even more confusing is when I run the command listed for the Nano X (which has a different targetId) on my Nano S, it also tells me the device is genuine:

python3 -m ledgerblue.checkGenuineRemote --targetId 0x33000004

What's the right command to use for a Nano S running firmware 2.0.0?

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.