This repository was archived by the owner on Oct 16, 2024. It is now read-only.
Description 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
Reactions are currently unavailable