Giter Site home page Giter Site logo

Comments (7)

robatwilliams avatar robatwilliams commented on May 20, 2024

I've not tried those, but from the following comment I think they might not be implemented yet - https://bugs.chromium.org/p/chromium/issues/detail?id=890096#c38

from awesome-webhid.

reillyeon avatar reillyeon commented on May 20, 2024

Connect and disconnect events are not yet implemented.

CC @nondebug

from awesome-webhid.

tijmenvangulik avatar tijmenvangulik commented on May 20, 2024

from awesome-webhid.

robatwilliams avatar robatwilliams commented on May 20, 2024

Discussion is resolved by #11 (comment)

from awesome-webhid.

mame82 avatar mame82 commented on May 20, 2024

Thx for the answers.

In my case, USB HID input reports are sent infrequently by the device, either to indicate state changes or in response to output reports from the host (representing requests in upper protocol layers).
This means sending kind of "keep-alive" HID reports, only to detect disconnects isn't ideal. Additionally it would introduce unnecessary overhead to the microcontroller of the USB device if it has to produce keep-alive reports or to filter out dummy reports, in case they're sent from the host.

So I think it would be the best to wait for implementation of connect/disconnect events.

from awesome-webhid.

todbot avatar todbot commented on May 20, 2024

Hi @mame82, I think you can send to the device from the host, even if the device isn’t configured to receive, and the HID driver will either send the packet or error out if device is disconnected. Basically do the keep-alive, but have it host-originated.

from awesome-webhid.

mame82 avatar mame82 commented on May 20, 2024

@todbot

Yes, but afaik the respective (input) reports would end up as control transfers at ep0 and force an idle response from the device - or am I wrong in that?

from awesome-webhid.

Related Issues (8)

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.