|
From: Christian J. <ja...@st...> - 2013-11-19 10:25:14
|
Hi Toby, I am a little confused. I have two boards trying to run an application, both using bulk transfers. Both boards are running WinCE6. As I understand either the libusbx-call libusb_bulk_transfer() OR libusb_fill_bulk_transfer() is calling the kernel-wrapper-function UkwIssueBulkTransfer, correct (perhaps just one of them)? What's more confusing now, the one eval board running usb 1.1 full speed is working (slowly but...) with this kind of transfers. As soon as I switch to the other board with a high speed USB interface The following error message appears: libusbx: error [] UkwIssueBulkTransfer failed: error 8 log: o3000_dummy_string: : Unknown error (-11) log: o3000_dummy_string: : submitted transfer 004F55C0 libusbx: error [] UkwIssueBulkTransfer failed: error 8 log: o3000_dummy_string: : Unknown error (-11) ... and so on for each transfer handler to be set up. As I read in the documentation, that might be a memory problem? But where exactly? A buffer problem? Thanks for your help! Appreciate your support very much! Regards, Christian On 10/03/2013 07:01 PM, Toby Gray wrote: > On 02/10/13 15:37, Christian Jäggi wrote: >> Hi Toby, >> >> > Does your in house camera use isochronous transfers? >> No it just uses Bulk transfers. > > That's good. It should be possible to get it working then. > >> I got another little problem with everything to get it working... I >> recompiled libusb for my winCE device to implement some printfs to debug >> and see where the problem will occur. > > You shouldn't need to recompile libusb to enable debugging on WinCE. The > following registry key works in the same way as the LIBUSB_DEBUG > environment variable on Linux: > > HKLM\Software\libusb\environment\LIBUSB_DEBUG > > You can also define USE_SYSTEM_LOGGING_FACILITY in msvc/config.h and > then recompile to get the debug output sent to the debug log, which is > useful if your WinCE application isn't console based. > > It is unrelated to your issue, but that does make me wonder if it'd make > sense to add a LIBUSB_DEBUG_SYSTEM_LOG environment variable to allow > runtime control of the above macro. > >> In a simple listdevs.c example even the first step libusb_init(NULL) >> will fail with error code -12 = LIBUSB_ERROR_NOT_SUPPORTED. When I go >> further I see init_dllimports() will cause this return code. Can I so >> assume that ceusbkwrapper isn't installed correctly on my device? > > Yes, you assume correctly. CEUSBKWrapper has two parts to it. The > ceusbkwrapper.dll file is the user-space library for accessing the > driver. The ceusbkwrapperdrv.dll file is the kernel driver. You will > need both in your image for libusb to work. > > The failing init_dllimports() implies that ceusbkwrapper.dll is missing > from your system image. Did you add the lib\ceusbkwrapper.pbpxml > sub-project to platform builder? How did you rebuild the image after > adding the sub-project? > > Can you see a ceusbkwrapper.dll in the windows directory in your image? > >> Some registry entries for my device maybe incorrect? > > It isn't getting that far, but it could be a future problem. If the > registry entries were wrong then you'd be getting a list of 0 USB > devices connected. > >> Perhaps I also should have mentioned our camera does register itself as >> an HID device (InterfaceClass). Is this a problem? > > It'll make your registry configuration more interesting. What you will > need to do is setup the HKLM\Drivers\USB\LoadClients\ entries so that > ceusbkwrapperdrv.dll is the first driver to be given your camera device. > > You will also need to configure the driver to offer the HID interface to > other devices on the system. There are two ways of doing this: > 1) Call libusb_detach_kernel_driver() for the HID interface. The > ceusbkwrapper driver should then pass the HID interface to the HID > driver. WinCE doesn't support (re)attaching the ceusbkwrapper driver, > but it does support detaching. > 2) Add a key to HKLM \Drivers\USB\ClientDrivers\Usb_Kernel_Wrapper > defining a HID interface filter. This will tell ceusbkwrapper to always > automatically detach from the specified interfaces. For HID I believe > you'll want something like: > "InterfaceFilter_HID" = "3:*:*" > Further documentation on this functionality can be found in > drv\ceusbkwrapperdrv.reg > > Regards, > > Toby > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > libusb-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-devel > |