MATLAB: How to control bandwidth between peripherals connected to a USB Hub / USB port

bandwidthimage processinginstrumentation tool boxMATLAB and Simulink Student Suiteusb controlusb hub

Hi all, I've to connect two cameras and microphone for my project and I've a USB 2.0 HUB(with 4 ports) connected to a single USB PORT (other ports are not available) on my PC. The problem is data receiving from the three devices is delaying(not concurrently). Is it possible to control USB bandwidth in MATLAB or some other way between peripherals (like allocating some share of bandwidth to a device from the available total bandwidth)?
Kindly help me out.

Best Answer

No, the USB controller is solely responsible for bandwidth negotiation, with the class of bandwidth negotiation dependent upon the hardware information returned by the peripheral. Some devices are permitted to request a dedicated slice in general (e.g., cameras need the slice consistently) and other devices tell the controller how much data they have available to send and the controller gets back to them later and tells the device how much to send so that the controller can meet its other bandwidth requirements.
There is some room for the host program to affect the procedure, but it has to be by way of the program sending commands to the USB controller (not to the device). MATLAB does not provide any interface for sending commands to USB controllers.
I do not recall at the moment if audio is prioritized over video or video is prioritized over audio. If I recall correctly, both of them are considered real-time information which has priority over block-structured transfers (such as disk drives), but on the other hand real time information like that is not retried in case of packet problems or bandwidth over-allocation. Audio and video real-time information is treated roughly like UDP is treated: transfer what can be transferred easily and drop anything that might give a problem.
I think you are trying to put too much information through a single USB controller. The USB hub itself might be part of the problem too.
The general rule is that you should only have one real-time data device per controller -- though if your controller is 3.0 compatible you might be able to get away with two ports each running a single 2.0 real-time device.
Related Question