Giter Site home page Giter Site logo

Comments (5)

felipe-op avatar felipe-op commented on August 28, 2024

Also as a side note, cast send --ledger can interface with device.

from usb.

felipe-op avatar felipe-op commented on August 28, 2024

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.

felipe-op avatar felipe-op commented on August 28, 2024

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.

felipe-op avatar felipe-op commented on August 28, 2024

You can use this version from: https://github.com/felipe-op/go-ethereum/tree/felipe/fix-ledger

from usb.

felipe-op avatar felipe-op commented on August 28, 2024

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)

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.