Git Product home page Git Product logo

go.hid's People

Contributors

benallard avatar erichhansen avatar geertjohan avatar kisielk avatar prusnak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go.hid's Issues

Fails to run with Golang 1.6+

Unfortunately, this fails to run with the latest Golang:

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
panic(0x4100900, 0xc82005c270)
/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/GeertJohan/cgo%2ewchar.convertWcharStringToGoString(0xc82007c100, 0xa, 0x10, 0x0, 0x0, 0x0, 0x0)
/Users/weingart/src/github.com/GeertJohan/cgo.wchar/convert.go:150 +0x521
github.com/GeertJohan/cgo%2ewchar.WcharStringPtrToGoString(0x4309800, 0x0, 0x0, 0x0, 0x0)
/Users/weingart/src/github.com/GeertJohan/cgo.wchar/wchar.go:141 +0x91
github.com/GeertJohan/go%2ehid.Enumerate(0xc800000000, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/weingart/src/github.com/GeertJohan/go.hid/hid.go:211 +0x3e6

sadface

Please don't include hidapi inside your source

hidapi is a cross-platform library, the included version is only for linux/hidraw. By doing so, you limit unnecessarily the scope of your library.

Download and compile hidapi separately, then compile/install your project.

Any interest in libusb?

This is a fantastic Go library for HID devices! Finally, after 6+ years of sitting on some unique USB HID devices, I saw this repo and sniffed out the commands for my device (though there are other types and models out there).

As I started to use go.hid, I quickly ran up against the limitations of the hidapi library! In particular:

http://stackoverflow.com/questions/17706853/using-hidapi-how-can-you-query-the-raw-report-descriptor

HIDAPI does not provide functions for getting or parsing the report descriptor. Since HIDAPI is 
for talking to a custom devices, these devices will likely contain all or mostly vendor-defined 
report items anyway.

That's a bummer as I was attempting to query for and then enumerate over all report IDs and their descriptors as that's what my device uses.

So I am back to investigating into the libusb C++ cross-platform project.

https://github.com/libusb/libusb

Errors on Linux ARM (R-Pi)

Conversion fails for some reason on raspberry pi (running linux arm and using libusb). Errors are shown below. These changes tested on linux (arm) and osx.

./go.hid/hid.go:597: cannot convert ws.Pointer() (type *wchar.Wchar) to type *C.wchar_t ./go.hid/hid.go:624: cannot convert ws.Pointer() (type *wchar.Wchar) to type *C.wchar_t ./go.hid/hid.go:651: cannot convert ws.Pointer() (type *wchar.Wchar) to type *C.wchar_t ./go.hid/hid.go:679: cannot convert ws.Pointer() (type *wchar.Wchar) to type *C.wchar_t

Some serial number can't be decoded

For instance:

FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF

(16x)

this raises an error from libiconv: illegal byte sequence.

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.