-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read support #9
Comments
Not yet. you'll need to implement it yourself. But it shouldn't be a big deal... Sorry that I've no time for this at the moment. But I would be happy if someone could send a PR |
I have read support working on all three platforms in my fork: https://github.com/flynn/hid This fork is maintained to support my U2F package: https://github.com/flynn/u2f Feel free to upstream any commits that you'd like, I had to rearrange some things to fit my needs. |
It would be very great to add read support on this repo (ucase: read serial for a blinkstick product) |
Hi, I've added read support on https://github.com/boombuler/hid/tree/read which is very basic and is only implemented for OSX. If anyone could provide linux / windows code, I would be happy to merge it to master... |
Thanks a lot. Just a question on how to use it, In Python, read serial for Blinkstick is done with usb.util.get_string(self.device, length, index)
usb.util.get_string(self.device, 256, 3) How to get same information with read func ? |
There is also some read support for all platforms in https://github.com/flynn/hid |
Hi again. @titanous I've read through your osx source code and if I'm correct you would lock an OS thread for each device you are listening to. Correct? My implementation of "Listen" should not have this issue (but may have others...). I would also like a funktion to stop listening to the given device... @yesnault with the newest version the following code should give some results: stop := make(chan struct{})
reports, errors := device.Listen(stop)
go func() {
for {
select {
case rep := <-reports:
fmt.Println("Report:", rep)
case err := <-errors:
fmt.Println("Error:", err)
case <-stop:
return
}
}
}()
fmt.Scanln()
close(stop) |
Is it possible to read from the device via Input Report?
The text was updated successfully, but these errors were encountered: