Composite Device MSD + Customprotocoll LibUSB WinXP

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

Hi
I have problems with my USB CompositeDevice! I added an interface to the MSD to add two endpoints.
These endpoints serve a PC-program that is communicating with LibUSB.
Does someone have experience with this constellation?

My problem is, that the two drivers do not work together.. if the MSD is activated, LibUSB issnt able to hold the connection and timeouts occur and in the end the whole device is disconnected from the PC.

My MSD works if its Interface #0 and #1 - that doesnt matter.

Is this a problem of LibUSb or do i need to add more than the additional endpointdescriptor..

Can someone help.. please!

Additional info:
Ap7000 standalone; MSD is from UC3-Framework; LibUSB 0.12.1 WinXP; Min Bandwith needed: 10MB/s

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

Hi,

u need to do more than just adding the endpoints. Changes and tweaks are needed in standard_request.c specific_request.c and several other places so that the two interfaces are processed separately instead of being mixed up.

For an example, see under "USB composite device UC3A". I have posted a link to an AVR32 Studio project with 4 interfaces (CDC, HID, libusb0, and audio). The version posted runs on the EVK1104.

I have not done an MSD interface so it may have specific tweaks needed.

Alex

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

Thanks for your answer!
I have looked for many projects based on this framwork, that implement a compositedevice.
Everytime something is different - ok so far BUT:
i really do see the differences. Most Changes are done in function that are never called in my enumerationprocess.

Called:
GET_DESCRIPTOR
SET_ADDRESS
SET_CONFIGURATION
CLEAR_FEATURE

Not called:
GET_CONFIGURATION
SET_FEATURE
GET_STATUS
GET_INTERFACE
SET_INTERFACE

Could you please be more specific?

My Problem is, that i do not use a specific protocoll or something else. You do use some standard drivers.. so you needed to edit some functions.. but what exactly is related to my problem?

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

Since i had a BlueScreenOfDeath on XP (more than once) i have decided that the LibUSB driver is maybe messed up with CompositeDevices (tzhis can also be read on several other threads in other forums or mailinglists).

This evening i have started with "EasyUSB-0.9.1". Its "hardcore" :-) C++ API is not usefull for Borland Compiler but after a few hours it compiles.

Currently first tests succeed also with parallel access to the MSD but i tried only simple commands with verry short data packets.
I will run some more tests tomorrow and I will keep you informed, if anyone is reading this. ;-)

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

I made some progress...
I have started to increase used bandwidth and ported the EasyUSB-API to my application.
It is now working perfectly stable.
But: this driver is SLOW! With LibUSB i had 12MB min bandwidth (bulk transfer), EasyUSb limits this to ~1.2MB.
What is wrong with the driver :-/ Are there some people with experience?

I need the speed.. i have to transmit a 300kb image several times per second..

After all: not the progress i would like to have.

I will work on this issue. Maybe there are some tricks.