USB封包解說

Feb 17, 2010 2 分鐘 569 字 #USB

今天做了一個解說USB封包的工具,當做是USB中級心法系列的準備。 有興趣學習USB的人可以自己先玩一下來熟悉所謂的3*3。


Get Device Descriptor - Index=0 Length=18
SETUP txn - 80 06 00 01 00 00 12 00
SETUP packet
SYNC
00000001
SETUP
0xB4
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA0 packet
SYNC
00000001
DATA0
0xC3
DATA
80 06 00 01 00 00 12 00
CRC16
0x072F
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 12 01 00 02 00 00 00 08
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
12 01 00 02 00 00 00 08
CRC16
0xEAE7
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 6D 04 16 C0 40 03 01 02
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA0 packet
SYNC
00000001
DATA0
0xC3
DATA
6D 04 16 C0 40 03 01 02
CRC16
0x5ACF
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 00 01
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
00 01
CRC16
0xFCF1
ACK packet
SYNC
00000001
ACK
0x4B
OUT txn -
OUT packet
SYNC
00000001
OUT
0x87
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
CRC16
0x0000
ACK packet
SYNC
00000001
ACK
0x4B
Get Configuration Descriptor - Index=0 Length=255
SETUP txn - 80 06 00 02 00 00 FF 00
SETUP packet
SYNC
00000001
SETUP
0xB4
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA0 packet
SYNC
00000001
DATA0
0xC3
DATA
80 06 00 02 00 00 FF 00
CRC16
0x9725
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 09 02 22 00 01 01 00 A0
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
09 02 22 00 01 01 00 A0
CRC16
0x5019
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 32 09 04 00 00 01 03 01
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA0 packet
SYNC
00000001
DATA0
0xC3
DATA
32 09 04 00 00 01 03 01
CRC16
0xACB2
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 02 00 09 21 10 01 00 01
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
02 00 09 21 10 01 00 01
CRC16
0x68CE
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 22 34 00 07 05 81 03 04
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA0 packet
SYNC
00000001
DATA0
0xC3
DATA
22 34 00 07 05 81 03 04
CRC16
0xB587
ACK packet
SYNC
00000001
ACK
0x4B
IN txn - 00 0A
IN packet
SYNC
00000001
IN
0x96
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
00 0A
CRC16
0x7E12
ACK packet
SYNC
00000001
ACK
0x4B
OUT txn -
OUT packet
SYNC
00000001
OUT
0x87
ADDR
0x01
ENDP
0x0
CRC5
0x17
DATA1 packet
SYNC
00000001
DATA1
0xD2
DATA
CRC16
0x0000
ACK packet
SYNC
00000001
ACK
0x4B
`