-
Notifications
You must be signed in to change notification settings - Fork 5
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
added libusb as transport (it should be compatible with osx & win now) #2
Conversation
Hey, While cross compiling under ubuntu 16 (linux subsystem on windows) for windows, so linux -> windows, against libusb-1.0.9 using mingw32 64bit:
libusb was configured and installed as follows:
Any ideas how can i deal with that? I was trying to google around, but most people had issues with libusb which was not found by compiler, so... not my case ;/ |
Did you try to compile it directly under windows? I don't really have experience with cross-compiling nor windows, but we'll try to get access to one and test it (main reason this wasn't merged before) |
Ok. I updated libusb to version 1.0.20 and this problem doesn't exists anymore, but...
trezor.go is exactly this file: https://github.com/conejoninja/tesoro/blob/d66480c89d8ce9813462f37a7dff835b17083619/example/main.go As far as i can see, "github.com/zserge/hid" has no support for windows. I recently have been playing around with few HID libs for GO, and the only one that i found working on 2 tested platforms (linux and windows, but they are claiming OSX also works) was https://github.com/flynn/hid. Would it be hard to switch? I didn't digged much into "tesoro" source code yet. |
zserge/hid is a go-only usb library, that works on linux only, I added libusb to support win/mac but never fully tested it. Not really sure what happens with those files if cross-compiling/testing/... on other platform that are not linux (sorry) |
Ok, there is some progress. App compiles correctly, no errors, no warnings. But when running it under windows i'm getting:
So, it fails on line 56, which is device, err := usbDevice.Open(). Odd... UPDATE: If You like to test it (ie. thru wine on linux - if there is actual access to USB ports thru it, no idea):
and then:
Just remember to apply additional steps on your GO setup regarding cross compilation (easy few steps described in golang DOCS). Unless You are using something like GVM, it has cross compilation support included and applies those GO steps automatically. UPDATE2: UPDATE3:
Reall, really odd. No idea what to think about it. Btw. i'm using trezor via chrome (also password manager), all works good. |
need testing on those platforms