We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi guys! I want to get a list of usb devices, Then catch my usb printer by it class So i did this
package main import ( "fmt" "github.com/gotmc/libusb/v2" ) func main(){ c, err := libusb.NewContext(); if err != nil { panic(err) } list, _:= c.DeviceList(); for _, device := range list { d,_ := device.DeviceDescriptor() fmt.Println(d.DeviceClass) } }
output:
Hub class. Hub class. Wireless class. Each interface specifies its own class information and all interfaces operate independently.
its gives me Each interface specifies its own class information and all interfaces operate independently. instead of "printer" class!
Each interface specifies its own class information and all interfaces operate independently.
in terminal i get:
❯ lsusb --verbose | grep "Printer" iManufacturer 1 Printer-58 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer
Why? and Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi guys! I want to get a list of usb devices, Then catch my usb printer by it class
So i did this
output:
its gives me
Each interface specifies its own class information and all interfaces operate independently.
instead of "printer" class!in terminal i get:
Why? and Thanks!
The text was updated successfully, but these errors were encountered: