Hello,

Brian Weischedel is the maintainer of javax.usb now, I am not directly
involved in it anymore.  You should send future questions to the mailing
list and/or him.

To address below, I don't quite understand what you are asking, although
I'll point out what may be a key misunderstanding:

>The device has one control channel and it's type is interrupt.

Actually all USB devices have a "Default Control Pipe" (DCP), which is
almost always the only Control-type pipe/endpoint on the device.  Many
devices also have other pipes/endpoints.  HID-type devices, which it sounds
like may be what you have, usually have a single interrupt-in pipe in
addition to the DCP (although the HID specification allows for more
interrupt pipes).

>In this topic I found that I have to send a SET_Request message ,
>after this I can get the data with Get_Request command.

Those are Control-type commands; you would not use those on the interrupt
pipe.  You have to execute those commands on the DCP.

>I have analyzed
>the log from the USB Sniffer and I didnt find this conversation steps.
>I found a command witch has stated with 21 hex but I has not been
>followed with a1 command.

You have to send both the commands yourself.  You create a UsbControlIrp
with the appropriate setup packet fields, then submit it to the UsbDevice.
 First submit the SET command, then the GET command.  Also, some devices
refuse to operate unless their interrupt-in endpoint is being polled so you
should make sure to always have an outstanding UsbIrp waiting for data on
the device's interrupt in endpoints.

If you have more questions, reply back to the mailing list and hopefully
Brian and/or someone else on the list can help.


2010/11/30 Tóth András <ma...@sch.bme.hu>

> Excuse me Mr Streetman
>
> I'm a PHD student at Budapest University of Technology and Economics in
> Hungary. I'm working on a Human Scale device USB communication protocol in
> an AAL project. We would like to use a public scale device of Beurer Inc,
> but this device has no datasheet about it's USB protocol. The first step of
> its method is measuring the humen weight and fat percent and so on. After
> the measure phase we can connect the device to the PC via USB port. The
> scale device was packed together with an MFC program witch can read all of
> the information about the patient. At university I have the task to connect
> this device to Linux. The main plan was that to develop a data reading
> method witch can realize the scale device has connected to the device and
> start the reading process at the PC.
>
> We are working in OSGi system, but i would like to prove a solution with a
> simple javax JSR80 JAVA application first. If it can solve this problem we
> can implement it in OSGi environment. So as I mentioned I try to implement
> it with javax API. I have a lot of log file about the communication. I used
> google to get some information, there I have met your name.
>
> As read your experiences and help for the mates on the Internet. I can
> solve the communication between the PC and Scale device. I can send the
> control commands to the device and a have got answers too. But I cant read
> the stored data.
>
> The device has one control channel and it's type is interrupt. In this
> topic I found that I have to send a SET_Request message , after this I can
> get the data with Get_Request command. I have analyzed the log from the USB
> Sniffer and I didnt find this conversation steps. I found a command witch
> has stated with 21 hex but I has not been followed with a1 command.
>
> Please Excuse me for disturbing you. I would be very thankful, if you can
> help me. i can't understand how indicate the application the scale device to
> start sending data. The other problem is, I can't guess what should I do in
> JSR80 API to copy this method.  I will copy a part of my log to the end of
> my letter. Can you help me to get the answer witch commands can be good for
> getting the magic informations or how can I make the scale device to send
> those?
>
> Tank you very much
> András Tóth
> PhD Student
>
> Sniffer log :
>
> [65 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=00000000,
> Irp=843c3008, Context=849d3b70, IRQL=0
> [65 ms] <<<  URB 4 coming back <<<
> -- URB_FUNCTION_SELECT_CONFIGURATION:
>  ConfigurationDescriptor = 0x847f34f0 (configure)
>  ConfigurationDescriptor : bLength             = 9
>  ConfigurationDescriptor : bDescriptorType     = 0x00000002
>  ConfigurationDescriptor : wTotalLength        = 0x00000022
>  ConfigurationDescriptor : bNumInterfaces      = 0x00000001
>  ConfigurationDescriptor : bConfigurationValue = 0x00000001
>  ConfigurationDescriptor : iConfiguration      = 0x00000000
>  ConfigurationDescriptor : bmAttributes        = 0x00000080
>  ConfigurationDescriptor : MaxPower            = 0x00000032
>  ConfigurationHandle     = 0x8457aaf8
>  Interface[0]: Length            = 36
>  Interface[0]: InterfaceNumber   = 0
>  Interface[0]: AlternateSetting  = 0
>  Interface[0]: Class             = 0x00000003
>  Interface[0]: SubClass          = 0x00000000
>  Interface[0]: Protocol          = 0x00000000
>  Interface[0]: InterfaceHandle   = 0x84a9ac50
>  Interface[0]: NumberOfPipes     = 1
>  Interface[0]: Pipes[0] : MaximumPacketSize = 0x00000008
>  Interface[0]: Pipes[0] : EndpointAddress   = 0x00000081
>  Interface[0]: Pipes[0] : Interval          = 0x00000008
>  Interface[0]: Pipes[0] : PipeType          = 0x00000003
> (UsbdPipeTypeInterrupt)
>  Interface[0]: Pipes[0] : PipeHandle        = 0x84a9ac6c
>  Interface[0]: Pipes[0] : MaxTransferSize   = 0x00001000
>  Interface[0]: Pipes[0] : PipeFlags         = 0x00000000
>
>
>
> [65 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [65 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) : fdo=843d8bf8,
> Irp=843c3008, IRQL=0
> [65 ms] >>>  URB 5 going down >>>
> -- URB_FUNCTION_CLASS_INTERFACE:
>  TransferFlags          = 00000000 (USBD_TRANSFER_DIRECTION_OUT,
> ~USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000000
>  TransferBuffer       = 00000000
>  TransferBufferMDL    = 00000000
>
>    no data supplied
>  UrbLink                 = 00000000
>  RequestTypeReservedBits = 00000022
>  Request                 = 0000000a
>  Value                   = 00000000
>  Index                   = 00000000
>
>
>
>
> [68 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=00000000,
> Irp=843c3008, Context=849d3b70, IRQL=2
> [68 ms] <<<  URB 5 coming back <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 8af29258
>  TransferFlags        = 0000000a (USBD_TRANSFER_DIRECTION_OUT,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000000
>  TransferBuffer       = 00000000
>  TransferBufferMDL    = 00000000
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 21 0a 00 00 00 00 00 00               !!!!!!!!!!!!!!!!!! JSR80
> API don't enables this  !!!!!!!!!!!!!!!!!!!!!!
>
>
>
>
> [68 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [68 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) : fdo=843d8bf8,
> Irp=848302f0, IRQL=0
> [68 ms] >>>  URB 6 going down >>>
> -- URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE:
>  TransferBufferLength = 00000075
>  TransferBuffer       = 87c28398
>  TransferBufferMDL    = 00000000
>  Index                = 00000000
>  DescriptorType       = 00000022 (<illegal descriptor type!>)
>  LanguageId           = 00000000
>
>
>
>
> [98 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=00000000,
> Irp=848302f0, Context=849d3b70, IRQL=2
> [98 ms] <<<  URB 6 coming back <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 8af29258
>  TransferFlags        = 0000000b (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000035
>  TransferBuffer       = 87c28398
>  TransferBufferMDL    = 843b7630
>    00000000: 06 00 ff 09 01 a1 01 15 00 26 ff 00 19 08 29 0f
>    00000010: 95 08 75 08 b1 02 15 00 26 ff 00 19 10 29 17 95
>    00000020: 08 75 08 81 02 15 00 26 ff 00 19 80 29 ff 95 80
>    00000030: 75 08 91 02 c0                       !!!!!!!!!!!!!!!!!! I have
> got this answer in linux too for the setup packet (81 06 00 22 00 00 75 00)
>  !!!!!!!!!!!!!!!!!!!!!!
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 81 06 00 22 00 00 75 00
> !!!!!!!!!!!!!!!!!!  It's working  !!!!!!!!!!!!!!!!!!!!!!
>
>
>
>
>
> [98 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_CAPABILITIES)
> [98 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_CAPABILITIES)
> [98 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_PNP_DEVICE_STATE)
> [98 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_PNP_DEVICE_STATE)
> [98 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
> [98 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
> [98 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_ID)
> [98 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_ID)
> [99 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_ID)
> [99 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_ID)
>
>
>
> [99 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [99 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) : fdo=843d8bf8,
> Irp=843c3008, IRQL=0
> [99 ms] >>>  URB 7 going down >>>
> -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
>  PipeHandle           = 84a9ac6c [endpoint 0x00000081]
>  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 8adf6620
>  TransferBufferMDL    = 00000000
>  UrbLink              = 00000000                !!!!!!!!!!!!!!!!!!!  The
> sniffer has sad that this 7th package or message has indicated the first
> byte of the information. I can't understand why and how!
> !!!!!!!!!!!!!!!!!!!!!!!!!
>
>
>
> [99 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [99 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) : fdo=843d8bf8,
> Irp=848302f0, IRQL=0
> [99 ms] >>>  URB 8 going down >>>
> -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
>  PipeHandle           = 84a9ac6c [endpoint 0x00000081]
>  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 87c37818
>  TransferBufferMDL    = 00000000
>  UrbLink              = 00000000
> [99 ms] UsbSnoop - FilterDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
> [99 ms] UsbSnoop - FdoHookDispatchPnp(8d63e45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
>
>
>
>
> [14631 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [14631 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) :
> fdo=843d8bf8, Irp=84787008, IRQL=0
> [14631 ms] >>>  URB 9 going down >>>
> -- URB_FUNCTION_CLASS_INTERFACE:
>  TransferFlags          = 00000000 (USBD_TRANSFER_DIRECTION_OUT,
> ~USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 848c96f1
>  TransferBufferMDL    = 00000000
>    00000000: 10 00 00 00 00 00 00 00
>  UrbLink                 = 00000000
>  RequestTypeReservedBits = 00000022
>  Request                 = 00000009
>  Value                   = 00000300
>  Index                   = 00000000
>
>
>
> [14636 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=8442e030,
> Irp=84787008, Context=8486d008, IRQL=2
> [14636 ms] <<<  URB 9 coming back <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 8af29258
>  TransferFlags        = 0000000a (USBD_TRANSFER_DIRECTION_OUT,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 848c96f1
>  TransferBufferMDL    = 84a95348
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 21 09 00 03 00 00 08 00       !!!!!!!!!!!!!!!!!! It's good but
> the response has only eight piece of 0x00 hex in linux
> !!!!!!!!!!!!!!!!!!!!!!
>
>
>
>
> [14651 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=8442e030,
> Irp=843c3008, Context=849d3b70, IRQL=2
> [14651 ms] <<<  URB 7 coming back <<<
> -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
>  PipeHandle           = 84a9ac6c [endpoint 0x00000081]
>  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 8adf6620
>  TransferBufferMDL    = 843d3eb8
>    00000000: 03 a2 03 90 03 8a 00 00    !!!!!!!!!!!!!!!!!!!  This is the
> first eight byte of the measeured information  !!!!!!!!!!!!!!!!!!!!!!!!!
>  UrbLink              = 00000000
>
>
>
>
> [14651 ms] UsbSnoop - FilterDispatchAny(8d639fd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [14651 ms] UsbSnoop - FdoHookDispatchInternalIoctl(8d63a1ea) :
> fdo=843d8bf8, Irp=843c3008, IRQL=2
> [14651 ms] >>>  URB 10 going down >>>
> -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
>  PipeHandle           = 84a9ac6c [endpoint 0x00000081]
>  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 8adf6620
>  TransferBufferMDL    = 00000000
>  UrbLink              = 00000000
>
>
>
> [14659 ms] UsbSnoop - MyInternalIOCTLCompletion(8d63a126) : fido=8442e030,
> Irp=848302f0, Context=844facf0, IRQL=2
> [14659 ms] <<<  URB 8 coming back <<<
> -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
>  PipeHandle           = 84a9ac6c [endpoint 0x00000081]
>  TransferFlags        = 00000003 (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000008
>  TransferBuffer       = 87c37818
>  TransferBufferMDL    = 87c28398
>    00000000: 00 00 00 00 00 00 00 00
>  UrbLink              = 00000000            !!!!!!!!!!!!!!!!!!!  This is
> the second eight byte of the measeured information
>  !!!!!!!!!!!!!!!!!!!!!!!!!
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to