Get Serial Number of USB device with Python 3

For the present PyUSB version 1.0.2, I found the correct syntax to answer this question to be:

import usb

dev = usb.core.find(idProduct=0x001f)
print( usb.util.get_string( dev, dev.iSerialNumber ) )

dev2 = usb.core.find(idProduct=0x0009)
print( usb.util.get_string( dev2, dev2.iSerialNumber ) )

Leave a Comment