Skip to content

Commit

Permalink
Merge pull request iceman1001#243 from micolous/usb-descriptor-funtime
Browse files Browse the repository at this point in the history
Fix USB device descriptor issue, set serial number to "iceman1001".
  • Loading branch information
iceman1001 authored Sep 6, 2018
2 parents 870805a + 65f46d9 commit 6d84bec
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions common/usb_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,30 @@ static const char StrManufacturer[] = {
'p',0,'r',0,'o',0,'x',0,'m',0,'a',0,'r',0,'k',0,'.',0,'o',0,'r',0,'g',0,
};

// Note: This matches upstream proxmark3 USB descriptors.
static const char StrProduct[] = {
22, // Length
20, // Length
0x03, // Type is string
'P',0,'M',0,'3',0,' ',0,'D',0,'e',0,'v',0,'i',0,'c',0,'e',0
'p', 0,
'r', 0,
'o', 0,
'x', 0,
'm', 0,
'a', 0,
'r', 0,
'k', 0,
'3', 0
};

static const char StrSerialNumber[] = {
8, // Length
14, // Length
0x03, // Type is string
'8',0,
'8',0,
'8',0
'i', 0,
'c', 0,
'e', 0,
'm', 0,
'a', 0,
'n', 0,
};

// size includes their own field.
Expand Down Expand Up @@ -947,4 +959,4 @@ void AT91F_CDC_Enumerate() {
AT91F_USB_SendStall(pUdp);
break;
}
}
}

0 comments on commit 6d84bec

Please sign in to comment.