[Nut-upsdev] USB Device match (was: Masterguard/Phoenixtec USB driver)

Edgar Fuß ef at math.uni-bonn.de
Wed Dec 21 19:59:59 GMT 2022


> Apart from an USB problem (I'll write another mail on that subject)
So this is that other mail.

I have two identical UPSen connected via USB. Without talking their protocol, they are undistinguishable (when talking the protocol, you can use a "slave address" you may set individually).
Back in the libusb0 days, I added a "device" attribute (like the "bus" attribute), but that seems to have gone missing during the libusb1 update.

I tried to add it back (see the #if 0 part in the attached patch) using libusb_get_port_number()) but at least on my NetBSD machine, it turned out to be zero for both devices.
I resorted to using the loop variable instead (see the #else branch), which made my UPSen work again.

Does libusb_get_port_number() return anything useful on other OSes?

Comments?



More information about the Nut-upsdev mailing list