bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
617 stars 188 forks source link

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

Open bearsh opened 1 year ago

bearsh commented 1 year ago

handling of values of 'product' and 'manufacturer' is commented on linux, see https://github.com/bugst/go-serial/blob/e381f2c1332081ea593d73e97c71342026876857/enumerator/usb_linux.go#L75-L94

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

mangelajo commented 11 months ago

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

https://github.com/bugst/go-serial/blob/e381f2c1332081ea593d73e97c71342026876857/enumerator/usb_darwin.go#L73

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 commented 4 months ago

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?