Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trezor.Net with LibUsb getting an error while reading response from a device #45

Open
vnau opened this issue Sep 4, 2023 · 0 comments

Comments

@vnau
Copy link

vnau commented Sep 4, 2023

Trezor.Net does not work properly with LibUsb on either Windows or Linux (mono) because the behavior of IDevice.ReadAsync differs from the native implementation, resulting in an error:
An error occurred while attempting to read the message from the device. The last written message was a ButtonAck. In the first chunk of data the first byte was not 63the second byte was not 35the third byte was not 35

When using LibUsb, the ReadAsync method does not wait for data to be received and immediately returns a response with BytesTransferred property value of zero.

I can create a PR for either Trezor.Net or/and Device.Net.LibUsb (probably this would be a better approach) if that makes sense given the project is stalled.

Info

Platform: Windows / Linux(mono)
Device.Net 4.2.1
Device.Net.LibUsb 4.2.1
LibUsbDotNet 2.2.29
Trezor.Net 5.0.0-beta

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

No branches or pull requests

1 participant