AVR vender class libusb C#

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I would like to know about how to use libusb-win32, LibUsbDotNet, Visual C# to communicate with AVR chip which is configured in USB vender class. AVR chip which I chose for this project is xmega256a3bu on the Xplained board. I picked the vender class from ASF and included it in the firmware side. I installed libusb-win32 on PC running Win7 and run the example PC console application that is available in AVR4901 software package. It was working. From this point, I am having a problem. Because I would like to use Visual C# for PC application development, I was looking for an example C# code and found this link: http://libusbdotnet.sourceforge.... . I basically copied the example code and run it. Before that, I changed the endpoint for bulk transfer to ep0x4 according to the vender class configuration of AVR side. It was not successful. C# example code does not seem to be able to open the endpoint of AVR. So no response. However, I found that if I run AVR4901 example console application first, and then run visual C# console application, it communicates AVR. I think that Visual C# example code should be able to communicate AVR directly. Could you let me know how to do that? :cry:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was also stuck on this same exact issue, and turns out the PC Host has to claim the interfaces during the descriptor setup and it'll enter the SOF loop.

 

Otherwise, I was looking at Atmel ASF and seems you can also just force define the vendor enable boolean to true at startup and there's no issue with this confusing business.

 

Cheerio

Last Edited: Wed. May 27, 2015 - 01:06 AM