Blockstream / Jade

Jade hardware wallet
MIT License
322 stars 50 forks source link

Left button for PIN entry not functioning on Windows USB for TTGO Jade wallet DIY #62

Open bayfitt opened 1 year ago

bayfitt commented 1 year ago

Description: I would like to report a bug for the TTGO Jade wallet DIY. I have tested the wallet on USB on Windows, Linux, and Android. When I went to enter my PIN, the left button on the TTGO did not work on Windows, while the right button was functional. I have a video recording of the issue, which I can share with the developers. I consistently experienced this issue even after restarting both the wallet and the computer on Windows. On the other hand, on Linux and Android on USB, everything worked fine. Additionally, Bluetooth on Android worked as expected, and both buttons functioned correctly when entering my PIN.

Details:

Additional Notes:

bayfitt commented 1 year ago

Working normally on Linux

https://user-images.githubusercontent.com/26312519/235023914-9346cd3d-23ee-4c4e-b96f-409a112bdc43.mp4

Not working on windows

https://user-images.githubusercontent.com/26312519/235023943-e093a299-16df-4911-be84-f6a65dcbde7a.mp4

jpph commented 1 year ago

As a temporary workaround, you can use electrum for windows to unlock the ttgo display (button are working ok with electrum), then close electrum, then launch Blockstream Green for windows. You will be able to connect to it.

bayfitt commented 1 year ago

My concern was not about it not working in windows. I can use Linux or Android. My concern is that it works differently, which means there is something going inside the computer from that wallet. Why should it work differently in different OSes, if it is supposed to be isolated? To me, this is a security concern.

jpph commented 1 year ago

As per cryptoguide suggestions there is some simplified input mode and transfer protocol (based on jadepy) when connected to other software than green wallet. Seems that green wallet android and Linux version are using the simplified mode

JamieDriver commented 1 year ago

This sounds v odd to me - you are not re-flashing the device between using on windows and linux, right ?

This is certainly not expected.
If I had to hazard a guess I'd say that maybe there is some pin/interrupt conflict that windows is triggering which is somehow disrupting detecting the button press. ('pin' as in physical pin on the board, not as in 'personal id number'!)

jpph commented 1 year ago

It is not just ''windows''. It is working fine with electrum on windows.

JamieDriver commented 1 year ago

So you plug a lilygo t-display into Green Desktop on Windows, and the left button does not work ? (iirc the right and left buttons should scroll the numbers up/down, and you press both together to move to 'next digit' ?)

We will certainly investigate - as you say the unit buttons should not be affected by whatever happens to be on the other end of the USB cable!

jpph commented 1 year ago

I have same behavior that on the video. At first digit left button act as ''both button'', then at second digit it stop working. And both button stop working too. Very strange behavior

JamieDriver commented 1 year ago

Looks like something specific to Green Desktop (on windows) rather than an issue with the Jade ttgo fw per se. (eg. setting some usb/serial flags badly, voltage on wrong pins, etc.). We have reproduced the issue and agree something v odd happens to that left button.
We'll investigate further - thanks for bringing it to our attention!

sandman21vs commented 1 year ago

I'm having exactly the same problem, the tip to connect the electrum was good, I hadn't thought of that, thanks. I hope they fix this bug soon and it's not a security breach

JamieDriver commented 1 year ago

Are you running the fw with BLE/radio enabled ?

sandman21vs commented 1 year ago

I'm running directly connected to the cable

JamieDriver commented 1 year ago

yy, but I was wondering if Bluetooth was running/enabled, even if youre not connected by Bluetooth - just in case it was relevant ... (if 'Yes' - does it make any difference if you disable it ?)
This is all info I can pass to the desktop guys.

jpph commented 1 year ago

For myself, I have the issue with cable connected and Bluetooth disabled.

sandman21vs commented 1 year ago

Both with Bluetooth on and off, jade diy does not work in the blockstream app (but only in the Green app, in other apps it works perfectly)

JamieDriver commented 1 year ago

Cheers. I'll pass the details along to the windows/desktop app guys.
We'll also check the build/button config to see if we've got usb/serial signals and button signals getting tangled.

Are you all on lilygo-tdisplay units ?

sandman21vs commented 1 year ago

yes we are using liligo tdisplay, in a few days my camera arrives and then I'm going to make a diy jade with it too

adri76 commented 3 months ago

I can confirm that I have the same issue. It is only a problem when using Green wallet via USB. Bluetooth works fine.

Sandmann21s commented 3 months ago

Posso confirmar que tenho o mesmo problema. É apenas um problema ao usar a carteira verde via USB. Bluetooth funciona bem.

I can't use Jade via BT on Windows, but on Linux the blockstream green app works well via cable

Another problem is that the battery indicator does not work showing the device charge

JamieDriver commented 3 months ago

Another problem is that the battery indicator does not work showing the device charge

Yes, afaik that hw board has no chip exposing that sort of information.

adri76 commented 2 months ago

I received an email that the issue has been resolved. I rebuilt the firmware and installed it on a Lilygo T-display and also re-installed Green wallet and I still have the same issue.

Sandmann21s commented 2 months ago

Through trial and error I discovered that if you format your DIY Jade, open the Green app in Windows, connect the Jade, and do the setup it starts to work, but there is no way to connect a Jade that you did not setup in Windows, (the bug does not persist if you connect the Jade after the Green app opens, but if the Jade is not configured Windows does not try to connect to it, when it tries to connect it gives an error lol)

Just to comment, I tested it with an M5stack C2Plus and it works normally, apparently it is only the TTGO T Display that has this problem, the sad part is that this is the most used DIY device to make DIY Jade

adri76 commented 2 months ago

I tried again, but could not get it to work with green wallet. It works with other wallet apps, but not green wallet. (no way to enter the pin) The point of a hardware wallet is to securely store your keys, and I would not trust a buggy setup to store anything of value, so it is nice to use as a proof of concept, but it defeats the object of a diy wallet.

Sandmann21s commented 2 months ago

What's interesting is that this issue only occurs in the Windows version. I believe it would be helpful to open an issue on Green's GitHub to get it resolved because it works fine on Android, macOS, and Linux—only the Windows version is affected.