Welcome to Hailo-8 AI HAT + repository
0.Preparation
0.Preparation
0.Preparation
This chapter teaches you how to set up a Raspberry Pi 5 using AI HAT+.
Required content
Hardware:
- Raspberry Pi 5
- AI HAT+
- Thermal pad (included in kit)
- Optional: Heatsink
- Optional: Official Raspberry Pi camera (e.g., Camera Module 3 or high-quality camera)
- Optional: USB camera
We used a Raspberry Pi 5 model with the official active cooler and a 27W USB-C power supply. We recommend using the official USB-C power supply or a power supply that supports the Raspberry Pi 5 power protocol to ensure the motherboard can provide sufficient power to AI HAT+.

Use the provided four screws and mounting pads. Press firmly onto the bottom of the Raspberry Pi GPIO 40-pin header; ensure all pins are in place. Disconnect the ribbon cable from the AI HAT+ and insert the other end into the Raspberry Pi's PCIe port. Lift the ribbon cable brackets from both sides and insert the ribbon cable with the copper contacts facing inwards toward the USB port. After fully and evenly inserting the ribbon cable into the PCIe port, pull down the ribbon cable brackets from both sides to secure the cable in place.
The installation should look like the image below:

For information on CSI camera connections, please refer to the Raspberry Pi 5 camera example.
Software:
The Raspberry Pi needs to be flashed with the image shown below.

Note: The Raspberry Pi 5's SD card needs to contain a bootable image. Please refer to our Raspberry Pi 5 tutorial for image burning.
The interface that appears after successful boot.

Update System
Note: (The following steps are only necessary for DIY setups. If you are using the image we provide, you do not need to rebuild.)
This will update your system to the latest Raspberry Pi kernel, including AI HAT+ driver support.
sudo apt updatexxxxxxxxxxsudo apt full-upgrade -y

xxxxxxxxxxsudo rpi-eeprom-update -a

Then, restart.
xxxxxxxxxxsudo rebootSet PCIe to Gen3
To achieve optimal performance for your AI HAT+ device, it's necessary to set PCIe to Gen3. While using Gen2 is an option, it will result in performance degradation.
Open the Raspberry Pi Configuration Tool:
xxxxxxxxxxsudo raspi-config






Select option "6 Advanced Options," then select option "A8 PCIe Speed." Select "Yes" to enable PCIe Gen 3 mode. Click "Finish" to exit. After exiting, you will be prompted to restart; select "Yes" to restart the Raspberry Pi.
Install AI HAT+ Dependencies
Install all necessary software for Raspberry Pi AI HAT+ to function correctly. To do this, run the following command from a terminal window:
xxxxxxxxxxsudo apt install dkmssudo apt install hailo-all
The image below shows a successful installation.


Restart your Raspberry Pi.
xxxxxxxxxxsudo reboot