EasyManua.ls Logo

Matrix Vision mvBlueFOX3 - Optimizing USB Performance

Matrix Vision mvBlueFOX3
365 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8.3 Linux 45
SUBSYSTEM!="usb|usb_device|plugdev", GOTO="u3v_rules_end"
ACTION!="add", GOTO="u3v_rules_end"
ATTRS{bDeviceClass}=="ef", ATTRS{bDeviceSubClass}=="02", ATTRS{bDeviceProtocol}=="01", ENV{
ID_USB_INTERFACES}=="
*
:ef0500:
*
", MODE="0664", GROUP="plugdev"
LABEL="u3v_rules_end"
3. OPTIONAL: Create another file in the "/etc/udev/rules.d" directory with name 52-mvbf3.rules
. This step is only necessary if a mvBlueFOX3 in the "mvbootloader" state should be recognised by the
system.
4. OPTIONAL: Type the following content into the file:
SUBSYSTEM!="usb|usb_device|plugdev", GOTO="mvbf_rules_end"
ACTION!="add", GOTO="mvbf_rules_end"
ATTRS{idVendor}=="164c", ATTRS{idProduct}=="5531", MODE="0664", GROUP="plugdev"
LABEL="mvbf_rules_end"
This step is only necessary if a mvBlueFOX3 in the "mvbootloader" state should be recognised by the system.
5. Save the file(s) and exit your editor
Note
The above 52-U3V.rules file provides the necessary access privileges not only for mvBlueFOX cameras,
but also for U3V-compliant cameras of any other vendor.
As soon as this file is into place, each time the camera is plugged to the system it acquires the set of rights that
allows the user to use it without having root privileges.
8.3.5 Optimizing USB performance
On most contemporary Linux systems, support for USB 3.0 functionality has moved from separate kernel modules to
the kernel itself (usbcore). On such systems, the kernel memory which is allocated for use with USB is predefined
and set to a relatively small value (e.g. 16 MB on a typical 32-bit Ubuntu 12.04 System). This value is usually
enough for reading from an external HDD or similar applications, but in the case of machine vision applications, with
Megapixel sensors and ultra-fast transfer speeds it is way too low.
Note
You may inquire the value (in Megabytes) on your system by typing:
cat /sys/module/usbcore/parameters/usbfs_memory_mb .
It is highly recommended to increase this value to at least 256 MB or even more depending on your application
(number of cameras, number of request objects per camera etc.). For example, a 5 Mpix camera, capturing RGB
data with a default request count of 10, needs about 5M 3 10 = 150MB of the usbfs memory. Always bear in
mind though, that mvIMPACT Acquire is probably not the only system component using usbcore memory, so you
should always reserve several MB more than the number you get from the above calculation. As a general rule of
thumb, for a single-camera application with a default request setting of 10, a value of 256 MB should be adequate.
To change the value of the usbfs_memory_mb system parameter, one has to invoke the kernel at boot time
with an argument that sets the parameter to the desired value. Trying to modify this parameter after the system
has booted (e.g. with modprobe ), will have no effect since usbcore is a system module integrated in the Linux
kernel, and not a separate kernel module which can be loaded and unloaded on demand.
Passing parameters to the kernel at boot time is usually done by typing: systemModuleName.-
parameter=value . In our case this would be:
MATRIX VISION GmbH

Table of Contents