Stvarno ne znam šta je nerazumljivije, čitanje USB literature (suhoparno do bola) ili proučavanje naštrikanog TI koda (nepotrebno iskomplicirani C na kvadrat). Najlakše je... ako se spusti na zemlju i pogleda gdje to, kako, kad i šta ide. Pa evo log-a procesa enumeracije, gotovog TI kod-a, nakon čega su stvari (meni postale) puno jasnije...
Code: Select all
Request 80 06 01 00 00 00 00 40
*** usbGetDeviceDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [18] 12 01 00 02 02 00 00 08 47 20 00 03 00 02 01 02 03 01
usbSendNextPacketOnIEP0 [8] 12 01 00 02 02 00 00 08
usbSendNextPacketOnIEP0 [8] 47 20 00 03 00 02 01 02
Request 00 05 00 02 00 00 00 00
*** usbSetAddress ***
usbStallOEP0
usbSendZeroLengthPacketOnIEP0
Request 80 06 01 00 00 00 00 12
*** usbGetDeviceDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [18] 12 01 00 02 02 00 00 08 47 20 00 03 00 02 01 02 03 01
usbSendNextPacketOnIEP0 [8] 12 01 00 02 02 00 00 08
usbSendNextPacketOnIEP0 [8] 47 20 00 03 00 02 01 02
usbSendNextPacketOnIEP0 [2] 03 01
Request 80 06 02 00 00 00 00 09
*** usbGetConfigurationDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [67] 09 02 43 00 02 01 04 80 32 09 04 00 00 01 02 02 01 05 05 24 00 10 01 05 24 01 00 01 04 24 02 02 05 24 06 00 01 07 05 81 03 40 00 FF 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 FF 07 05 82 02 40 00 FF
usbSendNextPacketOnIEP0 [8] 09 02 43 00 02 01 04 80
usbSendNextPacketOnIEP0 [1] 32
Request 80 06 03 00 00 00 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [4] 04 03 09 04
usbSendNextPacketOnIEP0 [4] 04 03 09 04
Request 80 06 03 03 04 09 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [34] 22 03 30 00 31 00 33 00 42 00 42 00 30 00 34 00 36 00 32 00 37 00 30 00 30 00 32 00 45 00 30 00 30 00
usbSendNextPacketOnIEP0 [8] 22 03 30 00 31 00 33 00
usbSendNextPacketOnIEP0 [8] 42 00 42 00 30 00 34 00
usbSendNextPacketOnIEP0 [8] 36 00 32 00 37 00 30 00
usbSendNextPacketOnIEP0 [8] 30 00 32 00 45 00 30 00
usbSendNextPacketOnIEP0 [2] 30 00
Request 80 06 02 00 00 00 00 FF
*** usbGetConfigurationDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [67] 09 02 43 00 02 01 04 80 32 09 04 00 00 01 02 02 01 05 05 24 00 10 01 05 24 01 00 01 04 24 02 02 05 24 06 00 01 07 05 81 03 40 00 FF 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 FF 07 05 82 02 40 00 FF
usbSendNextPacketOnIEP0 [8] 09 02 43 00 02 01 04 80
usbSendNextPacketOnIEP0 [8] 32 09 04 00 00 01 02 02
usbSendNextPacketOnIEP0 [8] 01 05 05 24 00 10 01 05
usbSendNextPacketOnIEP0 [8] 24 01 00 01 04 24 02 02
usbSendNextPacketOnIEP0 [8] 05 24 06 00 01 07 05 81
usbSendNextPacketOnIEP0 [8] 03 40 00 FF 09 04 01 00
usbSendNextPacketOnIEP0 [8] 02 0A 00 00 00 07 05 02
usbSendNextPacketOnIEP0 [8] 02 40 00 FF 07 05 82 02
usbSendNextPacketOnIEP0 [3] 40 00 FF
Request 80 06 06 00 00 00 00 0A
*** usbInvalidRequest ***
usbStallEndpoint0
Request 80 06 03 00 00 00 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [4] 04 03 09 04
usbSendNextPacketOnIEP0 [4] 04 03 09 04
Request 80 06 03 02 04 09 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [38] 26 03 4D 00 53 00 50 00 34 00 33 00 30 00 2D 00 55 00 53 00 42 00 20 00 45 00 78 00 61 00 6D 00 70 00 6C 00 65 00
usbSendNextPacketOnIEP0 [8] 26 03 4D 00 53 00 50 00
usbSendNextPacketOnIEP0 [8] 34 00 33 00 30 00 2D 00
usbSendNextPacketOnIEP0 [8] 55 00 53 00 42 00 20 00
usbSendNextPacketOnIEP0 [8] 45 00 78 00 61 00 6D 00
usbSendNextPacketOnIEP0 [6] 70 00 6C 00 65 00@
Request 80 06 03 00 00 00 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [4] 04 03 09 04
usbSendNextPacketOnIEP0 [4] 04 03 09 04
Request 80 06 03 02 04 09 00 FF
*** usbGetStringDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [38] 26 03 4D 00 53 00 50 00 34 00 33 00 30 00 2D 00 55 00 53 00 42 00 20 00 45 00 78 00 61 00 6D 00 70 00 6C 00 65 00
usbSendNextPacketOnIEP0 [8] 26 03 4D 00 53 00 50 00
usbSendNextPacketOnIEP0 [8] 34 00 33 00 30 00 2D 00
usbSendNextPacketOnIEP0 [8] 55 00 53 00 42 00 20 00
usbSendNextPacketOnIEP0 [8] 45 00 78 00 61 00 6D 00
usbSendNextPacketOnIEP0 [6] 70 00 6C 00 65 00@
Request 80 06 01 00 00 00 00 12
*** usbGetDeviceDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [18] 12 01 00 02 02 00 00 08 47 20 00 03 00 02 01 02 03 01
usbSendNextPacketOnIEP0 [8] 12 01 00 02 02 00 00 08
usbSendNextPacketOnIEP0 [8] 47 20 00 03 00 02 01 02
usbSendNextPacketOnIEP0 [2] 03 01
Request 80 06 02 00 00 00 01 09
*** usbGetConfigurationDescriptor ***
usbClearOEP0ByteCount
usbSendDataPacketOnEP0 [67] 09 02 43 00 02 01 04 80 32 09 04 00 00 01 02 02 01 05 05 24 00 10 01 05 24 01 00 01 04 24 02 02 05 24 06 00 01 07 05 81 03 40 00 FF 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 FF 07 05 82 02 40 00 FF
usbSendNextPacketOnIEP0 [8] 09 02 43 00 02 01 04 80
usbSendNextPacketOnIEP0 [8] 32 09 04 00 00 01 02 02
usbSendNextPacketOnIEP0 [8] 01 05 05 24 00 10 01 05
usbSendNextPacketOnIEP0 [8] 24 01 00 01 04 24 02 02
usbSendNextPacketOnIEP0 [8] 05 24 06 00 01 07 05 81
usbSendNextPacketOnIEP0 [8] 03 40 00 FF 09 04 01 00
usbSendNextPacketOnIEP0 [8] 02 0A 00 00 00 07 05 02
usbSendNextPacketOnIEP0 [8] 02 40 00 FF 07 05 82 02
usbSendNextPacketOnIEP0 [3] 40 00 FF
Request 00 09 00 01 00 00 00 00
*** usbSetConfiguration ***
usbStallOEP0
usbSendZeroLengthPacketOnIEP0
Ďequest A1 21 00 00 00 00 00 07
--- CDC usbGetLineCoding ---
usbSendDataPacketOnEP0 [7] 00 00 00 00 00 00 08
usbSendNextPacketOnIEP0 [7] 00 00 00 00 00 00 08
Request 21 22 00 00 00 00 00 00
--- CDC usbSetControlLineState ---
usbSendZeroLengthPacketOnIEP0