Commit 209df96e authored by Guillaume Tucker's avatar Guillaume Tucker

servodutil: compare serial numbers rather than usb.util.get_string()

This appears to be another instance of a same bug hit before in
stm32usb, where the serial number needs to be read from the
device.serial_number attribute rather than from usb.util.get_string()
which returns something completely different.
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <>
parent 7430f0a2
......@@ -69,8 +69,7 @@ class UsbHierarchy(object):
devices = UsbHierarchy.GetAllUsbDevices([(vid, pid)])
devs = []
for device in devices:
d_serial = usb.util.get_string(device, 256, device.iSerialNumber)
if d_serial == serial:
if device.serial_number == serial:
if len(devs) > 1:
raise ServodUtilError('Found %d devices with |vid:%s|, |pid:%s|, '
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment