Giter Site home page Giter Site logo

Comments (5)

kevinmehall avatar kevinmehall commented on May 23, 2024 3

This would be detected by an error returned by claim_interface. probe-rs is currently silently ignoring errors from that call, but by that point you've decided that it's the interface you want, so you should probably display a message if claiming it fails instead of saying "Probe was not found".

// Attempt to claim this interface
match device.claim_interface(interface.interface_number()) {
Ok(handle) => {
tracing::debug!("Opening {:04x}:{:04x} in CMSIS-DAPv2 mode", vid, pid);
return Some(CmsisDapDevice::V2 {
handle,
out_ep: eps[0].address(),
in_ep: eps[1].address(),
swo_ep,
max_packet_size: eps[1].max_packet_size(),
});
}
Err(_) => continue,

kevinmehall/nusb#41 makes the error from claim_interface more specific in this case. ErrorKind::Unsupported roughly maps to "You should use Zadig to bind WinUSB".

Claiming an interface would also fail if another process has it claimed -- ErrorKind::ResourceBusy on Linux and macOS, currently ErrorKind::PermissionDenied on Windows, not sure we can tell it apart from a permissions issue.

from probe-rs.

rgrr avatar rgrr commented on May 23, 2024

Solution could be to not use a probe requiring Zadig. Zadig has TMO too many compatibility issues.

Question: does the most recent picoprobe still require Zadig? If yes, I'ld suggest https://github.com/rgrr/yapicoprobe ;-)

from probe-rs.

Dirbaio avatar Dirbaio commented on May 23, 2024

the upstream picoprobe includes the winusb descriptors so it works out of the box on Windows without having to use zadig.

In this particular case, the person who ran into this issue had used zadig anyway for some reason (probably troubleshoot another issue), replacing the default (correct) winusb drivers with something else.

from probe-rs.

rgrr avatar rgrr commented on May 23, 2024

Thanks for clarification.

I saw the keyword "Zadig" which creates immediate rash on my side. Now that I have read the last sentence of the description I understand the issue. I'ld write some kind of configuration FAQ. But perhaps not a bad idea to implement this FAQ in code if the problem is clearly detectable.

from probe-rs.

Dirbaio avatar Dirbaio commented on May 23, 2024

exactly. this issue is about "probe-rs says probe not found, but it should say probe found but you installed the wrong driver with zadig, please use zadig again to install winusb"

from probe-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.