RUBIK Pi 3

The Thundercomm RUBIK Pi 3 Development Kit is a powerful Linux-based development board based around the QCS6490 SoC. It has a Kryo™ 670 CPU, Adreno™ 643L GPU and 12 TOPS Hexagon™ 770 NPU. It's available for $99 from a variety of distributors (buy now).

RUBIK Pi 3

Setup

The Rubik Pi might come shipped with either Ubuntu 24, or with Qualcomm Linux.

TODO: Instructions on how to detect what you run (serial port works, but is complicated to set up)

Flashing Ubuntu 24.04 (skip if your board already comes with Ubuntu 24)

  1. If it's on, turn your Rubik Pi 3 off, and disconnect the power adapter.

  2. You'll need to connect the Rubik Pi 3 to your computer using two USB cables.

    • Connect the Rubik Pi 3 to your computer using a micro-USB cable (using the port highlighted in yellow):

    • Connect the Rubik Pi 3 to your computer using an USB-C cable (using the port highlighted in red).

  3. Download an Ubuntu Server 24.04 tangshan image to /<your working directory>/ubuntu-desktop-24-rubik-pi-3

  4. Now, depending on your OS, from your working directory:

    • macOS:

      • Open a terminal, and run:

        wget https://cdn.edgeimpulse.com/qc-ai-docs/device-setup/rubik-pi3-ubuntu24-macos-linux.sh
        bash rubik-pi3-ubuntu24-macos-linux.sh  --flash-ufs --flash-ubuntu

        TODO: --flash-usb-fw segfaults on my Mac... And without it you don't have USB (can use same trick as RB3?)

    • Linux (x86 only, arm64 hosts are not supported):

      1. Update your udev rules. Open a terminal and run:

        echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0664", GROUP="plugdev"' > /etc/udev/rules.d/51-qcom-usb.rules
        sudo systemctl restart udev
      2. Disconnect and reconnect the USB cables to your development board.

      3. Then, from a terminal, run:

        wget https://cdn.edgeimpulse.com/qc-ai-docs/device-setup/rubik-pi3-ubuntu24-macos-linux.sh
        bash rubik-pi3-ubuntu24-macos-linux.sh
  5. When the script says "Waiting for EDL device":

    1. Hold the EDL button.

    2. Connect the power adapter.

    3. The script should say "waiting for programmer..." and flashing will start.

Configuring Ubuntu 24

Now that we have Ubuntu 24.04 installed, lets connect your Rubik Pi to the internet.

  1. Next, either:

    • Hook up a display, keyboard, and mouse - and make sure you can open the terminal application on the device.

    • Or, connect to the device using a serial port, see Qualcomm docs: Configuring Ubuntu on the device (docs for RB3, but same apply to Rubik Pi 3).

    When prompted to login, the default username is ubuntu and the default password is also ubuntu.

  2. From your terminal, set up WiFi:

    # Connect to WiFi
    sudo nmcli dev wifi connect "<WiFi-SSID>" password "<WiFi-password>"
    
    # Force ntp sync so we get the correct date/time
    sudo systemctl restart systemd-timesyncd.service
    
    # To verify...
    date
    # ... Should return the current date
  3. Optional: If you want to connect over SSH:

    1. Find your IP address:

      sudo apt update && sudo apt install -y net-tools
      
      ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
      
      # 192.168.1.253
    2. On your host machine (so not on your dev board), open a command prompt or terminal and run:

      ssh ubuntu@192.168.1.253

      (Replace 192.168.1.253 with the IP you found in the previous step)

    3. Optional: Follow this guide to connect your board to Visual Studio Code via SSH for code development and deployment.

Installing drivers, AI Engine Direct and the IM-SDK

Now that we have Ubuntu 24.04 installed and connected to a network, let's install GPU drivers, the Qualcomm AI Engine Direct SDK (to run neural networks), and the Qualcomm Intelligent Multimedia SDK (to run computer vision pipelines on GPU or NPU).

From the terminal or ssh session on your development board, run:

  1. Install some base packages:

    sudo apt update
    sudo apt install -y unzip wget curl python3 python3-pip python3-venv software-properties-common
  2. Download and install IM SDK, the AI Engine Direct SDK library and development headers:

    # Add the Qualcomm IoT PPA
    sudo apt-add-repository -y ppa:ubuntu-qcom-iot/qcom-ppa
    
    # Install GStreamer and the IM SDK
    sudo apt update
    sudo apt install -y gstreamer1.0-tools gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-qcom-good gstreamer1.0-qcom-sample-apps
    
    # Install the AI Engine Direct SDK library and development headers
    sudo apt install -y libqnn1 libsnpe1 libqnn-dev libsnpe-dev
  3. Install OpenCL GPU drivers:

    sudo apt update
    sudo apt install -y clinfo qcom-adreno1
    
    # Reboot the device
    sudo reboot
    
    # Symlink OpenCL library to /usr/lib/
    if [ ! -f /usr/lib/libOpenCL.so ]; then
        sudo ln -s /lib/aarch64-linux-gnu/libOpenCL.so.1.0.0 /usr/lib/libOpenCL.so
    fi
    
    # Verify installation
    clinfo
    # ... Should return
    #     Number of platforms                               1
    #     Platform Name                                   QUALCOMM Snapdragon(TM)
    #     Platform Vendor                                 QUALCOMM
    #     Platform Version                                OpenCL 3.0 QUALCOMM build: 0808.0.7

Troubleshooting

No known issues for this development board.

Last updated