Hi,

I'm attempting to get started on a new driver for a fingerprint sensor.

I've sniffed some data but there are a few things in the logs which are 
confusing.

The descriptor of the interface I'm working with:

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0



URB 12 (see attachment) has RequestTypeReservedBits set to 0x40. With other devices I usually see this as 0 (even though the actual RequestType would be 0x40). What does this mean? I guess its irrelevant.

URB 13 is the more interesting one.

It deals with endpoint 0x82, which the descriptor shows as a Bulk In endpoint, but the log shows 64kb of data being sent to this endpoint with direction *out*.

And the response isn't recieved instantly either (almost like it is an interrupt endpoint?) - about 20 more URBs bounce around before URB 13 comes back. When it comes back, it has direction *in* and also comes with 64kb of data.

Is this non-standard behaviour, or do I need to read more about USB to get my head around this? The behaviour that I'm familiar with on other devices is where an urb is sent to a bulk in endpoint with no data and direction in, and a result is recieved immediately after with direction in and a payload of data.

Thanks,
Daniel
[112 ms]  >>>  URB 12 going down  >>> 
-- URB_FUNCTION_VENDOR_DEVICE:
  TransferFlags          = 00000000 (USBD_TRANSFER_DIRECTION_OUT, 
~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00000001
  TransferBuffer       = 8231fee4
  TransferBufferMDL    = 00000000
    00000000: 00
  UrbLink                 = 00000000
  RequestTypeReservedBits = 00000040
  Request                 = 00000004
  Value                   = 0000004e
  Index                   = 00000000
[114 ms] UsbSnoop - MyInternalIOCTLCompletion(f890fdb0) : fido=81d4fd28, 
Irp=8220f008, Context=81bbdb98, IRQL=2
[114 ms]  <<<  URB 12 coming back  <<< 
-- URB_FUNCTION_CONTROL_TRANSFER:
  PipeHandle           = 81c19c98
  TransferFlags        = 0000000a (USBD_TRANSFER_DIRECTION_OUT, 
USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00000001
  TransferBuffer       = 8231fee4
  TransferBufferMDL    = 81d12858
  UrbLink              = 00000000
  SetupPacket          =
    00000000: 40 04 4e 00 00 00 01 00
[114 ms] UsbSnoop - DispatchAny(f890e610) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[114 ms] UsbSnoop - MyDispatchInternalIOCTL(f890fe80) : fdo=81d25e28, 
Irp=81a9e2a8, IRQL=2
[127 ms]  >>>  URB 13 going down  >>> 
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
  PipeHandle           = 81a60a04 [endpoint 0x00000082]
  TransferFlags        = 00000002 (USBD_TRANSFER_DIRECTION_OUT, 
USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00010000
  TransferBuffer       = 81b270a4
  TransferBufferMDL    = 00000000
    00000000: 10 40 80 01 21 01 00 08 bf 82 f3 c0 00 10 01 c7
    00000010: 02 50 00 01 02 31 01 01 00 01 02 31 00 01 02 6c
    00000020: 00 00 10 40 80 01 5a 00 00 00 bf 82 30 00 00 00
    00000030: 38 26 05 55 02 5a 05 73 00 00 05 01 18 40 10 31
    00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


snip loads of data (mostly zero)

    0000ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000ff90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000ffa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000ffb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000ffc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000ffd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00
    0000ffe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0000fff0: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00
  UrbLink              = 00000000
[127 ms] UsbSnoop - DispatchAny(f890e610) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[127 ms] UsbSnoop - MyDispatchInternalIOCTL(f890fe80) : fdo=81d25e28, 
Irp=81b46bd0, IRQL=2
[127 ms]  >>>  URB 14 going down  >>> 


...20 urbs later...



[222 ms]  <<<  URB 34 coming back  <<< 
-- URB_FUNCTION_CONTROL_TRANSFER:
  PipeHandle           = 81c19c98
  TransferFlags        = 0000000a (USBD_TRANSFER_DIRECTION_OUT, 
USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00000001
  TransferBuffer       = 81d266bc
  TransferBufferMDL    = 81b693e8
  UrbLink              = 00000000
  SetupPacket          =
    00000000: 40 04 20 00 00 00 01 00
[223 ms] UsbSnoop - DispatchAny(f890e610) : IRP_MJ_PNP 
(IRP_MN_QUERY_DEVICE_RELATIONS)
[223 ms] UsbSnoop - MyDispatchPNP(f8910ee0) : IRP_MJ_PNP 
(IRP_MN_QUERY_DEVICE_RELATIONS)
[486 ms] UsbSnoop - MyInternalIOCTLCompletion(f890fdb0) : fido=81d4fd28, 
Irp=81a9e2a8, Context=81b64800, IRQL=2
[498 ms]  <<<  URB 13 coming back  <<< 
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
  PipeHandle           = 81a60a04 [endpoint 0x00000082]
  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN, 
USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00010000
  TransferBuffer       = 81b270a4
  TransferBufferMDL    = 81d12858
    00000000: 10 40 80 01 21 01 00 08 bf 82 f3 c0 00 10 01 c7
    00000010: 02 50 00 01 02 31 01 01 00 01 02 31 00 01 02 6c
    00000020: 00 00 10 40 80 01 5a 00 00 00 bf 82 30 00 00 00
    00000030: 38 26 05 55 02 5a 05 73 00 00 05 01 18 40 10 31
    00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

snip

    0000fff0: 06 00 00 05 07 00 04 00 00 00 04 00 00 00 02 00
  UrbLink              = 00000000


Reply via email to