I have to assume the device is really not sending the first response you are expecting. Without knowing the device protocol, I have no idea why your device would skip that.
If you can get a USB bus trace, you could check if the device was actually sending the first response (and so show that javax.usb is dropping/losing the response). However I think it's much more likely the device just isn't sending that response. On Mon, 2 May 2005, Dmitri Kostioukov wrote: >Quoting Dan Streetman <[EMAIL PROTECTED]>: > >> >> If it's an interrupt pipe then you have to submit your buffer before you >> send the command down. Interrupt pipes are only polled when you pass a > >I definitely do. > >> buffer to the USB subsystem to use (i.e. to put poll data in). You need >> to submit several buffers so the USb subsystem always has a buffer to put >> data in, and can thus maintain the spec-required polling interval for >> interrupt endpoints. > >What I do is start a separate threat which does nothing but submits the >in-buffer but just in case it could be the root of the problem, I modified it >to >start multiple threads instead. The problem still exists. The output is below: > >Device found >Listening >Listening >Listening >Listening >Listening >Listening >Listening >Listening >Listening >Listening >Listening >Out: 8b 0 0 0 0 0 0 0 >Sent >In: 0 4 0 0 0 0 0 0 >Done >Out: 8b 0 0 0 0 0 0 0 >Sent >In: 0 0 3 0 0 1 1 2 >Done >In: 0 4 0 0 0 0 0 0 >Done > > >> So try submitting the in-direction buffer first. Then send out the >> command, and you should get the expected packet back. Don't forget to not >> let the USB subsystem run out of in-direction buffers. >> >> On Fri, 29 Apr 2005, Dmitri Kostioukov wrote: >> >> >I've been trying to program x10 usb home automation interface and I always >> have >> >this problem - the first device response is always missing after my program >> >starts up. I see the same behavior with 3 different devices from 2 >> different >> >manufacturers. There's no special processing I do for the first response - >> they >> >all follow the same code path. As you can see from the enclosed log, I send >> out >> >the same command (0x8b) but the first response is missing. I can see only >> the >> >second 8 byte response. However the second request produces a correct >> response. >> >Everything else from that point on work fine. It might be something I do >> >incorrectly, of course, but I don't think so. Is there any other way to >> >troubleshoot it? Here's the trace: >> > >> >Device found >> >[default](2) JavaxUsb.h.open_device[216] Opening node /proc/bus/usb/001/043 >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[145] Submitting >> ClaimInterface >> >Request. >> >[default](3) JavaxUsbInterfaceRequest.c.claim_interface[87] Claiming >> interface 0 >> >[default](3) JavaxUsbInterfaceRequest.c.claim_interface[96] Claimed >> interface 0 >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >Listening >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[131] Submitting Pipe Request. >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB >> >[default](2) JavaxUsbKernel.c.setKernelVersion[45] Kernel version string >> 2.4.30 >> >parsed as 2.4.30 >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >Out: 8b 0 0 0 0 0 0 0 >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[131] Submitting Pipe Request. >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[91] >> >Got completed URB >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[113] Completing URB. >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[126] Completed URB. >> >Sent >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[95] >> >Finished completed URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[91] >> >Got completed URB >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[113] Completing URB. >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[126] Completed URB. >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[95] >> >Finished completed URB >> >In: 0 0 0 0 0 0 0 0 >> >Done >> >Listening >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[131] Submitting Pipe Request. >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >Out: 8b 0 0 0 0 0 0 0 >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[131] Submitting Pipe Request. >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[91] >> >Got completed URB >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[113] Completing URB. >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[126] Completed URB. >> >Sent >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[95] >> >Finished completed URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[91] >> >Got completed URB >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[113] Completing URB. >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[126] Completed URB. >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[95] >> >Finished completed URB >> >In: 0 0 35 0 0 1 1 2 >> >Done >> >Listening >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[75] >> >Got Request >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[127] Submitting Request. >> >[xfer](5) JavaxUsbDeviceProxy.c.submitRequest[131] Submitting Pipe Request. >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB >> >[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[78] >> >Completed Request >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[91] >> >Got completed URB >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[113] Completing URB. >> >[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[126] Completed URB. >> >[xfer](2) >> >JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[95] >> >Finished completed URB >> >In: 0 0 0 0 0 0 0 0 >> >Done >> > >> > >> > >> >------------------------------------------------------- >> >SF.Net email is sponsored by: Tell us your software development plans! >> >Take this survey and enter to win a one-year sub to SourceForge.net >> >Plus IDC's 2005 look-ahead and a copy of this survey >> >Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix >> >_______________________________________________ >> >javax-usb-devel mailing list >> >javax-usb-devel@lists.sourceforge.net >> >https://lists.sourceforge.net/lists/listinfo/javax-usb-devel >> > >> >> -- >> Dan Streetman >> [EMAIL PROTECTED] >> --------------------- >> 186,272 miles per second: >> It isn't just a good idea, it's the law! >> > > -- Dan Streetman [EMAIL PROTECTED] --------------------- 186,272 miles per second: It isn't just a good idea, it's the law! ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel