LedgerHQ / btchip-python

Ledger HW.1 Python API
http://www.ledger.co
Apache License 2.0
65 stars 50 forks source link

hw.1 support #24

Open molecular opened 7 years ago

molecular commented 7 years ago

I'm trying to get my old hw.1 to work in electrum. samples/getFirmwareVersion.py doesn't see the device (matching udev rule is in place).

I see in btchipComm.py the usb id of the hw.1 (2581:1b7c) isn't recognized?

Was hw.1 support dropped? I remember using it sucessfully years ago with electrum.

btchip commented 7 years ago

WinUSB communication support has been dropped - you can update the firmware to a more recent version and keep using it with Electrum

molecular commented 7 years ago

cool.

I fail to update the firmware though. This page: https://firmwareupdate.hardwarewallet.com/ says I should enter the PIN 3 times. How can I enter the PIN when no software I have will recognize the device?

I clicked "start update" anyway, but the site says: "Please connect your BTChip dongle"

re-plugging doesn't help.

#> lsusb
Bus 004 Device 065: ID 2581:1b7c

#> cat /usr/lib/udev/rules.d/71-hw1.rules | grep 1b7c
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"

#> sudo udevadm control --reload-rules

what else can I check / do?

btchip commented 7 years ago

Can you try to reflash using the Ledger Wallet Bitcoin Chrome application ?

molecular commented 7 years ago

Thanks for that pointer!

It looks better but still no success. It seems to find the device (yay!) and says "Verifying authenticity of your ledger wallet...." now for about 10 minutes.

Trying on a different machine... looks the same.

Maybe the device is in some weird state? I hadn't used it for years and I'm not sure what were the last actions I did.

btchip commented 7 years ago

Try to remove it and try again. After some time (I think 1-2 minutes) it should timeout and prompt you to reflash, then this should work.

molecular commented 7 years ago

unplugged hw.1, restarted chrome, started the extension (it says: please plug in your ledger), I plug it in (directly into the port, no usb hub this time). It's recognized quickly, page says "verifying authenticity..." Waiting now, but I don't think a timeout will happen due to previous experience.

btchip commented 7 years ago

ok, I'll recheck - might take a couple weeks

molecular commented 7 years ago

ok... background: I'm trying to help people with electron-cash wallet + ledger. I know you're not a fan, but I'm happy you support cash anyway in your hardware. Thanks for that!

btchip commented 7 years ago

oh in that case you can PM me an address on reddit and I'll send a few, should be faster

molecular commented 7 years ago

@btchip I PMed an address on reddit. Did you receive that PM? Just asking because otherwise I'll just buy a device.

btchip commented 7 years ago

Sorry I've been traveling lately. Should get it shipped today

molecular commented 7 years ago

received the btchips. Thanks a ton! Will share them with other electron-devs who they could be useful to.

btchip commented 7 years ago

great. Note that you'll need to flash them to the latest firmware using our Bitcoin Chrome app before they can be used

molecular commented 7 years ago

hmmm, updating firmware worked to a point (it is at least uploaded to the device) using "Ledger Wallet Bitcoin" chrome app. But now the app wants me to enter/scan "security card qr code" supposedly located in some recovery sheet that came with the wallet (which I don't have).

Can I just abort the process at this point (remove the device)?

btchip commented 7 years ago

No, keep going with a dummy card (for example 00000000000000000000000000000000) built from https://www.ledgerwallet.com/wallet/keycard

EchterAgo commented 5 years ago

Ledger Nano / HW1 actually work quite well now in Electron Cash. The only issue I still have is that message signing will not work, same as with Electrum. For message signing I need to unplug / replug the dongle to get the 2FA code, but after I enter it I first get asked for the PIN and then I get a status of '6b00', invalid parameter. This status is from signature = self.get_client().signMessageSign(pin) in sign_message. I checked the data sent and it looked good to me. I'll try to get a capture of the sent / received data and add that here later.

nimrodlehavi commented 4 months ago

hi was this ever resolved? i have an old HW1 device with some bch on it, but won't let me export private key sent out all the btc, but now can't work it with electron b/c it's not supported there

molecular commented 3 months ago

@nimrodlehavi

won't let me export private key

that's by design. HW wallets do not give out private keys, they only sign transactions/messages.

now can't work it with electron b/c it's not supported there

I think it should be supported. Maybe ask in https://t.me/electroncashwallet

nimrodlehavi commented 3 months ago

Thanks, wrote on tg