Configure sensors and cameras on the reference image

The reference image is configured to boot the Camera MUX 2x2 example application.

When you change your hardware configuration, you often must change the order that you start different services and the sensor configuration file. To simplify the changes, the reference image provides multiple SLM configuration files that specify the correct order of services to boot based on the hardware you boot and use predefined sensor configuration files, which is used when the Sensor service starts.

In some cases, you may need to modify the sensor configuration file based on what you want to use with your image. The sensor configuration files are located at (/etc/system/config/) on the reference image. For information about the Sensor service and the sensor configuration file, see the Sensor chapter in the System Services guide for the QNX Platform for ADAS.

Here are the SLM configuration files provided with the reference image, which are located in the /etc directory:

Changing the configuration

To change the configuration, you can copy predefined changes from the SLM configuration files or modify both the SLM or sensor configuration files. You can do one of the following series of steps:
  • Determine the SLM configuration from the previous list that matches your configuration and copy the SLM configuration over the slm-config-platform.xml file.
  • If you configuration requires you to change an existing SLM configuration file, we recommend that you:
    1. Run the mount -uw /base if you haven't already to allow you to write to the filesystem.
    2. Create a copy of the SLM configuration that points to a sensor configuration file and that's close to what you want.
    3. Create a custom sensor configuration file under /etc/system/config, and then configure your version of the SLM configuration file to point to your custom sensor configuration file.

    For example, if you wanted to connect two cameras, create a new configuration file called /etc/system/config/two_cameras_surround.conf based on the /etc/system/config/surround_cameras.conf, then create a copy of the slm-config-platform-surround-view.xml file and then call it slm-config-platform-two-surround-view.xml, and the modify the following block to point to your sensor configuration file as follows:

    <SLM:component name="sensor">
        <SLM:command>/base/bin/sensor</SLM:command>
        <SLM:args>-U 521:521,1001 -r /accounts/1000/shared/camera
                        -c /base/etc/system/config//etc/system/config/two_cameras_surround.conf</SLM:args>
        <SLM:depend>resarb</SLM:depend>
        <SLM:stop stop="signal">SIGTERM</SLM:stop>
    </SLM:component>
                            
  • Then copy your custom SLM configuration to replace the slm-config-platform.xml and type shutdown.
    # cp /etc/slm-config-platform-two-surround-view.xml /etc/slm-config-platform.xml
    # shutdown