Installing AIoT Tools on Linux

This document provides the detailed instructions of how to install AIoT tool for I-Pi SMARC 1200 for Linux users.

Prerequisites

  • To install the AIoT tools on a Linux host device, you should use Ubuntu 22.04 LTS host system.

Getting AIoT Tools working on Linux

Git and Pip Installation

  • Type the following commands to install the git on your host system.

    sudo apt update
    sudo apt install git
    python3 -V
  • Installing latest pip with python3.9.

    sudo apt install python3-pip
    pip --version

Fastboot Installation

  • AIoT tool uses the fastboot to flash the image.

    sudo apt update
    sudo apt install android-tools-adb android-tools-fastboot

USB Device Rules

  • Add new udev rule and add your user account to plugdev group.

    echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="201c", MODE="0660", $ GROUP="plugdev"' | sudo tee -a /etc/udev/rules.d/96-rity.rules
    echo -n 'SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="201c", MODE="0660", TAG+="uaccess"
    SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="0003", MODE="0660", TAG+="uaccess"
    SUBSYSTEM=="usb", ATTR{idVendor}=="0403", MODE="0660", TAG+="uaccess"
    SUBSYSTEM=="gpio", MODE="0660", TAG+="uaccess"
    ' | sudo tee /etc/udev/rules.d/72-aiot.rules
    sudo udevadm control --reload-rules
    sudo udevadm trigger
    sudo usermod -a -G plugdev $USER

AIoT Installation

  • Type the following command to install the AIoT tool on your Linux host device.

    pip3 install -U -e "git+https://gitlab.com/mediatek/aiot/bsp/aiot-tools.git#egg=aiot-tools"
    export PATH="$HOME/.local/bin:$PATH"
    sudo adduser $USER dialout
  • Restart your host system and type the below command on the terminal to check the aiot-tool setup.

    aiot-config