Subversion Repositories freemyipod

Rev

Rev 789 | Rev 809 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 789 Rev 805
Line 64... Line 64...
64
        self.type = 2;
64
        self.type = 2;
65
        print("Connected to iPod Nano 3G WTF mode, USB version %s"  % self.dev.bcdDevice)
65
        print("Connected to iPod Nano 3G WTF mode, USB version %s"  % self.dev.bcdDevice)
66
        return
66
        return
67
    except usb.core.USBError: pass
67
    except usb.core.USBError: pass
68
    try:
68
    try:
-
 
69
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1241)
-
 
70
      if self.dev and generation in [0, 11] and type in [0, 2]:
-
 
71
        self.dev.set_configuration(1)
-
 
72
        self.generation = 11;
-
 
73
        self.type = 2;
-
 
74
        print("Connected to iPod Classic 1G WTF mode, USB version %s"  % self.dev.bcdDevice)
-
 
75
        return
-
 
76
    try:
-
 
77
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1245)
-
 
78
      if self.dev and generation in [0, 12] and type in [0, 2]:
-
 
79
        self.dev.set_configuration(1)
-
 
80
        self.generation = 12;
-
 
81
        self.type = 2;
-
 
82
        print("Connected to iPod Classic 2G WTF mode, USB version %s"  % self.dev.bcdDevice)
-
 
83
        return
-
 
84
    try:
-
 
85
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1247)
-
 
86
      if self.dev and generation in [0, 13] and type in [0, 2]:
-
 
87
        self.dev.set_configuration(1)
-
 
88
        self.generation = 13;
-
 
89
        self.type = 2;
-
 
90
        print("Connected to iPod Classic 3G WTF mode, USB version %s"  % self.dev.bcdDevice)
-
 
91
        return
-
 
92
    except usb.core.USBError: pass
-
 
93
    try:
69
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1225)
94
      self.dev = usb.core.find(idVendor=0x05ac, idProduct=0x1225)
70
      if self.dev and generation in [0, 4] and type in [0, 1]:
95
      if self.dev and generation in [0, 4] and type in [0, 1]:
71
        self.dev.set_configuration(1)
96
        self.dev.set_configuration(1)
72
        self.generation = 4;
97
        self.generation = 4;
73
        self.type = 1;
98
        self.type = 1;