rendered paste bodycommit 3cdc5452744b225f746b11e6e5e23456f33961cfAuthor: Christophe Fergeau <cfergeau@mandriva.com>Date: Wed Feb 24 00:56:24 2010 +0100 add nano5g support to libipoddfu.pydiff --git a/tools/libipoddfu.py b/tools/libipoddfu.pyindex e482a6a..d895706 100644--- a/tools/libipoddfu.py+++ b/tools/libipoddfu.py@@ -88,6 +88,24 @@ class ipoddfu: self.type = 2;
print("Connected to iPod Nano 4G WTF mode, USB version %s" % dev.deviceVersion)
return
+ elif dev.idVendor == 0x05ac and dev.idProduct == 0x1231 \
+ and generation in [0, 5] and type in [0, 1]:
+ self.handle = dev.open()
+ self.handle.setConfiguration(1)
+ self.handle.claimInterface(0)
+ self.generation = 5;
+ self.type = 1;
+ print("Connected to iPod Nano 5G Bootrom DFU mode, USB version %s" % dev.deviceVersion)
+ return
+ elif dev.idVendor == 0x05ac and dev.idProduct == 0x1246 \
+ and generation in [0, 5] and type in [0, 1]:
+ self.handle = dev.open()
+ self.handle.setConfiguration(1)
+ self.handle.claimInterface(0)
+ self.generation = 5;
+ self.type = 2;
+ print("Connected to iPod Nano 5G WTF mode, USB version %s" % dev.deviceVersion)
+ return
raise Exception("Could not find specified DFU device (generation = %d, type = %d)" % (generation, type))