All pastes #1807506 Raw Edit

teuf

public text v1 · immutable
#1807506 ·published 2010-02-23 23:58 UTC
rendered paste body
commit a0f636ce3e600381c83f909e0d2aef57fa2ccddcAuthor: 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..de27f29 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, 2] 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, 2] 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))