Skip to content
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

enumerator: fill in 'product' and 'manufacturer' on linux #156

Open
bearsh opened this issue Feb 13, 2023 · 2 comments
Open

enumerator: fill in 'product' and 'manufacturer' on linux #156

bearsh opened this issue Feb 13, 2023 · 2 comments

Comments

@bearsh
Copy link

bearsh commented Feb 13, 2023

handling of values of 'product' and 'manufacturer' is commented on linux, see

serial, err := readLine(filepath.Join(usbDevicePath, "serial"))
if err != nil {
return err
}
//manufacturer, err := readLine(filepath.Join(usbDevicePath, "manufacturer"))
//if err != nil {
// return err
//}
//product, err := readLine(filepath.Join(usbDevicePath, "product"))
//if err != nil {
// return err
//}
details.IsUSB = true
details.VID = vid
details.PID = pid
details.SerialNumber = serial
//details.Manufacturer = manufacturer
//details.Product = product
return nil

is there a specific reason for this? can this be enabled?

@mangelajo
Copy link

I was going to ask for the same thing, I see there was support in darwin too:

//product, _ := usbDevice.GetStringProperty("USB Product Name")

I'd find this useful

even if we can get the version (bcdDevice)

If we had those things I could switch from my implementation for device lookup here https://github.com/redhat-et/jumpstarter/blob/main/pkg/drivers/jumpstarter-board/udev.go into using go-serial completely.

@randomouscrap98
Copy link

randomouscrap98 commented Mar 1, 2024

I'm sorry to resurface an old issue, but I'm also interested: why aren't these reported? If it's that some devices error out, I'd rather have the product set on the ones that work rather than have them ALL blank (if possible)

Edit: ah, I forgot about libudev. Is this done to remove dependencies on cgo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants