Re: [Libusbx-devel] libusbx 1.0.15 with ASMedia xHCI Controller - some ports don't work

2013-06-10 Thread john
of processes... Does this mean something? FYI, windows device manager sees it on all ports, and Zadig sees it in its list on all ports. Regards, John -- This SF.net email is sponsored by Windows: Build for Window

[Libusbx-devel] libusbx 1.0.15 with ASMedia xHCI Controller - some ports don't work

2013-06-09 Thread john
d these other controllers are fully working with the latest controller drivers and libusbx 1.0.15 release. Let me know if you need any other information about this problem. - John -- How ServiceNow helps IT people trans

Re: [Libusbx-devel] asynchronous code in multi-threading app

2012-10-16 Thread john smith
1:08 AM, Tim Roberts wrote: > john smith wrote: > > > > But I got another "performance issue" I need your help again. > > > > My test app is doing a loop, it seem that every time it loops, it > > takes SIGNIFICANT SLOWER than last time, if you look at

Re: [Libusbx-devel] asynchronous code in multi-threading app

2012-10-10 Thread John
Tim, This is the device that is working on Windows and has been in production for years (with Windows API calles), I am not develop the device, what I am doing is use the device, simple read & write. The exactly the same code work when running in single-threaded app. when look at my libUSB code,

[Libusbx-devel] libusb compiles file, but got compile error when compiling my code with libusb.h under g++

2012-09-26 Thread John Chen
b.h:634:32: error: expected ';' at end of member declaration /media/sf_Source/ThirdParty/libusbx/libusb/libusb.h:634:42: error: expected identifier before ';' token any ideas? thx John -- How fast is your

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-15 Thread John Chen
K (v3.0.4.0),libusb-win32 (v1.2.5.0), in both cases, I can not even open the device, the error message is LIBUSB_ERROR_NOT_SUPPORTED from libusb_open. On Fri, Sep 14, 2012 at 4:51 PM, Pete Batard wrote: > On 2012.09.14 04:42, John Chen wrote: > > Pete, > > I was wondering where

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-13 Thread John Chen
My OS is windows 7 64 bit. On Thu, Sep 13, 2012 at 1:10 AM, Xiaofan Chen wrote: > On Thu, Sep 13, 2012 at 12:18 PM, John Chen wrote: > > The timeout value for libusb_fill_bulk_transfer used to be 3 seconds, > now > > I set it to 15 seconds, it does not make any differenc

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
The timeout value for libusb_fill_bulk_transfer used to be 3 seconds, now I set it to 15 seconds, it does not make any difference. On Wed, Sep 12, 2012 at 9:00 PM, David Grant wrote: > On Wed, Sep 12, 2012 at 8:49 PM, John Chen wrote: > >> This approach just crash the app:

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
hronous device I/O specifically, the following code: if (!WinUsb_AbortPipe(winusb_handle, transfer->endpoint)) { in windows_usb.c crash the app. strangely enough, the catch (...) does not catch the exception. Please advice. Thx On Wed, Sep 12, 2012 at 4:50 PM, John Chen wrote: > Oops! I

[Libusbx-devel] Urgent! Call libusb_handle_events_timeout_completed in multiple threading Asynchronous device I/O crash the application,

2012-09-12 Thread John Chen
Hi, I have the following code: DWORD WINAPI LibUSBDevice::LoopEvent(void* lpParam) { while (RunLoopCode) { try { Sleep(100); struct timeval tv = { 1, 0 }; int completed =0; //cout << "before libusb_handle_events_timeout " << std::endl; int err = libusb_handle_events_timeout_completed(NULL, &tv

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
I will lost 200 ms or whatever time I need to wait, anyway around this? thx On Wed, Sep 12, 2012 at 2:57 PM, David Grant wrote: > > > On Wed, Sep 12, 2012 at 2:35 PM, John Chen wrote: > >> Tim, >> >> If I call the same code with one thread, it works without an

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
ts] poll() 2 fds with timeout in 1000ms [235.716569] [24bc] libusbx: debug [handle_events] Please advice. thx On Wed, Sep 12, 2012 at 2:14 PM, Tim Roberts wrote: > John Chen wrote: > > Tim, I attache the usb debug trace and USB_Trace here. Yes, I did get > > a timeout, but if yo

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
worst than the first Scenario, it stuck even in a very simple case. Any suggestions? thx On Wed, Sep 12, 2012 at 9:49 AM, Tim Roberts wrote: > John Chen wrote: > > Hi, > > My app needs be able to read & write (to different enpoint) at same > > time, and my code is

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
: > > > On Tue, Sep 11, 2012 at 8:45 PM, John Chen wrote: > >> Hi, >> My app needs be able to read & write (to different enpoint) at same >> time, and my code is not working. but if I change the call to Synchronous >> , everything works fine, coul

Re: [Libusbx-devel] asynchronous code in mufti-threading app

2012-09-12 Thread John Chen
no sure what my post is not showing up, I now post it again. On Tue, Sep 11, 2012 at 8:45 PM, John Chen wrote: > Hi, > My app needs be able to read & write (to different enpoint) at same time, > and my code is not working. but if I change the call to Synchronous > , every

[Libusbx-devel] asynchronous code in mufti-threading app

2012-09-11 Thread John Chen
Hi, My app needs be able to read & write (to different enpoint) at same time, and my code is not working. but if I change the call to Synchronous , everything works fine, could any one tell me what I did wrong here? thx CallBackData* userdata=new CallBackData(); userdata->ExitTransfer=false; int

[Libusbx-devel] question on libusb_bulk_transfer and libusb_fill_bulk_transfer

2012-09-06 Thread John Chen
? any advice? Thanks. John -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include end

Re: [Libusbx-devel] LibUSB bulkread always got a TIMEOUT

2012-08-27 Thread John Chen
Also, I was just running the code, not debugging so the timeout is not related to the debug process... On Mon, Aug 27, 2012 at 9:40 AM, John Chen wrote: > I believe I did exactly what is expecting, because I did the same thing in > Window's API and it did not timeout, if you please

Re: [Libusbx-devel] LibUSB bulkread always got a TIMEOUT

2012-08-27 Thread John Chen
nce is the TransferBuffer and PipeHandler , which I believe they should be different.). any other ideas? thx On Mon, Aug 27, 2012 at 2:06 AM, Xiaofan Chen wrote: > On Mon, Aug 27, 2012 at 9:02 AM, John Chen wrote: > > Hi,I just trying to do a simple bulk read, and always got a TIMEOUT,

[Libusbx-devel] LibUSB bulkread always got a TIMEOUT

2012-08-26 Thread John Chen
Hi,I just trying to do a simple bulk read, and always got a TIMEOUT, would any one please tell me what I did wrong here? Here is my code: Thanks in advance. John I also attached the USBTrace different between Windows API call vs LibsUSB Call, please remove the .remove from the

[Libusbx-devel] How to use LibUSBX with windows device driver installed.

2012-08-15 Thread John Chen
USB Device?Right now there are other applications is using WinAPI to access the USB Device, which require window's UMDF driver. Please advice. Thanks. John -- Live Security Virtual Conference Exclusive live event will cov

Re: [Libusbx-devel] Received ABORT_PIPE After calling libusb_handle_events_timeout

2012-08-03 Thread John Chen
step by step, it just timeout that is why I got the ABORT_PIPE, if I just ran the code directly I did not get ABORT_PIPE again. Thanks. John On Thu, Aug 2, 2012 at 10:39 PM, John Chen wrote: > Hi, Gurus, > I am doing a Asynchronous Bulk call to USB, everything seems to work fine, > bu

[Libusbx-devel] Received ABORT_PIPE After calling libusb_handle_events_timeout

2012-08-03 Thread John Chen
Hi, I apologize if your guys receive this twice, it looks like my original post did not go through. maybe I because I attached a html file? I am doing a Asynchronous Bulk call to USB, everything seems to work fine, but after I call the first libusb_handle_events_timeout, I Received ABORT_PIPE fr

[Libusbx-devel] Received ABORT_PIPE After calling libusb_handle_events_timeout

2012-08-02 Thread John Chen
Hi, Gurus, I am doing a Asynchronous Bulk call to USB, everything seems to work fine, but after I call the first libusb_handle_events_timeout, I Received ABORT_PIPE from USBTrace, After the second libusb_handle_events_timeout call, the callback receive the message. (no sure why I have to call li

Re: [Libusbx-devel] Map DeviceIoControl calls to libusb_control_transfer

2012-07-18 Thread John Chen
Tom, Would you please show me how did you get bmRequestType to value 0xC2. Many thanks. John On Mon, Jul 16, 2012 at 5:37 PM, Tim Roberts wrote: > John Chen wrote: > > > I need to convert a legacy app from win api calls to libusbx, most of the > legacy app is using DeviceI

Re: [Libusbx-devel] Map DeviceIoControl calls to libusb_control_transfer

2012-07-16 Thread John Chen
I have not touch anything like device driver before, do you have any good book to recommend? thx On Mon, Jul 16, 2012 at 5:37 PM, Tim Roberts wrote: > John Chen wrote: > > > I need to convert a legacy app from win api calls to libusbx, most of the > legacy app is using DeviceI

[Libusbx-devel] Map DeviceIoControl calls to libusb_control_transfer

2012-07-16 Thread John Chen
parameters for those api are total different. Would anyone give me some advice how to do that? maybe some examples? Thanks in advance. John Below is some of our legacy calls in window api. { const unsigned int VENDOR_REQUEST_DIRECTION_DEVICE2HOST = 1; const unsigned int

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
Thanks so much, your guys are wonderful! On Mon, Jul 16, 2012 at 1:51 PM, John Chen wrote: > Peter, > One more thing, > althrough libusb_get_string_descriptor_ascii successfully get the serial #, > but it returns 0x000b (no zero) and const char* error = > libusb_error_name(r

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
Peter, One more thing, althrough libusb_get_string_descriptor_ascii successfully get the serial #, but it returns 0x000b (no zero) and const char* error = libusb_error_name(r); the error = 0x00013fe41e10 "**UNKNOWN**", no sure what it is. Thanks. John On Mon, Jul 16, 2012

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
have the some legacy code call ::DeviceIoControl in windows, how do I map all the parameters to libusb_control_transfer. Thanks so much again for all your help. John On Mon, Jul 16, 2012 at 12:11 PM, Pete Batard wrote: > On 2012.07.16 20:04, John Chen wrote: > > Could you please ela

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
Peter, Could you please elaborate on : "you could uninstall the filter driver and then replace the WUDFRD with WinUSB?" what do I do on Linux? Thanks. John On Mon, Jul 16, 2012 at 12:00 PM, Pete Batard wrote: > On 2012.07.16 19:29, John Chen wrote: > > Yes, you are righ

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
R to windows api DeviceIoControl , but I do not see anywhere I could pass this parameter to libusb_get_string_descriptor_ascii, does that mean libusb_get_string_descriptor_ascii will not working for me on this device? if yes, how do I map the call from DeviceIoControl to libusb_control_transfer Thanks.

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
_get_string_descriptor_ascii\n"); //r=libusb_claim_interface(m_handle,0); unsigned char sSerial[256]; r=libusb_get_string_descriptor_ascii( m_handle, 3, sSerial, 255 ); const char* error = libusb_error_name(r); return dev; } On Mon, Jul 16, 2012 at 7:58 AM, John Chen wrote: > > Peter,

Re: [Libusbx-devel] libusb_get_string_descriptor_ascii always fail.

2012-07-16 Thread John Chen
s a Libusb specific error. Thx On Mon, Jul 16, 2012 at 4:00 AM, Peter Stuge wrote: > John Chen wrote: > > I am using libusb-1.0.9, under windows 7 > > Just a note that the debug log you sent is from libusbx, so check > which DLL gets used if you intended something else. >