Hailo-8 AI Accelerator¶
Copyright © Quectel Wireless Solutions Co., Ltd. 2026. All rights reserved.
Hailo-8 is an AI accelerator card for edge inference and is connected to Quectel Pi H1 through the PCIe interface. This document describes the installation of the driver and firmware, the deployment of HailoRT, device identification and inference performance verification. The example system is Debian 13 (kernel 6.6.116-qli-1.7-ver.1.1).
Hardware Interface¶
Hailo-8 uses the M.2 M-Key form factor and is connected to the M.2 slot of Quectel Pi H1 through a PCIe link. Power off the board and disconnect the power supply before installation, and make sure that the M.2 card and the mounting screw are properly seated. If another device is already installed in the same PCIe/M.2 slot, remove it before installing Hailo-8.
💡 The PCIe driver, board firmware and HailoRT runtime must be exactly the same version (4.19.0 in this document). Otherwise the device fails to initialize, or firmware/runtime version mismatch errors occur.
Quick Installation Guide¶
Power off the board, insert Hailo-8 into the M.2 M-Key slot, and tighten the mounting screw before powering on.
After power-on, use lspci to verify that the device is properly enumerated.
Install the PCIe driver, firmware and HailoRT runtime in sequence, then verify device identification and inference performance.
Figure: M.2 HAT+ mounting completed
Software Features¶
Verify the PCIe Device¶
After the system boots, run the following command. The Hailo vendor and device ID 1e60:2864 should be displayed.
lspci -nn | grep -i hailo
# 0001:01:00.0 is the PCI address of Hailo-8
The link speed and width can be verified as follows:
lspci -vv -s 0001:01:00.0 | grep -E "LnkCap:|LnkSta:"
LnkCap: Port #0, Speed 8GT/s, Width x4
LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded)
Build and Install the PCIe Driver¶
The driver source version must match HailoRT. The kernel version of Quectel Pi H1 is 6.6.116-qli-1.7-ver.1.1. Verify that the kernel build directory is available before compiling. If the command produces no output, install the header package that matches this kernel version.
sudo apt-get update
sudo apt-get install -y build-essential kmod curl
ls -d /lib/modules/$(uname -r)/build
cd ~
curl -fL -o hailort-drivers-4.19.0.tar.gz https://github.com/hailo-ai/hailort-drivers/archive/refs/tags/v4.19.0.tar.gz
tar xzf hailort-drivers-4.19.0.tar.gz
cd hailort-drivers-4.19.0/linux/pcie
make all
sudo make install
sudo cp 51-hailo-udev.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
make install installs hailo_pci.ko to the module directory of the running kernel. Use modinfo -n hailo_pci to confirm the module path.
Install the Firmware and HailoRT¶
The firmware and runtime package versions must match the driver version. They can be obtained from the Raspberry Pi software repository:
cd ~
curl -fLO http://archive.raspberrypi.com/debian/pool/main/h/hailort/hailort_4.19.0-3_arm64.deb
curl -fLO http://archive.raspberrypi.com/debian/pool/main/h/hailofw/hailofw_4.19.0-2_all.deb
sudo apt-get install -y ./hailofw_4.19.0-2_all.deb ./hailort_4.19.0-3_arm64.deb
hailofw provides /lib/firmware/hailo/hailo8_fw.bin, and hailort provides the runtime such as libhailort and hailortcli. Both are required.
Load the Driver and Verify the Device¶
Configure automatic loading at boot, load the driver immediately, and confirm that the device node is created:
echo hailo_pci | sudo tee /etc/modules-load.d/hailo_pci.conf
sudo modprobe hailo_pci
ls -l /dev/hailo0
crw-rw-rw- 1 root root 508, 0 /dev/hailo0
hailortcli fw-control identify
Executing on device: 0001:01:00.0
Firmware Version: 4.19.0 (release,app,extended context switch buffer)
Device Architecture: HAILO8
Part Number: HM218B1C2FAE
Download the Model and Run the Performance Test¶
Hailo-8 only supports models in HEF format. Models in other frameworks must first be quantized and compiled with the Hailo Dataflow Compiler on an x86 host. Download the model and run the test as follows:
mkdir -p ~/hailo/models && cd ~/hailo/models
curl -fLO https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.14.0/hailo8/yolov8s.hef
hailortcli parse-hef yolov8s.hef
hailortcli benchmark yolov8s.hef -t 10
Measured results on Quectel Pi H1 (PCIe Gen1 x1):
yolov8s FPS (streaming) = about 100
resnet_v1_50 FPS (streaming) = about 1259
💡
hailortcli benchmarkexclusively occupies the device. Stop any service that uses Hailo (for example,systemctl stop hailo-cam) before running the test; otherwise a device busy error is reported.
USB Camera Real-Time Detection Example¶
The following steps demonstrate the complete flow of USB camera capture, YOLOv8s object detection on Hailo-8, and MJPEG web preview. A UVC camera is recommended; the measured resolution is 640x480 at 30 fps.
Install Dependencies¶
sudo apt-get install -y libopencv-dev ocl-icd-opencl-dev pkg-config
ocl-icd-opencl-dev is required. Otherwise the linking step fails because of missing OpenCL symbols in libavutil.
Build the Example¶
Copy the example source main.cpp (see the attachment at the end of this section) into ~/hailo_demo and build it:
mkdir -p ~/hailo_demo && cd ~/hailo_demo
g++ -O2 -std=c++17 main.cpp -o hailo_cam $(pkg-config --cflags --libs opencv4) -lhailort -lpthread -lOpenCL
Identify the Camera Node¶
The device number of a USB camera changes after reconnection. Confirm the capture node first:
v4l2-ctl --list-devices
USB Camera:
/dev/video2
Use the first /dev/videoN of the camera entry as the --camera argument.
Run and Preview¶
cd ~/hailo_demo
./hailo_cam --hef ~/hailo/models/yolov8s.hef --camera /dev/video2 --port 8080
Open http://<board-ip>:8080/ in a browser to view the real-time detection result. /stream returns the raw MJPEG stream. The measured frame rate on Quectel Pi H1 is 25 FPS at 640x480, with about 75 ms latency per frame.
Parameter |
Description |
|---|---|
|
Path to the HEF model. Default: /home/q/models/yolov8s.hef. Specifying it explicitly is recommended |
|
V4L2 capture node, for example /dev/video2 |
|
Capture resolution. Default: 640x480 |
|
Requested camera frame rate. Default: 30 |
|
Confidence threshold. Default: 0.35 |
|
Number of asynchronous inference pipeline slots. Default: 2 |
|
HTTP preview port. Default: 8080 |
|
Save one annotated image on exit |
|
Exit automatically after processing the specified number of frames, which is useful for scripted verification |
|
Disable HTTP preview and run inference only |
Run as a Background Service¶
systemd-run --unit=hailo-cam --collect --working-directory=$HOME/hailo_demo \
$HOME/hailo_demo/hailo_cam --hef $HOME/hailo/models/yolov8s.hef --camera /dev/video2 --port 8080
systemctl status hailo-cam
systemctl stop hailo-cam
Stop the process with systemctl stop hailo-cam or pkill -x hailo_cam. Do not use pkill -f hailo_cam, which also kills the shell session whose command line contains the same string.
📎 main.cpp
FAQ¶
The driver probe fails with Failed writing firmware files¶
The firmware file is missing. Make sure that hailofw is installed and that /lib/firmware/hailo/hailo8_fw.bin exists, then reload the driver.
hailortcli reports HAILO_PCIE_DRIVER_NOT_INSTALLED¶
The hailo_pci module is not loaded. Run modprobe hailo_pci and confirm that /dev/hailo0 is created.
The PCIe link speed is lower than expected¶
The actual link is Gen1 x1 (2.5 GT/s), with a theoretical bandwidth of about 250 MB/s and a measured bandwidth of about 190 MB/s, which is close to saturation. Inference throughput is limited by this link.
Uninstall¶
sudo rmmod hailo_pci
sudo apt-get remove --purge hailort hailofw
sudo rm -f /etc/modules-load.d/hailo_pci.conf