Configuring GMSL Cameras

Warning

Sol3 OS 0.2.1 only supports the 10-bit 6Gbps lowspeed stream parameters. Update your device to gain access to all stream parameters.

Prerequisites

systemctl status sol3_carrier_board_server
# If it's not running, start it:
sudo systemctl start sol3_carrier_board_server
# If there is a problem, inspect the logs
journalctl -b -u sol3_carrier_board_server

Camera Discovery

Before discovering cameras, the sol3_gmsl_supervisor must be stopped:

sudo systemctl stop sol3_gmsl_supervisor

The sol3_gmsl_cli discover command detects cameras connected to GMSL ports and generates a configuration file at /opt/sol3/etc/camera_server/camera_server_config.json. This file will later be used by the sol3_gmsl_supervisor to configure the cameras and enable them for frame capture:

# Discover over all ports
sudo /opt/sol3/bin/sol3_gmsl_cli discover
# If you know which camera ports are populated, you can
# specify them here to speed up the discover process
sudo /opt/sol3/bin/sol3_gmsl_cli discover --camid 1 3

The discovery process will generate output similar to:

[2025-11-11 01:22:01.593] [info] [gmsl_cli.cpp:169] Writing /opt/sol3/etc/camera_server/camera_server_config.json
{
  "camera_configs": [
    {
      "cam_num": "GMSL_CAMERA_01",
      "camera_type": "IMX565_COLOR",
      "bit_depth": "SENSOR_BIT_DEPTH_10",
      "serial_number": "0041434a433841353031020006000a",
      "gmsl_link_speed": "GMSL_LINK_6_GBS_MIPI_LOWSPEED"
    },
    {
      "cam_num": "GMSL_CAMERA_03",
      "camera_type": "IMX577",
      "bit_depth": "SENSOR_BIT_DEPTH_10",
      "serial_number": "0041434a43384135303102804a0058",
      "gmsl_link_speed": "GMSL_LINK_6_GBS_MIPI_LOWSPEED"
    }
  ]
}

Configuration Parameters

The generated configuration file contains the following parameters for each camera:

cam_num

Camera port identifier. Valid values:

  • GMSL_CAMERA_01 through GMSL_CAMERA_12

camera_type

Sensor model. Valid values:

  • IMX577 - Sony IMX577 sensor

  • IMX565_MONO - Sony IMX565 monochrome sensor

  • IMX565_COLOR - Sony IMX565 color sensor

bit_depth

Sensor bit depth for image capture. Valid values:

Configurable: Adjust based on your application requirements. Higher bit depth provides greater dynamic range but requires more bandwidth.

  • SENSOR_BIT_DEPTH_10 - 10-bit pixel depth

  • SENSOR_BIT_DEPTH_12 - 12-bit pixel depth (currently unsupported)

serial_number

Unique camera serial number as a hexadecimal string. This is auto-detected during discovery and uniquely identifies the physical camera module.

Applying Configuration

After generating or modifying the configuration file, restart the GMSL supervisor to apply changes:

sudo systemctl restart sol3_gmsl_supervisor
# Verify the service started successfully:
systemctl status sol3_gmsl_supervisor
# If there is a problem, inspect the logs
journalctl -b -u sol3_gmsl_supervisor

The supervisor will:

  1. Read the configuration from /opt/sol3/etc/camera_server/camera_server_config.json

  2. Power on cameras sequentially

  3. Configure GMSL serializer and deserializer chips

  4. Validate camera serial numbers

  5. Publish configuration to the camera server

Troubleshooting

Discover Fails to Run

If you get an error message like the following when trying to discover cameras, it indicates that the sol3_gmsl_supervisor is still running. Stop it before retrying.

$ sudo /opt/sol3/bin/sol3_gmsl_cli discover
terminate called after throwing an instance of 'std::runtime_error'
  what():  Socket is already in use: /run/sol3/carrier_board_camera_control
Aborted

I2C Scan for Debugging

To debug hardware connectivity issues, scan all I2C buses for connected devices:

sudo /opt/sol3/bin/sol3_gmsl_cli i2c-scan

This displays all detected I2C devices across the system, including cameras, serializers, and deserializers.

Camera Detection Issues

All GMSL deserializers are powered by a single PMIC circuit. If some cameras are failing to be detected, try cycling the PMIC power to resolve transient hardware issues:

# Turn deserializer PMIC on
sudo /opt/sol3/bin/sol3_gmsl_cli pmic on

# Turn deserializer PMIC off
sudo /opt/sol3/bin/sol3_gmsl_cli pmic off

GMSL Supervisor Fails to Start

Check service logs for detailed error messages:

journalctl -b -u sol3_gmsl_supervisor

Common issues:

  • Configuration file missing or malformed JSON

  • Serial number mismatch (camera hardware changed)

  • Carrier board server not responding