|
Hi guys, Can you guys help me please? I have been bothered by this problem for 5 days... I installed libusbk package and am playing with the examples. The "enum_descriptors" project is working fine. But I got stuck by two example projects: 1. xfer-control For this project, it is successful for me to do usb.ControlTransfer() from device to host, but it is unsuccessful to do this from host to device. The Win 32 error code is 32: the device is not functioning 2. xfer-sync For this project, I can't either read or write anything to the device. Can you guys give me some hint about the potential problem? it's killing me... Thank you! Barton ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
On Sun, Jul 22, 2012 at 5:38 AM, Mingwu Barton Gao
<[hidden email]> wrote: > Hi guys, > > Can you guys help me please? I have been bothered by this problem for 5 > days... > I installed libusbk package and am playing with the examples. > The "enum_descriptors" project is working fine. But I got stuck by two > example projects: > > 1. xfer-control > For this project, it is successful for me to do usb.ControlTransfer() > from device to host, but it is unsuccessful to do this from host to device. > The Win 32 error code is 32: the device is not functioning > 2. xfer-sync > For this project, I can't either read or write anything to the device. > > Can you guys give me some hint about the potential problem? it's killing > me... The demo programs are written for the Benchmark firmware. So they will most likely to be modified to suit your device. -- Xiaofan ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
In reply to this post by Mingwu Barton Gao
On 7/21/2012 2:38 PM, Mingwu Barton Gao wrote:
> Hi guys, > > Can you guys help me please? I have been bothered by this problem for > 5 days... > I installed libusbk package and am playing with the examples. > The "enum_descriptors" project is working fine. But I got stuck by two > example projects: > > 1. xfer-control > For this project, it is successful for me to do > usb.ControlTransfer() from device to host, but it is unsuccessful to > do this from host to device. > The Win 32 error code is 32: the device is not functioning You device doesn't support the vendor control request used. Microchip has a large selection of of good USB dev boards for a great price. Most (if not all) will run the benchmark firmware which most of these examples were written for. A PIC32 starter would be a good choice: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en532453 > 2. xfer-sync > For this project, I can't either read or write anything to the device. > > Can you guys give me some hint about the potential problem? it's > killing me... Many example will blindly try and read/write from an endpoint; probably your device does not support the endpoints used in the example. Run kList and post the output. This will help us tell you what's wrong. ;) Regards, Travis ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Hi Guys,
Thank you for your help. The problem is solved~ The issue is when I pressed "debug" to build the .exe file, it automatically runs once and disables the interruption for future writing. So when it comes to me to run the .exe file, it can't write any more... Thank you so much! Mingwu
> Date: Sat, 21 Jul 2012 17:59:32 -0700 > From: [hidden email] > To: [hidden email] > Subject: Re: [Libusb-win32-devel] LibUSBK___Could you guys help me please? > > On 7/21/2012 2:38 PM, Mingwu Barton Gao wrote: > > Hi guys, > > > > Can you guys help me please? I have been bothered by this problem for > > 5 days... > > I installed libusbk package and am playing with the examples. > > The "enum_descriptors" project is working fine. But I got stuck by two > > example projects: > > > > 1. xfer-control > > For this project, it is successful for me to do > > usb.ControlTransfer() from device to host, but it is unsuccessful to > > do this from host to device. > > The Win 32 error code is 32: the device is not functioning > > You device doesn't support the vendor control request used. > Microchip has a large selection of of good USB dev boards for a great > price. Most (if not all) will run the benchmark firmware which most of > these examples were written for. > A PIC32 starter would be a good choice: > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en532453 > > > 2. xfer-sync > > For this project, I can't either read or write anything to the device. > > > > Can you guys give me some hint about the potential problem? it's > > killing me... > > Many example will blindly try and read/write from an endpoint; probably > your device does not support the endpoints used in the example. > > Run kList and post the output. This will help us tell you what's wrong. ;) > > Regards, > Travis > > > ------------------------------------------------------------------------------ > 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 endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Libusb-win32-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
In reply to this post by Mingwu Barton Gao
Hi guys,
I am using VC++ 2010 Express to play with the example code. Now I can send and write data to my usb device by modifying the example code using Win32 Console. Now I need to develop one windows user interface and carry out the same function. I am not really familiar with the structures or properties with how to start with a Windows Form Project and link related resouce to the project, so that I can migrate the code I mentioned above to send and write the data to the USB device. Can you guys give me some guidance please? Thank you very much! Barton ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Hi Barton,
Do you mean you want to build the GUI in MS windows OS? If yes, you can get the sample from the website. If no, we can discuss your requirement. BR, Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Hi Chunli,
Thank you for your reply. I really appreciate it. Actually that is what I meant. I wanna build the GUI in MS windows OS and use the GUI to send and read data from USB device. Can you let me know where to find the link? I tried but failed to figure it out. Thank you again! Barton Date: Thu, 2 Aug 2012 09:46:13 +0800 From: [hidden email] To: [hidden email] Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application Hi Barton,
Do you mean you want to build the GUI in MS windows OS? If yes, you can get the sample from the website. If no, we can discuss your requirement. BR, Zhang Chunli 2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
I'm not sure which type GUI of the form or document in MS2010 is needed by you. So I can't help you to search and it is better if you can search it by yourself. And normally I can get some demo code from http://www.codeproject.com or http://download.csdn.net.
I think you can try. BR, Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Hi Chunli,
Thank you for your reply again. I am developing a graphic user interface on windows. I know how to develop a graphic user interface itself by choosing windows form project on VC++2010 Express. The thing is windows form project is clr (Commone Language Runtime) based, but the examples of libusbk is win32 based. I am not sure how to set up the property of the clr based windows form project, so that the lib of libusbk can still be used. Can you let me know your comment again? Barton Date: Thu, 2 Aug 2012 10:32:55 +0800 From: [hidden email] To: [hidden email] Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application I'm not sure which type GUI of the form or document in MS2010 is needed by you. So I can't help you to search and it is better if you can search it by yourself.
And normally I can get some demo code from http://www.codeproject.com or http://download.csdn.net.
I think you can try.
BR,
Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
I will reply you later because some urgent issues.
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Thanks!
Date: Thu, 2 Aug 2012 18:11:26 +0800 From: [hidden email] To: [hidden email] Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application I will reply you later because some urgent issues. 2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
I have 2 questions for you: 1. I don't know which libusb code has been used by you. 2. I think you can A. Create 1 thread for the sample code process(just put the code of the sample process to the thread), and then the GUI thread can send/receive message (may be in the OnInitialDialog function) to the sample thread. Sample thread will handle the message from GUI thread, read and write operations.
By this solution, the read and write operation will block each other B. Create 1 thread for the sample code process, create 1 thread for write and create 1 thread for read. Totally 3 threads are created. The GUI thread will send/receive message to/from the sample code thread. The sample code thread will transmit the message from GUI thread to the write thread or transmit the data from read thread to GUI thread.
By this solution, the read and write will not block each other. But more things should be done than the solution A. BR, Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
Hi Chunli,
Thank you for your reply. I think I need to spend some time learning about how to get the threads of code done. Hopefully I can get it done smoothly. Thanks, again! Barton Date: Thu, 2 Aug 2012 23:08:53 +0800 From: [hidden email] To: [hidden email] Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application I have 2 questions for you: 1. I don't know which libusb code has been used by you. 2. I think you can A. Create 1 thread for the sample code process(just put the code of the sample process to the thread), and then the GUI thread can send/receive message (may be in the OnInitialDialog function) to the sample thread. Sample thread will handle the message from GUI thread, read and write operations.
By this solution, the read and write operation will block each other B. Create 1 thread for the sample code process, create 1 thread for write and create 1 thread for read. Totally 3 threads are created. The GUI thread will send/receive message to/from the sample code thread. The sample code thread will transmit the message from GUI thread to the write thread or transmit the data from read thread to GUI thread.
By this solution, the read and write will not block each other. But more things should be done than the solution A. BR, Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
|
In reply to this post by zhang chunli
Hi Chunli,
Just let you know that I solved this problem. It turned out that I can link libusbk.lib and compile the example code with CLR Windows Form project on VC++ 2010 Express. Thank you for your help and discussion. I really appreciate it! Barton Date: Thu, 2 Aug 2012 23:08:53 +0800 From: [hidden email] To: [hidden email] Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application I have 2 questions for you: 1. I don't know which libusb code has been used by you. 2. I think you can A. Create 1 thread for the sample code process(just put the code of the sample process to the thread), and then the GUI thread can send/receive message (may be in the OnInitialDialog function) to the sample thread. Sample thread will handle the message from GUI thread, read and write operations.
By this solution, the read and write operation will block each other B. Create 1 thread for the sample code process, create 1 thread for write and create 1 thread for read. Totally 3 threads are created. The GUI thread will send/receive message to/from the sample code thread. The sample code thread will transmit the message from GUI thread to the write thread or transmit the data from read thread to GUI thread.
By this solution, the read and write will not block each other. But more things should be done than the solution A. BR, Zhang Chunli
2012/8/2 Mingwu Barton Gao <[hidden email]>
Charles[cl.zhang] ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel ------------------------------------------------------------------------------ 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 endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libusb-win32-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel |
| Powered by Nabble | Edit this page |
