Configuring USB-FS for USB3 Vision Camera

Configuring USB-FS for USB3 Vision Camera
Industrial Cameras

This post explains how to increase the buffer memory for USB-FS devices on Linux systems in order to make full use of the imaging hardware’s capabilities. By default, USB-FS on Linux systems only allows 16 MB of buffer memory for all USB devices, which may not be sufficient for high-resolution cameras or multiple-camera set ups, resulting in image acquisition issues. To configure USB-FS and increase the buffer memory limit, the following steps should be taken:

Note that GRUB is for desktop PC architecture. ARM embedded systems use a different bootloader, as GRUB requires a system with a BIOS, and embedded systems do not have one.

  1. Create the file /etc/rc.local with the command sudo touch /etc/rc.local. This will create the file, allowing it to be edited.
  2. Change the permissions of the file with the command sudo chmod 744 /etc/rc.local. This will ensure that the file has the correct permissions to be edited.
  3. Change the buffer memory limit with the command echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb. This command will set the memory limit to 1000 MB, which should be enough to prevent image acquisition issues.
## /etc/rc.local file contents example 
 
#!/bin/sh -e 
echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb 
exit 0

After changing the memory limit, it is important to confirm the changes have been made correctly. This can be done by running the command cat /sys/module/usbcore/parameters/usbfs_memory_mb, which will display the current memory limit. If the limit is still 16 MB, then the changes will need to be made again. Additionally, further information about USB-FS on Linux can be found in the following sources: