Basler pylon on Raspberry Pi with Yocto
Back to Resources
IMAGE ACQUISITION

Basler pylon on Raspberry Pi with Yocto

January 21, 2023

Basler's pylon SDK is the de facto standard for interfacing with Basler industrial cameras, supporting both GigE Vision and USB3 Vision transport layers. While pylon is straightforward to install on a standard Debian or Ubuntu system, deploying it on a custom Yocto-based embedded Linux image adds significant complexity — particularly around cross-compilation, shared library dependencies, and network stack configuration for GigE Vision.

The starting point is adding the meta-basler-pylon layer (or equivalent custom layer) to your Yocto build environment. Basler provides prebuilt ARM binaries for pylon, which means you're integrating a prebuilt binary package rather than building from source. Your local.conf needs to include the correct package architecture override, and you must ensure the pylon package's runtime dependencies (libusb, glibc version compatibility, and network utilities) are satisfied in your image recipe.

GigE Vision camera support on the Raspberry Pi requires careful network interface configuration. The Pi's built-in Ethernet adapter is typically insufficient for high-bandwidth GigE Vision streams — particularly at full sensor resolution and frame rates above 30 FPS. We recommend using a USB 3.0 Gigabit Ethernet adapter with a dedicated subnet, and configuring jumbo frames (ip link set eth0 mtu 9000) to reduce CPU overhead from packet processing. The Yocto image must include the appropriate kernel modules for your Ethernet adapter and the GigE Vision kernel patch for multicast routing.

USB3 Vision on Raspberry Pi 4 is more straightforward, as the Pi 4's USB 3.0 host controller provides sufficient bandwidth for most Basler USB3 Vision camera models. The critical configuration step is increasing the USB memory allocation (usbcore.usbfs_memory_mb=1000 in the kernel command line) to prevent buffer overflow errors during high-frame-rate capture.

Once the image is built and deployed, validate the installation with the PylonViewerApp or the pylon-sdk/samples command-line tools. Confirm that ITransportLayer enumeration returns your expected camera, and benchmark the maximum sustainable frame rate at your target resolution before integrating pylon into your application pipeline.

View original post