Extend a Raspberry Pi Camera with GMSL2: Long-Distance Computer Vision

Quick Overview & Specifications

AttributeDetails
PublicationVinjo Engineering & Technology
CategoryHardware & IoT
AuthorVinay
Article TypeTechnical Tutorial & Case Study
Published2026-12-04
Last Updated2026-12-04
License / AccessOpen Educational Resource
Core Engineering Highlights:
  1. Verified hardware architecture, schematics, and pinout diagrams.
  2. Comprehensive firmware routines, protocol benchmarks, and build steps.
  3. Production design rules, tolerances, and thermal considerations.
Related Topic Taxonomy:
  • #Raspberry Pi
  • #GMSL2
  • #Computer Vision
  • #Hardware
  • #IoT
  • #Prototyping
  • #Camera
  • #Embedded Linux

Extend a Raspberry Pi Camera with GMSL2

Summary: This article explores how GMSL2 technology enables Raspberry Pi cameras to operate metres away from the host, overcoming the limitations of short ribbon cables. It details the integration of serializers and deserializers to transmit video, control signals, and power over a single coaxial cable, providing a robust solution for diverse computer vision applications.

Key Takeaways

  • Extended Reach: GMSL2 technology allows Raspberry Pi cameras to be placed several metres away from the host, significantly expanding deployment possibilities for computer vision projects.
  • Simplified Wiring: Power over Coax (PoC) integrates video, control, and power into a single coaxial cable, reducing wiring complexity and simplifying remote camera installations.
  • Software Adaptations are Crucial: Successful GMSL2 integration requires specific software adjustments, including managing blanking times for video stability and handling identical I²C addresses for multiple cameras.

Detailed Overview

A camera connected to a Raspberry Pi is a powerful starting point for computer vision. However, the standard CSI ribbon cable, typically limited to tens of centimetres, often becomes a bottleneck when mechanical requirements demand greater separation between the camera and the processing unit. This article demonstrates how GMSL2 (Gigabit Multimedia Serial Link 2) can bridge this gap, enabling remote camera placement while maintaining the Raspberry Pi as the processing host.

When a Ribbon Cable Becomes a Limitation

The conventional Raspberry Pi camera connection uses MIPI CSI-2 for image data, I²C for sensor configuration, and shared lines for power and control. While convenient for short distances (around 30 cm), this setup quickly becomes impractical when the camera needs to be positioned far from the computer, such as on a robot, above a conveyor belt, or within a confined enclosure.

Figure 1. The starting point: a camera connected directly to the Raspberry Pi. The ribbon carries CSI-2 video, I²C control and camera power. Figure 1. The starting point: a camera connected directly to the Raspberry Pi. The ribbon carries CSI-2 video, I²C control and camera power.

Choosing the Right Camera Connection

The choice of camera connection depends on the required distance and application:

  • Short distance – CSI ribbon cable: Simplest for cameras close to the processor.
  • Medium distance – GMSL2: Ideal for distances of several metres (up to 15m with suitable hardware and cables).
  • Long distance – Ethernet: Better for longer distances or networked camera systems (e.g., GigE Vision).

This project focuses on the "medium distance" scenario, utilizing GMSL2 to extend CSI camera data over a dedicated video link.

What a High-Speed Video Link Adds

A SerDes (Serializer/Deserializer) video link like GMSL2 works by placing a serializer beside the camera to convert CSI-2 data into a high-speed serial stream. A deserializer then sits beside the computer, converting the stream back into CSI-2.

Several technologies offer this, including Sony's GVIF, Microchip's ASA Motion Link, Texas Instruments' FPD-Link, and Analog Devices' GMSL. This project uses GMSL2 from Analog Devices due to its public documentation, automotive heritage, and existing Linux support.

GMSL2 devices, such as the MAX96717, provide a 3 or 6 Gbit/s forward link. Beyond video, the cable also carries bidirectional control traffic (I²C, UART, SPI, GPIO), enabling camera configuration, focus control, and trigger signals.

Figure 2. The complete prototype with two camera heads. The long connections are coaxial cables; the CSI ribbons remain local to the camera and computer. Figure 2. The complete prototype with two camera heads. The long connections are coaxial cables; the CSI ribbons remain local to the camera and computer.

Power Can Travel Over the Same Cable

Power over Coax (PoC) is a key feature that simplifies remote camera wiring. It integrates a DC supply onto the coaxial cable, with filters at both ends separating the power from the high-frequency video link. This means a single coax connection can carry video, control, and power, streamlining the setup of remote camera heads. Careful consideration of cable loss and voltage drop is necessary to ensure adequate power delivery to the camera.

The Hardware Used Here

The project utilizes specific hardware components to achieve the GMSL2 extension:

  • Host Board: BE-IIS-GMSL2-2CAM, featuring one MAX96716A deserializer to receive two GMSL2 links and provide CSI-2 outputs for the Raspberry Pi.
  • Camera-side Board: BE-IIS-GMSL-SER, equipped with a MAX96717, connecting the CSI camera (Sony IMX708 sensor) to the coax.

A typical two-camera setup includes a Raspberry Pi 5, one 2CAM board, two serializer boards, two IMX708 camera modules, two coaxial cables, local CSI flex cables, and necessary power supplies.

Figure 3. The remote camera head. A short flex joins the camera and serializer; the FAKRA connector carries the GMSL2 link and PoC. Figure 3. The remote camera head. A short flex joins the camera and serializer; the FAKRA connector carries the GMSL2 link and PoC.

The receiver board offers selectable PoC supply voltages (5, 9, 12, 16, 24 V) to accommodate different camera requirements, with separate enable options for each link.

Figure 4. The supplied Rev. B block diagram shows the same basic signal and power arrangement used in the Rev. A example: two GMSL2 inputs, CSI outputs, PoC and alternative 5 V power connections. Figure 4. The supplied Rev. B block diagram shows the same basic signal and power arrangement used in the Rev. A example: two GMSL2 inputs, CSI outputs, PoC and alternative 5 V power connections.

The 40-pin Header is Only a Power Connection

A crucial design detail is that the receiver's 40-pin header is solely for power. MIPI CSI-2 and I²C communication occur via the flex connection, and the board can be powered independently via USB-C. This flexibility allows the receiver to be used with various Linux boards beyond the Raspberry Pi, even if their connector layouts differ.

Figure 5. The 40-pin header is visibly unconnected. USB-C supplies the receiver, while the flex connections carry CSI-2 and I²C. Figure 5. The 40-pin header is visibly unconnected. USB-C supplies the receiver, while the flex connections carry CSI-2 and I²C.

This makes the BE-IIS receiver a versatile solution for platforms like:

  • Raspberry Pi 5: Fully tested and supported.
  • NVIDIA Jetson Orin Nano: Potential platform, requiring driver and Device Tree adaptations.
  • Arduino UNO Q (with UNO Media Carrier): Requires camera software integration.
  • Renesas RZ/V2H: Interesting for industrial computer vision, needs GMSL2 configuration and Linux camera integration.

Figure 6. The receiver beside the Pi. Separate power and short CSI connections allow a layout that does not depend on matching the Pi 5 connector positions. Figure 6. The receiver beside the Pi. Separate power and short CSI connections allow a layout that does not depend on matching the Pi 5 connector positions.

Deep Dive & Technical Insights

Pixel Mode and Tunnel Mode

GMSL2 documentation often refers to two modes:

  • Pixel mode: Extracts and reconstructs image payload, offering flexibility for video stream processing.
  • Tunnel mode: Transports CSI-2 packet content while preserving its structure. This project uses tunnel mode, allowing the host to interact with the image sensor as if it were directly connected.

While lane conversion is possible in both modes, the key is to ensure link initialization, I²C routing, and compatible video timing for the application to use the camera seamlessly.

Two Software Details That Mattered

Successful GMSL2 integration requires specific software adjustments:

  1. Give the video path enough blanking time: The original IMX708 timing caused image corruption. A driver patch was implemented to increase horizontal blanking, providing additional timing margin for the video path.
  2. Keep identical I²C addresses separate: When using multiple IMX708 sensors, which share the 0x1a address, a kernel routing and address-translation module was developed. This module assigns different upstream aliases (0x52, 0x53) and creates separate Linux I²C buses for each camera, allowing individual sensor control.

From Installation to the First Image

The software for the Raspberry Pi reference setup with two IMX708 cameras is available in the BE-IIS camera installer repository. The installation and setup process involves distinct steps:

git clone https://github.com/be-iis/be-iis-cam-installer.git
cd be-iis-cam-installer
./install.sh

(If a reboot occurs, run ./install.sh again.)

Then, prepare the links, configure the video path, and start the dual preview:

make unoverlay
make prepare-a-b
make pipeline-a-b
rpicam-hello --list-cameras
make video-dual

This sequence allows for easier troubleshooting by separating installation, link setup, and capture. The documented video mode is 2304 × 1296, RAW10, with two CSI lanes at 900 Mbit/s per lane.

What I Tested Over Longer Cables

Testing revealed that cable quality and receiver configuration significantly impact GMSL2 performance over distance:

  • 7.5 m: Reliable operation without special adjustments.
  • 10 m: Worked with selected cables, requiring the receiver's adaptive equalization to be enabled via software.
  • Beyond 10 m: Technically possible but highly demanding, requiring optimized cable quality, connectors, PCB layout, PoC filters, and receiver settings. ADI's typical examples suggest around 15m at 6 Gbit/s for suitable cables.

For prototyping, it's recommended to start with a short, known-good cable. Once the camera functions reliably, gradually increase the distance while monitoring both the GMSL2 link status and the actual video stream. A locked GMSL2 link confirms the transport connection, but successful camera capture also depends on correct sensor setup and the CSI path.


Conclusion & Resources

Extending a Raspberry Pi camera's reach with GMSL2 opens up new possibilities for computer vision applications where the camera needs to be physically separated from the processing unit. By consolidating video, control, and power into a single coaxial cable, GMSL2 simplifies wiring and offers a robust solution for medium-distance deployments. While it introduces technical considerations like software adaptations for blanking times and I²C address management, a well-documented reference setup makes the initial steps manageable, allowing makers and engineers to focus more on their vision problem.