Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Exception: Invalid status 6700 when using getFirmwareVersion() #40

Closed
nearestneighbour opened this issue Apr 23, 2018 · 2 comments
Closed

Comments

@nearestneighbour
Copy link

On Ubuntu 17.10 using Python 3.6. Ledger Nano S is connected and unlocked.

After installing btchip-python with pip3 I ran the following code from getFirmwareVersion.py:

from btchip.btchip import *
import sys
dongle = getDongle(True)
app = btchip(dongle)
print(app.getFirmwareVersion()['version'])

The 4th line prints the following output:

=> b'e0c4000000'
<= b''6700
=> b'f026000000'
<= b''6e00

When executing the getFirmwareVersion() function in the 5th line I get output:

=> b'e0c4000000'
<= b''6700

And error:

BTChipException Traceback (most recent call last)
<ipython-input-4-9d5272afbb74> in <module>()
----> 1 app.getFirmwareVersion()

/home/username/.local/lib/python3.6/site-packages/btchip/btchip.py in getFirmwareVersion(self)
559 apdu = [ self.BTCHIP_CLA, self.BTCHIP_INS_GET_FIRMWARE_VERSION, 0x00, 0x00, 0x00 ]
560 try:
--> 561 response = self.dongle.exchange(bytearray(apdu))
562 except BTChipException as e:
563 if (e.sw == 0x6985):

/home/username/.local/lib/python3.6/site-packages/btchip/btchipComm.py in exchange(self, apdu, timeout)
125 print("<= %s%.2x" % (hexlify(response), sw))
126 if sw != 0x9000:
--> 127 raise BTChipException("Invalid status %04x" % sw, sw)
128 return response
129

BTChipException: Exception : Invalid status 6700

@sammchardy
Copy link

@nearestneighbour what did you do to resolve this issue?

@fabioapuana
Copy link

I have precisely the same issue working on Win10 and Python 3.7.
I can communicate with no problem using ledgerblue API. Now I need btchip in order to build a transaction, sign it and so on.

Could you kindly help me?

Thanks,
Fabio

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants