Git Product home page Git Product logo

Comments (4)

dccharacter avatar dccharacter commented on August 29, 2024

Here's the device as recieved from winapi:
HID device (vID=0x0000, pID=0x0000, v=0x0000); ; , Path: ?\hid#vid_16c0&pid_03ed#6&20aaa91&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
There's VID and PID in path, but vID and pID are zeroes when class instance initialized... No idea where to look further :-(

from pywinusb.

dccharacter avatar dccharacter commented on August 29, 2024

Problem is that winapi fails to create handlers for some devices:

h_hid = int( winapi.CreateFile(device_path,
winapi.GENERIC_READ | winapi.GENERIC_WRITE,
winapi.FILE_SHARE_READ | winapi.FILE_SHARE_WRITE,
None, winapi.OPEN_EXISTING, 0, 0))

Some devices get handler -1 from this function. All the devices that fail are self made and working properly.

from pywinusb.

dccharacter avatar dccharacter commented on August 29, 2024

And if I just change vid to logitech, it works. It fails with vid 0x16c0, but works perfectly with 0x046d

from pywinusb.

rene-aguirre avatar rene-aguirre commented on August 29, 2024

Thanks for the info.

Some hints:

  • HID system devices won't be allowed to be accessed directly by applications.
  • Usually devices acting as input devices as keyboards, mice (not sure if some game controllers) will be restricted by the system.

Try to use other than input devices usage page item in your HID descriptors.

from pywinusb.

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.