On Wed, Aug 22, 2012 at 10:06 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
> On Mon, Aug 20, 2012 at 8:32 AM, Pete Batard <p...@akeo.ie> wrote:
>> Hopefully will help getting more testing before next release.
>>
>> I'm closing #11 and #12 as a result (isoc support will be dealt elsewhere).
>>
>> I also pushed the patch provided for #41
>> (https://github.com/libusbx/libusbx/pull/41).
>>
>
> The test results with a Sandisk USB Flash Drive with the "xusb -k"
> are a bit strange. This is with the latest git and WDK 7.1
> free build under Windows 7 x86 Virtual Machine (Mac OS
> X Lion 10.7.4 host).
>
> The timeout for the 2nd case may have something to do
> with the VirtualBox VM used. I will test with real Windows
> machine over the weekend.

It seems to me "xusb -k" does not work well with some
USB Flash Drive like the Sandisk 8GB drive and a
Kingston 1GB drive I have, even with a real Windows 7
x64 machine.

I find one generic Flash drive which seems to work
reasonably well with "xusb -k" under this Win7 x64 machine.

Test results with the latest git. The filter driver result is in line
with what Pete mentioned before. The strange thing is that
libusbk.sys behaves differently from winusb.sys and libusb0.sys.

1) libusb-win32 filter driver + original Windows driver usbstor.sys
--> works fine, with a few warning messages

d:\work\libusbx\libusbx\x64\Release\examples>xusb.exe -k 10bb:5180
Using libusbx v1.0.12.10556

Opening device...
bus: 2, port path from HCD: 4
speed: 480 Mbit/s (USB HighSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 10BB:5180
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00

Claiming interface 0...
libusbx: error [winusbx_claim_interface] could not access interface 0: [50] The
request is not supported.
libusbx: info [get_interface_details_filter] assigned libusb0 symbolic link \\.\
libusb0-0001

Reading string descriptors:
   String (0x01): "Generic"
   String (0x02): "Flash Disk"
libusbx: error [winusbx_submit_control_transfer] ControlTransfer failed: [31] A
device attached to the system is not functioning.
Reading Max LUN:
   Max LUN = 0
Sending Inquiry:
   sent 6 CDB bytes
   received 36 bytes
   VID:PID:REV "Generic ":"USB Flas":"1.00"
   Mass Storage Status: 00 (Success)
Reading Capacity:
   sent 10 CDB bytes
   received 8 bytes
   Max LBA: 003F17FF, Block Size: 00000200 (1.97 GB)
   Mass Storage Status: 00 (Success)
Attempting to read 512 bytes:
   sent 10 CDB bytes
   READ: received 512 bytes
   Mass Storage Status: 00 (Success)

  00000000  fa 31 c0 8e d8 8e d0 bc 00 7c 89 e6 06 57 8e c0  .1.......|...W..
  00000010  fb fc bf 00 06 b9 00 01 f3 a5 ea 1f 06 00 00 52  ...............R
  00000020  52 b4 41 bb aa 55 31 c9 30 f6 f9 cd 13 72 13 81  R.A..U1.0....r..
  00000030  fb 55 aa 75 0d d1 e9 73 09 66 c7 06 8d 06 b4 42  .U.u...s.f.....B
  00000040  eb 15 5a b4 08 cd 13 83 e1 3f 51 0f b6 c6 40 f7  ..Z......?Q...@.
  00000050  e1 52 50 66 31 c0 66 99 e8 66 00 e8 21 01 4d 69  .RPf1.f..f..!.Mi
  00000060  73 73 69 6e 67 20 6f 70 65 72 61 74 69 6e 67 20  ssing operating
  00000070  73 79 73 74 65 6d 2e 0d 0a 66 60 66 31 d2 bb 00  system...f`f1...
  00000080  7c 66 52 66 50 06 53 6a 01 6a 10 89 e6 66 f7 36  |fRfP.Sj.j...f.6
  00000090  f4 7b c0 e4 06 88 e1 88 c5 92 f6 36 f8 7b 88 c6  .{.........6.{..
  000000a0  08 e1 41 b8 01 02 8a 16 fa 7b cd 13 8d 64 10 66  ..A......{...d.f
  000000b0  61 c3 e8 c4 ff be be 7d bf be 07 b9 20 00 f3 a5  a......}.... ...
  000000c0  c3 66 60 89 e5 bb be 07 b9 04 00 31 c0 53 51 f6  .f`........1.SQ.
  000000d0  07 80 74 03 40 89 de 83 c3 10 e2 f3 48 74 5b 79  ..t...@.......ht[y
  000000e0  39 59 5b 8a 47 04 3c 0f 74 06 24 7f 3c 05 75 22  9Y[.G.<.t.$.<.u"
  000000f0  66 8b 47 08 66 8b 56 14 66 01 d0 66 21 d2 75 03  f.G.f.V.f..f!.u.
  00000100  66 89 c2 e8 ac ff 72 03 e8 b6 ff 66 8b 46 1c e8  f.....r....f.F..
  00000110  a0 ff 83 c3 10 e2 cc 66 61 c3 e8 62 00 4d 75 6c  .......fa..b.Mul
  00000120  74 69 70 6c 65 20 61 63 74 69 76 65 20 70 61 72  tiple active par
  00000130  74 69 74 69 6f 6e 73 2e 0d 0a 66 8b 44 08 66 03  titions...f.D.f.
  00000140  46 1c 66 89 44 08 e8 30 ff 72 13 81 3e fe 7d 55  F.f.D..0.r..>.}U
  00000150  aa 0f 85 06 ff bc fa 7b 5a 5f 07 fa ff e4 e8 1e  .......{Z_......
  00000160  00 4f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65  .Operating syste
  00000170  6d 20 6c 6f 61 64 20 65 72 72 6f 72 2e 0d 0a 5e  m load error...^
  00000180  ac b4 0e 8a 3e 62 04 b3 07 cd 10 3c 0a 75 f1 cd  ....>b.....<.u..
  00000190  18 f4 eb fd 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01  ................
  000001c0  01 00 0b fe 7f 00 3f 00 00 00 82 ff 3e 00 00 00  ......?.....>...
  000001d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa  ..............U.

Releasing interface 0...
Closing device...

2) Winusb.sys --> works fine, no warning messages

d:\work\libusbx\libusbx\x64\Release\examples>xusb.exe -k 10bb:5180
Using libusbx v1.0.12.10556

Opening device...
bus: 2, port path from HCD: 4
speed: 480 Mbit/s (USB HighSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 10BB:5180
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00

Claiming interface 0...

Reading string descriptors:
   String (0x01): "Generic"
   String (0x02): "Flash Disk"
Reading Max LUN:
   Max LUN = 0
Sending Inquiry:
   sent 6 CDB bytes
   received 36 bytes
   VID:PID:REV "Generic ":"USB Flas":"1.00"
   Mass Storage Status: 00 (Success)
Reading Capacity:
   sent 10 CDB bytes
   received 8 bytes
   Max LBA: 003F17FF, Block Size: 00000200 (1.97 GB)
   Mass Storage Status: 00 (Success)
Attempting to read 512 bytes:
   sent 10 CDB bytes
   READ: received 512 bytes
   Mass Storage Status: 00 (Success)

  00000000  fa 31 c0 8e d8 8e d0 bc 00 7c 89 e6 06 57 8e c0  .1.......|...W..
  00000010  fb fc bf 00 06 b9 00 01 f3 a5 ea 1f 06 00 00 52  ...............R
  00000020  52 b4 41 bb aa 55 31 c9 30 f6 f9 cd 13 72 13 81  R.A..U1.0....r..
  00000030  fb 55 aa 75 0d d1 e9 73 09 66 c7 06 8d 06 b4 42  .U.u...s.f.....B
  00000040  eb 15 5a b4 08 cd 13 83 e1 3f 51 0f b6 c6 40 f7  ..Z......?Q...@.
  00000050  e1 52 50 66 31 c0 66 99 e8 66 00 e8 21 01 4d 69  .RPf1.f..f..!.Mi
  00000060  73 73 69 6e 67 20 6f 70 65 72 61 74 69 6e 67 20  ssing operating
  00000070  73 79 73 74 65 6d 2e 0d 0a 66 60 66 31 d2 bb 00  system...f`f1...
  00000080  7c 66 52 66 50 06 53 6a 01 6a 10 89 e6 66 f7 36  |fRfP.Sj.j...f.6
  00000090  f4 7b c0 e4 06 88 e1 88 c5 92 f6 36 f8 7b 88 c6  .{.........6.{..
  000000a0  08 e1 41 b8 01 02 8a 16 fa 7b cd 13 8d 64 10 66  ..A......{...d.f
  000000b0  61 c3 e8 c4 ff be be 7d bf be 07 b9 20 00 f3 a5  a......}.... ...
  000000c0  c3 66 60 89 e5 bb be 07 b9 04 00 31 c0 53 51 f6  .f`........1.SQ.
  000000d0  07 80 74 03 40 89 de 83 c3 10 e2 f3 48 74 5b 79  ..t...@.......ht[y
  000000e0  39 59 5b 8a 47 04 3c 0f 74 06 24 7f 3c 05 75 22  9Y[.G.<.t.$.<.u"
  000000f0  66 8b 47 08 66 8b 56 14 66 01 d0 66 21 d2 75 03  f.G.f.V.f..f!.u.
  00000100  66 89 c2 e8 ac ff 72 03 e8 b6 ff 66 8b 46 1c e8  f.....r....f.F..
  00000110  a0 ff 83 c3 10 e2 cc 66 61 c3 e8 62 00 4d 75 6c  .......fa..b.Mul
  00000120  74 69 70 6c 65 20 61 63 74 69 76 65 20 70 61 72  tiple active par
  00000130  74 69 74 69 6f 6e 73 2e 0d 0a 66 8b 44 08 66 03  titions...f.D.f.
  00000140  46 1c 66 89 44 08 e8 30 ff 72 13 81 3e fe 7d 55  F.f.D..0.r..>.}U
  00000150  aa 0f 85 06 ff bc fa 7b 5a 5f 07 fa ff e4 e8 1e  .......{Z_......
  00000160  00 4f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65  .Operating syste
  00000170  6d 20 6c 6f 61 64 20 65 72 72 6f 72 2e 0d 0a 5e  m load error...^
  00000180  ac b4 0e 8a 3e 62 04 b3 07 cd 10 3c 0a 75 f1 cd  ....>b.....<.u..
  00000190  18 f4 eb fd 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01  ................
  000001c0  01 00 0b fe 7f 00 3f 00 00 00 82 ff 3e 00 00 00  ......?.....>...
  000001d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa  ..............U.

Releasing interface 0...
Closing device...

3) libusb0.sys --> works fine, with one warning message

d:\work\libusbx\libusbx\x64\Release\examples>xusb.exe -k 10bb:5180
Using libusbx v1.0.12.10556

Opening device...
bus: 2, port path from HCD: 4
speed: 480 Mbit/s (USB HighSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 10BB:5180
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00

Claiming interface 0...

Reading string descriptors:
   String (0x01): "Generic"
   String (0x02): "Flash Disk"
libusbx: error [winusbx_submit_control_transfer] ControlTransfer failed: [31] A
device attached to the system is not functioning.
Reading Max LUN:
   Max LUN = 0
Sending Inquiry:
   sent 6 CDB bytes
   received 36 bytes
   VID:PID:REV "Generic ":"USB Flas":"1.00"
   Mass Storage Status: 00 (Success)
Reading Capacity:
   sent 10 CDB bytes
   received 8 bytes
   Max LBA: 003F17FF, Block Size: 00000200 (1.97 GB)
   Mass Storage Status: 00 (Success)
Attempting to read 512 bytes:
   sent 10 CDB bytes
   READ: received 512 bytes
   Mass Storage Status: 00 (Success)

  00000000  fa 31 c0 8e d8 8e d0 bc 00 7c 89 e6 06 57 8e c0  .1.......|...W..
  00000010  fb fc bf 00 06 b9 00 01 f3 a5 ea 1f 06 00 00 52  ...............R
  00000020  52 b4 41 bb aa 55 31 c9 30 f6 f9 cd 13 72 13 81  R.A..U1.0....r..
  00000030  fb 55 aa 75 0d d1 e9 73 09 66 c7 06 8d 06 b4 42  .U.u...s.f.....B
  00000040  eb 15 5a b4 08 cd 13 83 e1 3f 51 0f b6 c6 40 f7  ..Z......?Q...@.
  00000050  e1 52 50 66 31 c0 66 99 e8 66 00 e8 21 01 4d 69  .RPf1.f..f..!.Mi
  00000060  73 73 69 6e 67 20 6f 70 65 72 61 74 69 6e 67 20  ssing operating
  00000070  73 79 73 74 65 6d 2e 0d 0a 66 60 66 31 d2 bb 00  system...f`f1...
  00000080  7c 66 52 66 50 06 53 6a 01 6a 10 89 e6 66 f7 36  |fRfP.Sj.j...f.6
  00000090  f4 7b c0 e4 06 88 e1 88 c5 92 f6 36 f8 7b 88 c6  .{.........6.{..
  000000a0  08 e1 41 b8 01 02 8a 16 fa 7b cd 13 8d 64 10 66  ..A......{...d.f
  000000b0  61 c3 e8 c4 ff be be 7d bf be 07 b9 20 00 f3 a5  a......}.... ...
  000000c0  c3 66 60 89 e5 bb be 07 b9 04 00 31 c0 53 51 f6  .f`........1.SQ.
  000000d0  07 80 74 03 40 89 de 83 c3 10 e2 f3 48 74 5b 79  ..t...@.......ht[y
  000000e0  39 59 5b 8a 47 04 3c 0f 74 06 24 7f 3c 05 75 22  9Y[.G.<.t.$.<.u"
  000000f0  66 8b 47 08 66 8b 56 14 66 01 d0 66 21 d2 75 03  f.G.f.V.f..f!.u.
  00000100  66 89 c2 e8 ac ff 72 03 e8 b6 ff 66 8b 46 1c e8  f.....r....f.F..
  00000110  a0 ff 83 c3 10 e2 cc 66 61 c3 e8 62 00 4d 75 6c  .......fa..b.Mul
  00000120  74 69 70 6c 65 20 61 63 74 69 76 65 20 70 61 72  tiple active par
  00000130  74 69 74 69 6f 6e 73 2e 0d 0a 66 8b 44 08 66 03  titions...f.D.f.
  00000140  46 1c 66 89 44 08 e8 30 ff 72 13 81 3e fe 7d 55  F.f.D..0.r..>.}U
  00000150  aa 0f 85 06 ff bc fa 7b 5a 5f 07 fa ff e4 e8 1e  .......{Z_......
  00000160  00 4f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65  .Operating syste
  00000170  6d 20 6c 6f 61 64 20 65 72 72 6f 72 2e 0d 0a 5e  m load error...^
  00000180  ac b4 0e 8a 3e 62 04 b3 07 cd 10 3c 0a 75 f1 cd  ....>b.....<.u..
  00000190  18 f4 eb fd 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01  ................
  000001c0  01 00 0b fe 7f 00 3f 00 00 00 82 ff 3e 00 00 00  ......?.....>...
  000001d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  000001f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa  ..............U.

Releasing interface 0...
Closing device...

4) libusbk.sys --> does not work well.
d:\work\libusbx\libusbx\x64\Release\examples>xusb.exe -k 10bb:5180
Using libusbx v1.0.12.10556

Opening device...
bus: 2, port path from HCD: 4
speed: 480 Mbit/s (USB HighSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 10BB:5180
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00

Claiming interface 0...

Reading string descriptors:
   String (0x01): "Generic"
   String (0x02): "Flash Disk"
Reading Max LUN:
   Max LUN = 0
Sending Inquiry:
   sent 6 CDB bytes
libusbx: error [windows_transfer_callback] detected I/O error: [1784] The suppli
ed user buffer is not valid for the requested operation.
   LIBUSB_ERROR_IO
   LIBUSB_ERROR_IO
libusbx: warning [libusb_exit] application left some devices open


-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to