Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

[webusb] Nano X not detected on Windows 10 #456

Closed
picatextra opened this issue Feb 6, 2020 · 5 comments
Closed

[webusb] Nano X not detected on Windows 10 #456

picatextra opened this issue Feb 6, 2020 · 5 comments

Comments

@picatextra
Copy link

On Windows , if i want to connect to my Nano X through webusb, it's not showed on the browser popup. I noticed Windows don't find a driver for the device, while Nano S has a driver.
On Mac, it's ok.

Command line to show usb device :
navigator.usb.requestDevice({filters:[{ vendorId:0x2c97}]})

@cacampbell
Copy link

Hey M8,

WebUSB is only kindof supported on windows, and requires some manipulation with Zadig to get it to work.

Here is how we construct the transport for all platforms:

   private async getTransport(): Promise<Transport> {
        // Support NodeHID for Electron

        if (this.transport != null) {
            return this.transport;
        }

        // WebHID should be what we're doing but it's still unstable on Chrome
        const shouldUseWebHid = false;

        // WebUSB is *supposed* to work on Windows (and Opera?), but alas
        const webusbSupported =
            await TransportWebUSB.isSupported() &&
            platform.os!.family !== "Windows" &&
            platform.name !== "Opera";

        if (shouldUseWebHid) {
            this.transport = await TransportWebHID.create(
                OPEN_TIMEOUT,
                LISTENER_TIMEOUT
            );
        } else if (webusbSupported) {
            this.transport = await TransportWebUSB.create(
                OPEN_TIMEOUT,
                LISTENER_TIMEOUT
            );
        } else {
            this.transport = await TransportU2F.create(
                OPEN_TIMEOUT,
                LISTENER_TIMEOUT
            );

            // U2F requires a pre-negotiated scramble key
            // Don't steal this
            this.transport.setScrambleKey("XXXX");
        }

        return this.transport!;
    }

@picatextra
Copy link
Author

Ok but Nano S is working well in the same env.

danimoh added a commit to nimiq/ledger-api that referenced this issue Jun 26, 2020
HID has better compatibility on Windows due to driver issues for WebUSB
for the Nano X (see LedgerHQ/ledgerjs#456 and
WICG/webusb#143).
@picatextra
Copy link
Author

Looks like it's working now, i didn't change any of my code.

@humanumbrella
Copy link
Contributor

Hi @picatextra - just wondering: Can you interact with the device (Nano X) more than just once on Windows?

I am seeing one normal interaction and then Invalid Channel error and the device drops out to the App List. I haven't investigated further yet but wanted to know if things seem normal on your end?

@picatextra
Copy link
Author

@humanumbrella , i had somes transactions, didn't have any error

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