summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-12-14 10:08:37 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-14 10:08:37 +1100
commitbb516af1eb97d0c24fa12b00bfde196b3db94c66 (patch)
tree3409feb8691dff31c6a42416bc2ec773c8293e85
parent43141ddb55c715e90b60d2fa2d9d5e01cc66b511 (diff)
tools/pydfu.py: Call set_configuration() on fresh USB device object.
This call is required before using the device (some operating systems don't need it but others do). Fixes issue #3476.
-rwxr-xr-xtools/pydfu.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/pydfu.py b/tools/pydfu.py
index 8c0220de8..4296f07bf 100755
--- a/tools/pydfu.py
+++ b/tools/pydfu.py
@@ -81,6 +81,7 @@ def init():
if len(devices) > 1:
raise ValueError("Multiple DFU devices found")
__dev = devices[0]
+ __dev.set_configuration()
# Claim DFU interface
usb.util.claim_interface(__dev, __DFU_INTERFACE)