]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/usb_cdc.c
remove old Manufacturer description code. fix Product description length
[proxmark3-svn] / common / usb_cdc.c
index 3d17f81c0a8bfeb9bd6dee17c5c10a0c771ddff2..d3f5cd0c50fd6a7f0f8c2534e3bc56b6be9fcf65 100644 (file)
@@ -77,8 +77,8 @@ static const char cfgDescriptor[] = {
        0x02,   // CbNumInterfaces\r
        0x01,   // CbConfigurationValue\r
        0x00,   // CiConfiguration\r
-       0xC0,   // CbmAttributes (Self Powered - for those with a battery)\r
-       0x4B,   // CMaxPower (150mA max current drawn from bus without battery)\r
+       0x80,   // CbmAttributes (Bus Powered)\r
+       0x4B,   // CMaxPower (150mA max current drawn from bus)\r
 \r
        /* Interface 0 Descriptor: Communication Class Interface */\r
        0x09, // bLength\r
@@ -183,7 +183,7 @@ static const char StrDescManufacturer[] = {
 };\r
 \r
 static const char StrDescProduct[] = {\r
-  8,                   // Length\r
+  4,                   // Length\r
   0x03,                        // Type is string\r
   'P', 0x00,\r
   'M', 0x00,\r
@@ -555,9 +555,10 @@ void AT91F_CDC_Enumerate() {
                        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
                else\r
                        AT91F_USB_SendStall(pUdp);\r
                break;\r
Impressum, Datenschutz