Comments (5)
Also as a side note, cast send --ledger
can interface with device.
from usb.
Found a homemade solution to this issue.
When I connect my Ledger, it actually enumerate 3 interfaces, but go-ethereum usbwallet hub arbitrarity picks one. So I decided to change go-ethereum and let it pick the other two. It eventually worked.
The solution requires modifying this file:
https://github.com/ethereum/go-ethereum/blob/d14c07d91e565c0d97cfcee3aa84a08ce08d93bf/accounts/usbwallet/hub.go
And changing the fields usageID
and endpointID
on line 96.
I changed from 0xffa0, 0
to 0, 2
.
I tried to find more documentation from Ledger but didn't find anything useful. Not sure if the patch would work for everybody else, so I'm not proposing a public change. Just sharing my own learning.
from usb.
A little bit more context. Here are the three enumerated devices printed with a simple fmt.Printf("enumerate: %#v", infos)
enumerate: []usb.DeviceInfo{
usb.DeviceInfo{Path:"2c97:4015:01", VendorID:0x2c97, ProductID:0x4015, Release:0x0, Serial:"", Manufacturer:"", Product:"", UsagePage:0x0, Usage:0x0, Interface:2, rawDevice:(*usb._Ctype_struct_libusb_device)(0x6000003cc3c0), rawPort:(*uint8)(0x140002e84a8), rawReader:(*uint8)(0x140002e8498), rawWriter:(*uint8)(0x140002e8499)},
usb.DeviceInfo{Path:"", VendorID:0x2c97, ProductID:0x4015, Release:0x201, Serial:"0001", Manufacturer:"Ledger", Product:"Nano X", UsagePage:0xffa0, Usage:0x1, Interface:-1, rawDevice:interface {}(nil), rawPort:(*uint8)(nil), rawReader:(*uint8)(nil), rawWriter:(*uint8)(nil)},
usb.DeviceInfo{Path:"", VendorID:0x2c97, ProductID:0x4015, Release:0x201, Serial:"0001", Manufacturer:"Ledger", Product:"Nano X", UsagePage:0xf1d0, Usage:0x1, Interface:-1, rawDevice:interface {}(nil), rawPort:(*uint8)(nil), rawReader:(*uint8)(nil), rawWriter:(*uint8)(nil)}
}
from usb.
You can use this version from: https://github.com/felipe-op/go-ethereum/tree/felipe/fix-ledger
from usb.
Closed since there is no bug/issue in the lib. Proposed a fix on go-ethereum
instead: ethereum/go-ethereum#28516
from usb.
Related Issues (20)
- Use upstream version of hidapi and libusb HOT 3
- Demo does not run on windows HOT 4
- the cgo included .h files need to be referenced by a Go package so go mod works
- Build warning on FreeBSD HOT 1
- Interfacing a USB HID blood pressure monitor to a Raspberry Pi 3
- build error from mac osx 10.15 fatal error: 'IOKit/IOTypes.h' file not found HOT 4
- Android is not supported HOT 1
- Redefinition of timespec HOT 1
- Please implement hid_error on macOS and Linux HOT 2
- get_usb_string undefined reference to `libiconv_open'
- Printer Error:failed to get device 3 config 0: libusb: not found [code -5] HOT 4
- Deprecation warnings when building on macOS 12.0 HOT 3
- Bug in the recent macOS 12.0 build fix HOT 2
- Bug: the report ID is only prepended on Windows. It should be prepended for macOS/linux as well.
- OSX 14 - ATOMIC_VAR_INIT deprecation warning HOT 2
- Can hotplug be supported
- GETH 1.9 cross compile for windows error HOT 7
- windows: karalabe/hid works fine, karalabe/usb gives "hidapi: failed to open device" HOT 2
- Problem compiling karalabe/usb/hid_enabled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usb.