# Prerequisites

Complete these preconditions before running the AI/ML sample applications.

Login to the target device

1. Activate SSH on your Qualcomm Linux or Ubuntu host to sign in with SSH and connect to the target device. For instructions see:

    - For Qualcomm Linux [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-80022-254/how_to.html#use-ssh).
    - For Ubuntu Server [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-90441-1/Use_Ubuntu_on_RB3_Gen2_3.html#sign-in-to-the-rb3-gen-2-console-using-ssh).

Note

If SSH is already set up and Wi-Fi is connected, skip this step.
2. Sign in to the target device using SSH:

    - For Qualcomm Linux:

ssh root@<ip address of target device>
            Copy to clipboard
    - For Ubuntu Server:

ssh ubuntu@<ip address of target device>
            Copy to clipboard

Download models and artifacts

1. On the target device, obtain the `download_artifacts.sh` script, set executable permissions, and run it to download the model, media, and label files:

cd /tmp/
        Copy to clipboard

curl -L -O https://raw.githubusercontent.com/quic/sample-apps-for-qualcomm-linux/refs/heads/main/qualcomm-linux/scripts/download_artifacts.sh
        Copy to clipboard

chmod +x download_artifacts.sh
        Copy to clipboard

./download_artifacts.sh
        Copy to clipboard

Note

For the Ubuntu build, use the `sudo` command.
2. The YOLOv8 model isn’t available by default (optional).

> 
> 
> Download the files using the provided script or export them with Qualcomm AI Hub APIs on the Linux host computer. If you are using [Multistream batch inference](https://docs.qualcomm.com/doc/80-80022-55/topic/multistream-batch-inference.html) application, generate a batch model.
> 
> 
> 
> > 
> > 
> > Tab Download the files with a script
> > Tab Export the files with AI Hub APIs
> > Tab Generate a batch model
> > 
> > 1. Create a [Qualcomm AI Hub account](https://app.aihub.qualcomm.com/account/).
> >     2. Select the account name, then go to **Settings** in the upper right corner, and select the API token.
> >     3. Export the models on the Linux host computer and set the required permissions:
> > 
> > 
> > curl -L -O https://raw.githubusercontent.com/quic/sample-apps-for-qualcomm-linux/refs/heads/main/qualcomm-linux/scripts/export_model.sh
> >             Copy to clipboard
> > 
> > 
> > chmod +x export_model.sh
> >             Copy to clipboard
> > 
> > 
> >         Replace `API_TOKEN` with the selected key:
> > 
> > 
> > ./export_model.sh --api-token=<API_TOKEN>
> >             Copy to clipboard
> >     4. Copy the models to the device in the `/etc/models/` directory.
> > 
> > 
> > scp <working-directory>/export_assets/yolov8_det-tflite-w8a8/yolov8_det.tflite $USER@<IP address of target device>:/etc/models/
> >             Copy to clipboard
> > 
> > - Export the [YOLOv8-Detection-Quantized](https://github.com/qualcomm/ai-hub-models/tree/v0.52.0/src/qai_hub_models/models/yolov8_det) model using Qualcomm AI Hub APIs.
> >     - Current releases use the following SDK versions:
> > 
> > 
> > 
> > > 
> > > 
> > > - Qualcomm Linux (2.0.rc3): Qualcomm AI Runtime SDK v2.43.0.260128.
> > >         - Ubuntu (x08): Qualcomm AI Runtime SDK v2.40
> > 
> > 
> > 
> > For example, to export the YoloV8 QNN model, run the following command:
> > 
> > 
> > 
> > > 
> > > 
> > > python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --target-runtime=qnn_context_binary --device="Dragonwing RB3 Gen 2 Vision Kit" --compile-options="--qairt_version 2.43" --profile-options "--qairt_version 2.43"
> > >         Copy to clipboard
> > 
> > 
> >     - Update the `--qairt_version` value in the command to match the version installed on your device.
> >     - To check the QAIRT version, run the following command on the target device:
> > 
> > 
> > 
> > > 
> > > 
> > > qnn-net-run --version
> >     - To find the QAIRT SDK versions that AIHUB supports for the export command, run the following command on your host machine:
> > 
> > 
> > 
> > > 
> > > 
> > > qai-hub list-frameworks
> >     - Run the following command in the AIHUB environment to view the supported devices and update the device parameter accordingly:
> > 
> > 
> > 
> > > 
> > > 
> > > qai-hub list-devices
> > 
> > 
> > 
> > For example, to export the YOLOv8 LiteRT model, run the following command:
> > 
> > 
> > 
> > > 
> > > 
> > > python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --target-runtime=tflite --device="Dragonwing RB3 Gen 2 Vision Kit"
> > >         Copy to clipboard
> > 
> > - To change the batch size of the model, update `<N>` in the following `export` command:
> > 
> > 
> > 
> > > 
> > > 
> > > python -m qai_hub_models.models.<Model_Name>.export --batch-size <N> --device="Dragonwing RB3 Gen 2 Vision Kit"
> > >             Copy to clipboard
> > > 
> > > 
> > > For example, run the following command in the Python environment created by the `export_model.sh` to export the YOLOv8 LiteRT model with `--batch-size 4`, :
> > > 
> > > 
> > > python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --target-runtime=tflite --device="Dragonwing RB3 Gen 2 Vision Kit" --batch-size 4
> > >             Copy to clipboard
3. The `download_artifacts.sh` script downloads a sample `video.mp4`file to the `/etc/media`directory of the target device. If you are using a custom video, then ensure that you push the video to `/etc/media` and update the file path in the `config.JSON` file of the application.
4. Use the HDMI port to connect the display to the target device. For instructions, see [Set up HDMI display](https://docs.qualcomm.com/doc/80-80022-18/topic/enable_the_display.html#set-up-hdmi-display).

Enable qtimqmmfsrc

In the terminal of the target device, run the following command to enable the qtiqmmfsrc on Config #2:

> 
> 
> echo -n "camx" > /var/data
>     efivar -n 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays -w -f /var/data
>     efivar -n 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays -p
>     sync
>     reboot
>     Copy to clipboard

Enable libcamera

For Dragonwing RB3 Gen 2 Development Kit, enable the libcamera using the following instructions:

Note

The libcamera plugin supports only the IMX577 camera sensor. Connect the IMX577 sensor before enabling libcamera.

1. In the terminal of the target device, enable the bootloader mode using the following command:

reboot bootloader
        Copy to clipboard
2. Once the device enters bootloader mode, flash the Vision Kit CDT file from the extracted folder:

fastboot flash cdt cdt_vision_kit.bin
        Copy to clipboard

Note

You can obtain the `cdt_vision_kit.bin` file from the [Qualcomm multimedia proprietary image folder](https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/meta-qcom/rb3gen2-core-kit/qli-2.0-rc3-qcom-multimedia-proprietary-image.zip) at `images/rb3gen2-core-kit/qcom-multimedia-proprietary-image-rb3gen2-core-kit/`.
3. Reboot the device:

fastboot reboot
        Copy to clipboard

Enable audio and GPU delegate

1. In the terminal of the target device, run the following command to enable the audio:

> 
> 
> > 
> > 
> > systemctl stop pipewire wireplumber pipewire.socket pipewire-manager.socket
> >         chmod 777 /dev/dma_heap/system
> >         adsprpcd audiopd &
> >         systemctl start pipewire wireplumber
> >         wpctl status
> >         Copy to clipboard
> 
> 
> 
> To set the default devices for sink and source, get the device numbers from the `wpctl status` and run the following command:
> 
> 
> 
> > 
> > 
> > wpctl set-default <device ID>
> >         Copy to clipboard
2. In the terminal of the target device, run the following command to enable the GPU delegate and backend:

> 
> 
> ln -sf /usr/lib/libOpenCL.so.1 /usr/lib/libOpenCL.so
>         export OCL_ICD_FILENAMES=/usr/lib/libOpenCL_adreno.so.1
>         Copy to clipboard

## Troubleshooting

- If any model isn’t available after downloading the script file, you can download the model from [IoT–Qualcomm AI Hub](https://aihub.qualcomm.com/iot/models/) and push it to the target device:

scp <model filename> root@<IP addr of the target device>:/etc/models
        Copy to clipboard

    For example:

scp mobilenet_v2_quantized.tflite root@<IP addr of the target device>:/etc/models
        Copy to clipboard
- To run the sample applications from the UART shell, remount the file system with read/write permissions and execute the following commands on the target device:

    - For Qualcomm Linux:

mount -o remount,rw /
            Copy to clipboard
    - For Ubuntu Server:

mount -o remount,rw /
            Copy to clipboard
- For Ubuntu Server, copy the model files to the user `home` folder and then use `sudo` command to copy the files to the `/etc/models` directory:

scp <modelfilename> ubuntu@<IP addr of the target device>:/home/ubuntu
        ssh ubuntu@<IP addr of the target device>
        sudo cp /home/ubuntu/<model filename> /etc/models
        Copy to clipboard
- If you cannot locate the qtiqmmfsrc plugin, ensure that the camera server is running and clear the GStreamer cache using the following commands:

> 
> 
> ps -ef | grep cam-server
>         Copy to clipboard
> 
> 
> rm ~/.cache/gstreamer-1.0/registry.aarch64.bin
>         Copy to clipboard

Last Published: May 17, 2026

[Previous Topic
Run AI/ML sample applications](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/ai-ml-sample-applications.md) [Next Topic
Image classification](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/gst-ai-classification.md)