From: Ze H. Z. <ze....@ma...> - 2020-04-07 11:18:01
|
Hi Xiaofan I open and received device handler, and be able to use usb_control_msg to send and receive data. also checked device interface endpoints, but I can’t use usb_bulk_read to read big buffer from device which supposed to be ready Thanks On Fri 3 Apr 2020 at 03:28, Xiaofan Chen <xia...@gm...> wrote: > On Thu, Apr 2, 2020 at 1:00 AM Ze Hou Zhang <ze....@ma...> wrote: > > > > Hi All > > I dont have a lot experience for developping embedded system. > > I encounter this problem > > My hardware is : > > int vid = 0x24aa; > > int pid = 0x1000; > > std::string firmwarePartNum = "170003"; > > std::string firmwareDesc = "FX2 USB Board"; > > bool isSupported; > > unsigned int defaultPixels = 1024; > > unsigned int spectraBlockSize = 1024 * 2; > > unsigned int usbDelayMS = 0; > > bool hasDefaultTECSetpointDegC = false; > > int defaultTECSetpointDegC = 0; > > ============================================================= > > int size = 512; > > char* buf = new char[size]; > > int endpoint = 130; > > int timeout = 150; > > > > int isok = usb_bulk_read(*deviceHandle, endpoint, bytes, > size, timeout); > > > > Output: ok = -22 > > Thanks > > > > You have to know the communication protocol of the device in order > to use libusb-win32. In your case, you need to make sure your device > is sending data. > > > -- > Xiaofan > > > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > -- __ Séanadh Ríomhphoist/_ Email Disclaimer__ ** Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é. Is féidir tuilleadh a léamh anseo. <https://www4.dcu.ie/iss/seanadh-riomhphoist.shtml> <https://www4.dcu.ie/iss/seanadh-riomhphoist.shtml>* _ This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Read more here. <https://www4.dcu.ie/iss/email-disclaimer.shtml> _ *_ |