| Index: tools/ipoddfu/libipoddfu.py | 
| — | — | @@ -29,6 +29,7 @@ | 
| 30 | 30 |  | 
| 31 | 31 | class ipoddfu: | 
| 32 | 32 | def __init__(self, generation = 0, type = 0): | 
|  | 33 | +    # iPod Nano 2G, Bootrom DFU | 
| 33 | 34 | try: | 
| 34 | 35 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1220) | 
| 35 | 36 | if self.dev and generation in [0, 2] and type in [0, 1]: | 
| — | — | @@ -38,17 +39,19 @@ | 
| 39 | 40 | print("Connected to S5L8701 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
| 40 | 41 | return | 
| 41 | 42 | except usb.core.USBError: pass | 
|  | 43 | +    # iPod Nano 3G and iPod Classic 1G/2G/3G, Bootrom DFU | 
| 42 | 44 | try: | 
| 43 |  | -      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1240)
 | 
| 44 |  | -      if self.dev and generation in [0, 2] and type in [0, 2]:
 | 
|  | 45 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1223) | 
|  | 46 | +      if self.dev and generation in [0, 3] and type in [0, 1]: | 
| 45 | 47 | self.dev.set_configuration(1) | 
| 46 |  | -        self.generation = 2;
 | 
| 47 |  | -        self.type = 2;
 | 
| 48 |  | -        print("Connected to iPod Nano 2G NOR DFU mode, USB version %s"  % self.dev.bcdDevice)
 | 
|  | 48 | +        self.generation = 3; | 
|  | 49 | +        self.type = 1; | 
|  | 50 | +        print("Connected to S5L8702 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
| 49 | 51 | return | 
| 50 | 52 | except usb.core.USBError: pass | 
|  | 53 | +    # iPod Nano 3G, Bootrom DFU | 
| 51 | 54 | try: | 
| 52 |  | -      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1223)
 | 
|  | 55 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1224) | 
| 53 | 56 | if self.dev and generation in [0, 3] and type in [0, 1]: | 
| 54 | 57 | self.dev.set_configuration(1) | 
| 55 | 58 | self.generation = 3; | 
| — | — | @@ -56,7 +59,49 @@ | 
| 57 | 60 | print("Connected to S5L8702 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
| 58 | 61 | return | 
| 59 | 62 | except usb.core.USBError: pass | 
|  | 63 | +    # iPod Nano 4G, Bootrom DFU | 
| 60 | 64 | try: | 
|  | 65 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1225) | 
|  | 66 | +      if self.dev and generation in [0, 4] and type in [0, 1]: | 
|  | 67 | +        self.dev.set_configuration(1) | 
|  | 68 | +        self.generation = 4; | 
|  | 69 | +        self.type = 1; | 
|  | 70 | +        print("Connected to S5L8720 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
|  | 71 | +        return | 
|  | 72 | +    except usb.core.USBError: pass | 
|  | 73 | +    # iPod Nano 5G, Bootrom DFU | 
|  | 74 | +    try: | 
|  | 75 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1231) | 
|  | 76 | +      if self.dev and generation in [0, 5] and type in [0, 1]: | 
|  | 77 | +        self.dev.set_configuration(1) | 
|  | 78 | +        self.generation = 5; | 
|  | 79 | +        self.type = 1; | 
|  | 80 | +        print("Connected to S5L8730 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
|  | 81 | +        return | 
|  | 82 | +    except usb.core.USBError: pass | 
|  | 83 | +    # iPod Nano 6G, Bootrom DFU | 
|  | 84 | +    try: | 
|  | 85 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1225) | 
|  | 86 | +      if self.dev and generation in [0, 6] and type in [0, 1]: | 
|  | 87 | +        self.dev.set_configuration(1) | 
|  | 88 | +        self.generation = 6; | 
|  | 89 | +        self.type = 1; | 
|  | 90 | +        print("Connected to S5L8723 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice) | 
|  | 91 | +        return | 
|  | 92 | +    except usb.core.USBError: pass | 
|  | 93 | + | 
|  | 94 | +    # iPod Nano 2G, NOR DFU | 
|  | 95 | +    try: | 
|  | 96 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1240) | 
|  | 97 | +      if self.dev and generation in [0, 2] and type in [0, 2]: | 
|  | 98 | +        self.dev.set_configuration(1) | 
|  | 99 | +        self.generation = 2; | 
|  | 100 | +        self.type = 2; | 
|  | 101 | +        print("Connected to iPod Nano 2G NOR DFU mode, USB version %s"  % self.dev.bcdDevice) | 
|  | 102 | +        return | 
|  | 103 | +    except usb.core.USBError: pass | 
|  | 104 | +    # iPod Nano 3G, WTF | 
|  | 105 | +    try: | 
| 61 | 106 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1242) | 
| 62 | 107 | if self.dev and generation in [0, 3] and type in [0, 2]: | 
| 63 | 108 | self.dev.set_configuration(1) | 
| — | — | @@ -65,6 +110,7 @@ | 
| 66 | 111 | print("Connected to iPod Nano 3G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 67 | 112 | return | 
| 68 | 113 | except usb.core.USBError: pass | 
|  | 114 | +    # iPod Classic 1G, WTF | 
| 69 | 115 | try: | 
| 70 | 116 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1241) | 
| 71 | 117 | if self.dev and generation in [0, 11] and type in [0, 2]: | 
| — | — | @@ -74,6 +120,7 @@ | 
| 75 | 121 | print("Connected to iPod Classic 1G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 76 | 122 | return | 
| 77 | 123 | except usb.core.USBError: pass | 
|  | 124 | +    # iPod Classic 2G, WTF | 
| 78 | 125 | try: | 
| 79 | 126 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1245) | 
| 80 | 127 | if self.dev and generation in [0, 12] and type in [0, 2]: | 
| — | — | @@ -83,6 +130,7 @@ | 
| 84 | 131 | print("Connected to iPod Classic 2G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 85 | 132 | return | 
| 86 | 133 | except usb.core.USBError: pass | 
|  | 134 | +    # iPod Classic 3G, WTF | 
| 87 | 135 | try: | 
| 88 | 136 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1247) | 
| 89 | 137 | if self.dev and generation in [0, 13] and type in [0, 2]: | 
| — | — | @@ -92,24 +140,36 @@ | 
| 93 | 141 | print("Connected to iPod Classic 3G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 94 | 142 | return | 
| 95 | 143 | except usb.core.USBError: pass | 
|  | 144 | +    # iPod Nano 4G, WTF | 
| 96 | 145 | try: | 
| 97 |  | -      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1225)
 | 
| 98 |  | -      if self.dev and generation in [0, 4] and type in [0, 1]:
 | 
|  | 146 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1243) | 
|  | 147 | +      if self.dev and generation in [0, 4] and type in [0, 2]: | 
| 99 | 148 | self.dev.set_configuration(1) | 
| 100 | 149 | self.generation = 4; | 
| 101 |  | -        self.type = 1;
 | 
| 102 |  | -        print("Connected to S5L8720 Bootrom DFU mode, USB version %s"  % self.dev.bcdDevice)
 | 
|  | 150 | +        self.type = 2; | 
|  | 151 | +        print("Connected to iPod Nano 4G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 103 | 152 | return | 
| 104 | 153 | except usb.core.USBError: pass | 
|  | 154 | +    # iPod Nano 5G, WTF | 
| 105 | 155 | try: | 
| 106 | 156 | self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1243) | 
| 107 |  | -      if self.dev and generation in [0, 4] and type in [0, 2]:
 | 
|  | 157 | +      if self.dev and generation in [0, 5] and type in [0, 2]: | 
| 108 | 158 | self.dev.set_configuration(1) | 
| 109 |  | -        self.generation = 4;
 | 
|  | 159 | +        self.generation = 5; | 
| 110 | 160 | self.type = 2; | 
| 111 |  | -        print("Connected to iPod Nano 4G WTF mode, USB version %s"  % self.dev.bcdDevice)
 | 
|  | 161 | +        print("Connected to iPod Nano 5G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
| 112 | 162 | return | 
| 113 | 163 | except usb.core.USBError: pass | 
|  | 164 | +    # iPod Nano 6G, WTF | 
|  | 165 | +    try: | 
|  | 166 | +      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1243) | 
|  | 167 | +      if self.dev and generation in [0, 6] and type in [0, 2]: | 
|  | 168 | +        self.dev.set_configuration(1) | 
|  | 169 | +        self.generation = 6; | 
|  | 170 | +        self.type = 2; | 
|  | 171 | +        print("Connected to iPod Nano 6G WTF mode, USB version %s"  % self.dev.bcdDevice) | 
|  | 172 | +        return | 
|  | 173 | +    except usb.core.USBError: pass | 
| 114 | 174 |  | 
| 115 | 175 | raise Exception("Could not find specified DFU device (generation = %d, type = %d)" % (generation, type)) | 
| 116 | 176 |  | 
| Index: tools/ipoddfu_c/usb.c | 
| — | — | @@ -97,7 +97,7 @@ | 
| 98 | 98 | if (0x05ac == dev_desc.idVendor && ( | 
| 99 | 99 | // DFU | 
| 100 | 100 | 0x1220 == dev_desc.idProduct || // iPod Nano 2G | 
| 101 |  | -            0x1223 == dev_desc.idProduct || // iPod Classic 1G | 
|  | 101 | +            0x1223 == dev_desc.idProduct || // iPod Nano 3G and iPod Classic 1G/2G/3G | 
| 102 | 102 | 0x1224 == dev_desc.idProduct || // iPod Nano 3G | 
| 103 | 103 | 0x1225 == dev_desc.idProduct || // iPod Nano 4G | 
| 104 | 104 | 0x1231 == dev_desc.idProduct || // iPod Nano 5G |