☆デバッグ表示の例 もともとアルファプロジェクトのプログラムでは、以下のようなデバイスに関する情報が表示されるようになっている。 Detach Port ----------------------------------------- Attach Port -----------------------------------------    <=USBデバイス(USBメモリー)のアタッチ(接続) Hi-Speed Device---- USB Address is 3---- Get configuration (Device descriptor) ------------------------ Device descriptor dump : 12 01 00 02 00 00 00 40 0c 09 00 10 00 11 01 02 03 01 Device descriptor fields : bLength : 0x12 bDescripotorType : 0x1 bcdUSB : 0x20 bDeviceClass : 0x0 bDeviceSubClass : 0x0 bProtocolCode : 0x0 bMaxPacketSize : 0x40 idVendor : 0x0 idProduct : 0x1000 bcdDevice : 0x1100 iManufacture : 0x1 iProduct : 0x2 iSerialNumber : 0x3 bNumConfigurations : 0x1 Get configuration (Configuration descriptor) ----------------- Configuration descriptor fields: wTotalLength : 0x20 bNumInterfaces : 0x1 bConfigurationValue: 0x1 iConfiguration : 0x0 bmAttributes : 0x80 bMaxPower : 0x32 Interface descriptor fields: bInterfaceNumber : 0x0 bAlternateSetting : 0x0 bNumEndpoints : 0x2 bInterfaceClass : 0x8 bInterfaceSubClass : 0x6 bInterfaceProtocol : 0x50 iInterface : 0x0 Endpoint descriptor fields: bEndpointAddress : 0x81 bmAttributes : 0x2 wMaxPacketSize : 0x200 bInterval : 0xff Endpoint descriptor fields: bEndpointAddress : 0x2 bmAttributes : 0x2 wMaxPacketSize : 0x200 bInterval : 0xff 更に、PIPEの状態の表示を追加した。 UBSメモリーにはバルク入出用に2本のパイプがある。 ---- in H_SetEndpointTable pipe number = 1 BULK DIR_H_IN PipeTbl = 0x2001 device addres/max packet size = 12800 BULK_OUT_PIPE = 1, BULK_IN_PIPE= 1 ---- in H_SetEndpointTable pipe number = 2 BULK DIR_H_OUT PipeTbl = 0x1002 device addres/max packet size = 12800 BULK_OUT_PIPE = 2, BULK_IN_PIPE= 1 SCSIコマンドを発行したときの例: +send_cbw inquiry size0= 36 General USB Flash Disk 1100    <=USBメモリーからの返事の中の一部の情報を表示している。 +OK bCSWStatus +send_cbw ReadCapacity size0= 8 logical Block address = 3913727  <=USBメモリーの容量 約2G=3913727 x 512 0 3b b7 ff Block length in bytes= 512 0 0 2 0 +OK bCSWStatus +send_cbw Read10 size0= 512 1st sector no. BPD = 32  <= USBメモリーの中で実際にデータがある場所の開始セクター番号を読み出しているところ 20 0 0 0 0x55= 55 , 0xAA= aa -Error bCSWStatus 1 <= CBWにリ潟^ーンにエラーがある例。 *応答があるがエラーの例。