阅读:1059回复:1
请教bulk only transport 的数据格式问题。
从bot的协议中可以知道,command block wrapper如下
----------------------------------------------------------- --------- 7 -- 6 -- 5 -- 4 -- 3 -- 2 -- 1 -- 0 ------------ ------------------------------------------------------------ -- 0-3 --- dCBWSignature ------------ ------------------------------------------------------------ -- 4-7 --- dCBWTag ------------ ------------------------------------------------------------ -- 8-11 -- dCBWDataTransferLength ------------ ------------------------------------------------------------ -- 12 --- bmCBWFlags ------------ ------------------------------------------------------------ -- 13 --- Reserved(0) | | bCBWLUN ------------ ------------------------------------------------------------ ---14 ---- Reserved(0) | bCBWCBLength ------------ ------------------------------------------------------------ - 15-30 -- CBWCB ------------ ------------------------------------------------------------ 其中dCBWSignature为 43425355h 那么正确的dCBWSignature格式是什么呢? 是 ---------------------- 还是 ----------------------- - 0 --- 43h ----- - 0 --- 55h ----- ---------------------- ----------------------- - 1 --- 42h ----- - 1 --- 53h ----- ---------------------- ----------------------- - 2 --- 53h ----- - 2 --- 42h ----- ---------------------- ----------------------- - 3 --- 55h ----- - 3 --- 43h ----- ---------------------- ----------------------- 如果logic unit number(lun)的返回值是0, CBWCB如果使用scsi2, 那么一个正确的inquiry(12h)二进制代码是如下图所示的吗: byte ---------------------- ------------- - 0 --- 43h ----- ---------------------- - 1 --- 42h ----- ---------------------- dCBWSignature - 2 --- 53h ----- ---------------------- - 3 --- 55h ----- ---------------------- ------------- - 4 --- 00h ----- ---------------------- - 5 --- 00h ----- ---------------------- dCBWTag - 6 --- 00h ----- ---------------------- - 7 --- 00h ----- ---------------------- ------------- - 8 --- 00h ----- ---------------------- dCBWData - 9 --- 00h ----- Transfer ---------------------- Length - 10--- 00h ----- ---------------------- - 11--- 60h ----- ---------------------- ------------- - 12--- 80h ----- bmCBWFlags ---------------------- ------------ - 13--- 00h ----- bCBWLUN ---------------------- ----------- - 14--- 06h ----- bCBWCBlength ---------------------- ------------ operation - 15--- 12h ----- code ---------------------- ------------ - 16--- 00h ----- ---------------------- - 17--- 00h ----- ---------------------- - 18 --- 00h ----- ---------------------- - 19 --- 00h ----- ---------------------- - 20 --- 00h ----- ---------------------- - 21--- 00h ----- ---------------------- - 22--- 00h ----- ---------------------- - 23--- 00h ----- ---------------------- - 24--- 00h ----- ---------------------- - 25--- 00h ----- ---------------------- - 26--- 00h ----- ---------------------- - 27--- 00h ----- ---------------------- - 28--- 00h ----- ---------------------- - 29--- 00h ----- ---------------------- - 30--- 00h ----- ---------------------- - 31--- 00h ----- ---------------------- [编辑 - 6/8/03 by hustdj] [编辑 - 6/8/03 by hustdj] [编辑 - 6/8/03 by hustdj] [编辑 - 6/8/03 by hustdj] |
|
沙发#
发布于:2003-06-09 02:22
你的高低位全部反了!ALL is LSB first!
---------------------- ------------- - 0 --- 55h ----- ---------------------- - 1 --- 53h ----- ---------------------- dCBWSignature - 2 --- 42h ----- ---------------------- - 3 --- 43h ----- ---------------------- ------------- - 4 --- xxh ----- ---------------------- - 5 --- xxh ----- ---------------------- dCBWTag - 6 --- xxh ----- ---------------------- - 7 --- xxh ----- ---------------------- ------------- - 8 --- 60h ----- ---------------------- dCBWData - 9 --- 00h ----- Transfer ---------------------- Length - 10--- 00h ----- ---------------------- - 11--- 00h ----- |
|