]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
remove old Manufacturer description code. fix Product description length
authorProxcloud <help@proxcloud.eu>
Thu, 8 Feb 2018 11:37:55 +0000 (19:37 +0800)
committerProxcloud <help@proxcloud.eu>
Thu, 8 Feb 2018 11:37:55 +0000 (19:37 +0800)
common/usb_cdc.c

index 3553d850de660eef3e865cd2a9e6ec4aaad2aea2..d3f5cd0c50fd6a7f0f8c2534e3bc56b6be9fcf65 100644 (file)
@@ -183,7 +183,7 @@ static const char StrDescManufacturer[] = {
 };\r
 \r
 static const char StrDescProduct[] = {\r
 };\r
 \r
 static const char StrDescProduct[] = {\r
-  8,                   // Length\r
+  4,                   // Length\r
   0x03,                        // Type is string\r
   'P', 0x00,\r
   'M', 0x00,\r
   0x03,                        // Type is string\r
   'P', 0x00,\r
   'M', 0x00,\r
@@ -550,16 +550,15 @@ void AT91F_CDC_Enumerate() {
                        AT91F_USB_SendData(pUdp, devDescriptor, MIN(sizeof(devDescriptor), wLength));\r
                else if (wValue == 0x200)  // Return Configuration Descriptor\r
                        AT91F_USB_SendData(pUdp, cfgDescriptor, MIN(sizeof(cfgDescriptor), wLength));\r
                        AT91F_USB_SendData(pUdp, devDescriptor, MIN(sizeof(devDescriptor), wLength));\r
                else if (wValue == 0x200)  // Return Configuration Descriptor\r
                        AT91F_USB_SendData(pUdp, cfgDescriptor, MIN(sizeof(cfgDescriptor), wLength));\r
-               else if ((wValue & 0x300) == 0x300)  // Return Manufacturer Descriptor - this is needed by Android\r
-                       AT91F_USB_SendData(pUdp, StrDescManufacturer, MIN(sizeof(StrDescManufacturer), wLength));\r
                else if ((wValue & 0xF00) == 0x300) { // Return String Descriptor\r
                        const char *strDescriptor = getStringDescriptor(wValue & 0xff);\r
                        if (strDescriptor != NULL) {\r
                                AT91F_USB_SendData(pUdp, strDescriptor, MIN(strDescriptor[0], wLength));\r
                        } else {\r
                else if ((wValue & 0xF00) == 0x300) { // Return String Descriptor\r
                        const char *strDescriptor = getStringDescriptor(wValue & 0xff);\r
                        if (strDescriptor != NULL) {\r
                                AT91F_USB_SendData(pUdp, strDescriptor, MIN(strDescriptor[0], wLength));\r
                        } else {\r
-                               AT91F_USB_SendStall(pUdp);\r
+                               AT91F_USB_SendData(pUdp, StrDescManufacturer, MIN(sizeof(StrDescManufacturer), wLength));\r
                        }\r
                }\r
                        }\r
                }\r
+               \r
                else\r
                        AT91F_USB_SendStall(pUdp);\r
                break;\r
                else\r
                        AT91F_USB_SendStall(pUdp);\r
                break;\r
Impressum, Datenschutz