Re: [Libphidget-devel] serial numbers
Status: Alpha
Brought to you by:
jstrohm
|
From: Jack S. <js...@ja...> - 2002-09-12 02:25:42
|
On Wed, 2002-09-11 at 21:18, fit...@ph... wrote: > > No maximum size. It's defined in hardware as a string, so it would be the > maximum length of a string in USB. Probably 255 bytes or something. In > Windows, I'm representing the serial number with a long. > > Vadim, we fetch a string, which is always string descriptor #3, for serial > number, and then we parse this string to get the number. This is the asm > declaration for the string. > > USBStringDescription3: > db Ch ; Length, db is a byte > db 03h ; 3 is a string descriptor > dsu "00001"; ; string, defined in Unicode. > > So you see that I'm using 5 digits only. There is nothing to prevent me > from stretching this when I reach 99,999. Be nice if that change didn't > break code. > > Chester So for example I get this back 12 - 3 - 48 - 0 - 48 - 0 - 55 - 0 - 52 - 0 - 49 12 bytes is the length of the message (does that include the first byte?) 3 is the string descriptor 48 48 55 52 49 (unicode?) is 00741 |