> Hmm, you shouldn't be getting the "did not claim interface" errors...does
> your device by chance have more than one configuration and/or multiple
> interface alternate settings?
>
> As far as the data, you can pass the parameter
> -DJAVAX_USB_MSG_LEVEL=DEBUG3 to java to enable JNI debugging, which should
> show you all the data going back and forth...do you see the incoming data
> there?  Also, are you submitting an empty (correctly-sized) buffer to the
> input pipe?  You have to do that (submit a buffer) to actually get data.
> And if you are expecting an amount of data in a multiple of
> bMaxPacketSize, use a buffer no larger than that.  For example if you
> expect exactly bMaxPacketSize bytes, use a buffer exactly that size.
> Otherwise the buffer may remain "pending" waiting to be filled up with
> more data.

Hi,
thanks for that fast response.
Ok, I passed the -DJAVAX_USB_MSG_LEVEL=DEBUG3 to java and here is the output 
of my program: 

Benjamin:/home/benni/jbproject/jRDC-tool/classes # java 
-DJAVAX_USB_MSG_LEVEL=DEBUG3 jrdc.rdc7
LOG:[hotplug](2) 
JavaxUsbTopologyListener.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeTopologyListener[58]
 
Got topology change event.
LOG:[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[116] Building device 
/proc/bus/usb/001/001
LOG:[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[141] Device is hub 
with 2 ports
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[156] Device speed is 
12 Mbps
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_config[225] Building config 1
LOG:[hotplug](4) JavaxUsbActive.c.isConfigActive[259] Checking config 1 using 
GET_CONFIGURATION standard request.
LOG:[hotplug](4) JavaxUsbActive.c.config_ask_device[197] Active device 
configuration is 1
LOG:[hotplug](4) JavaxUsbActive.c.isConfigActive[261] Device returned active.
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[287] Building 
interface 0
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[287] Checking 
interface 0 setting 0 using GET_INTERFACE standard request.
LOG:[hotplug](1) JavaxUsbActive.c.interface_ask_device[239] Could not get 
active interface 0 setting from device : -16
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[289] Device 
returned failure.
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[294] Checking 
interface 0 setting 0 using /proc/bus/usb/devices.
LOG:[hotplug](4) JavaxUsbActive.c.interface_use_devices_file[112] Checking 
/proc/bus/usb/devices
LOG:[hotplug](4) JavaxUsbActive.c.interface_use_devices_file[134] Found 
section for device Bus=01/Dev#=  1
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[296] 
/proc/bus/usb/devices returned inactive.
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[302] Building 
endpoint 0x81
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[189] Building device 5 
attached to port 1
LOG:[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[116] Building device 
/proc/bus/usb/001/005
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[156] Device speed is 
12 Mbps
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_config[225] Building config 1
LOG:[hotplug](4) JavaxUsbActive.c.isConfigActive[259] Checking config 1 using 
GET_CONFIGURATION standard request.
LOG:[hotplug](4) JavaxUsbActive.c.config_ask_device[197] Active device 
configuration is 1
LOG:[hotplug](4) JavaxUsbActive.c.isConfigActive[261] Device returned active.
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[287] Building 
interface 0
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[287] Checking 
interface 0 setting 0 using GET_INTERFACE standard request.
LOG:[hotplug](4) JavaxUsbActive.c.interface_ask_device[241] Active interface 0 
setting is 0
LOG:[hotplug](4) JavaxUsbActive.c.isInterfaceSettingActive[289] Device 
returned active.
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[302] Building 
endpoint 0x82
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[302] Building 
endpoint 0x02
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[302] Building 
endpoint 0x81
LOG:[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[302] Building 
endpoint 0x01
com.ibm.jusb.UsbHubImp
Found Ricoh RDC-7
LOG:[default](3) JavaxUsb.h.open_device[216] Opening node 
/proc/bus/usb/001/005
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] 
Got Request
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[124] Submitting Request.
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[142] Submitting 
ClaimInterface Request.
LOG:[default](2) JavaxUsbInterfaceRequest.c.claim_interface[46] Claiming 
interface 0
LOG:[default](2) JavaxUsbInterfaceRequest.c.claim_interface[55] Claimed 
interface 0
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] 
Completed Request
Endpoint1(in): Direction IN, transfer type bulk
Endpoint2(out): Direction OUT, transfer type bulk
Pipe IN opened
Pipe OUT opened
Frame[] = 10 02 31 03 00 00 00 10 03 c6 a7 05 00
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] 
Got Request
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[124] Submitting Request.
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[128] Submitting Pipe 
Request.
LOG:[xfer](4) JavaxUsbPipeRequest.c.pipe_request[63] Submitting URB
LOG:[xfer](5) JavaxUsb.h.debug_urb[275] bulk_pipe_request : URB endpoint = 2
LOG:[xfer](5) JavaxUsb.h.debug_urb[276] bulk_pipe_request : URB status = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[277] bulk_pipe_request : URB signal = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[278] bulk_pipe_request : URB buffer length 
= 13
LOG:[xfer](5) JavaxUsb.h.debug_urb[279] bulk_pipe_request : URB actual length 
= 0
LOG:[xfer](2) JavaxUsb.h.debug_urb[285] bulk_pipe_request : URB data = 10 02 
31 03 00 00 00 10 03 c6 a7 05 00
LOG:[xfer](4) JavaxUsbPipeRequest.c.pipe_request[76] Submitted URB
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] 
Completed Request
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[90] 
Got completed URB
LOG:[xfer](4) JavaxUsbPipeRequest.c.complete_pipe_request[114] Completing URB.
LOG:[xfer](5) JavaxUsb.h.debug_urb[275] complete_pipe_request : URB endpoint = 
2
LOG:[xfer](5) JavaxUsb.h.debug_urb[276] complete_pipe_request : URB status = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[277] complete_pipe_request : URB signal = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[278] complete_pipe_request : URB buffer 
length = 13
LOG:[xfer](5) JavaxUsb.h.debug_urb[279] complete_pipe_request : URB actual 
length = 13
LOG:[xfer](2) JavaxUsb.h.debug_urb[285] complete_pipe_request : URB data = 10 
02 31 03 00 00 00 10 03 c6 a7 05 00
LOG:[xfer](4) JavaxUsbPipeRequest.c.complete_pipe_request[127] Completed URB.
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[94] 
Finished completed URB

Waiting for response[], size: 2 <-- here I expect 10 06 as incoming data, 
because this the acknowledge
isClaimed() = true
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] 
Got Request
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[124] Submitting Request.
LOG:[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[128] Submitting Pipe 
Request.
LOG:[xfer](4) JavaxUsbPipeRequest.c.pipe_request[63] Submitting URB
LOG:[xfer](5) JavaxUsb.h.debug_urb[275] bulk_pipe_request : URB endpoint = 82
LOG:[xfer](5) JavaxUsb.h.debug_urb[276] bulk_pipe_request : URB status = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[277] bulk_pipe_request : URB signal = 0
LOG:[xfer](5) JavaxUsb.h.debug_urb[278] bulk_pipe_request : URB buffer length 
= 2
LOG:[xfer](5) JavaxUsb.h.debug_urb[279] bulk_pipe_request : URB actual length 
= 0
LOG:[xfer](2) JavaxUsb.h.debug_urb[285] bulk_pipe_request : URB data = 00 00
LOG:[xfer](4) JavaxUsbPipeRequest.c.pipe_request[76] Submitted URB
LOG:[xfer](4) 
JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] 
Completed Request
Getötet
Benjamin:/home/benni/jbproject/jRDC-tool/classes #

response[] is an empty buffer, created with "byte[] response = new byte[2];" 
(my bMaxPacketSize is 16),
this should be ok, isn't it?

also myConfig.getUsbInterfaces().size()=1 and  
dev.getUsbConfigurations().size()=1, 
so that you mean with "does your device by chance have more than one 
configuration
and/or multiple interface alternate settings?"

I also tested also another usb implementation for java, jusb, and got the same 
result:
I can send data to the device, but not get some.

So, what can I do? 




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
javax-usb-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to