WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.3k stars 126 forks source link

DAPlink CDC interface claim reject by webUSB #170

Closed wjzhang closed 4 years ago

wjzhang commented 4 years ago

Hi: when I try use webusb api to communicate with DAPlink CDC interfaces(2 interface: 0 & 1). but it reject when call claimInterface(). it report "NetworkError: Unable to claim interface." here the code: console.log("webserialconnect ===>>>"); const filters = [{ vendorId: 0x0D28, productId: 0x0204, serialNumber: serial}]; console.log("filter : " + JSON.stringify(filters)); return navigator.usb.requestDevice({filters}).then((device) => { console.log(" Found:" + device.toString()); console.log(" manufacturer Name:" + device.manufacturerName); console.log(" product Name:" + device.productName); console.log(" serial Number:" + device.serialNumber);

    usbSerialdevice = device;
    return usbSerialdevice.open();  
}).then(() => {
    console.log("   opened:");  
    return usbSerialdevice.selectConfiguration(1);
}).then(() => {
    console.log("   Configuration:" );
    usbSerialdevice.configuration.interfaces.forEach((interface, index) =>{
        console.log("   interfaces" + index + " : " + interface.interfaceNumber);
        console.log(interface);     
    });     
    return usbSerialdevice.claimInterface(usbSerialdevice.configuration.interfaces[1].interfaceNumber);
}).then(() => {
    console.log("   Interface claim:");
});   

My Chrome version : 76.0.3809.132

odejesush commented 4 years ago

This issue tracker is only for WebUSB specification issues, so I am closing this issue. Since this is an issue with Chrome's implementation of WebUSB, please submit this issue in Chrome's issue tracker with the Blink>USB component.

wjzhang commented 4 years ago

Sorry for my mistake.