Qualcomm Robotics RB5 Development Kit User Guide: 80-88500-5 Rev. AE December 7, 2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 89

Qualcomm Robotics RB5 Development Kit User

Guide

80-88500-5 Rev. AE

December 7, 2023

© 2023 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 What is included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 What you will need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 RB5 mainboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.1 RB5 mainboard connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.2 RB5 mainboard power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.3.3 RB5 mainboard LEDs and buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.3.4 RB5 DIP switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.3.5 RB5 mainboard RF antennas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4 Thermal management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 RB5 mezzanine boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3 Update software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.1 Host system prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.1.1 Update Ubuntu-based packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.2 Install Android Debug Bridge and fastboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.3 Install Qualcomm Package Manager (QPM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.4 Install Product Configuration Assistant Tool (PCAT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2 Flash RB5 software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2.1 Flash system with PCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2.2 Flash system with fastboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2.3 Flash Linux with fastboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 Set up the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.1 Set up Wi-Fi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Set up Bluetooth technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.3 Set up Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.4 Set up HDMI display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.5 Set up camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.5.1 Set up USB webcam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

80-88500-5 Rev. AE 2
Qualcomm Robotics RB5 Development Kit User Guide Contents

4.5.2 Set up MIPI camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55


4.5.3 Camera use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.6 Set up audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.7 Set up video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.8 Wayland sink for playback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.9 Set up sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5 Develop applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.1 Install ROS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.2 Build and deploy sample applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.2.1 Clone Git repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.2.2 Sample applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.3 Develop with cross-compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.3.1 Prepare sysroot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.3.2 Pack the image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4 Develop using RB5 platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.1 Sample from GitHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.1 Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.2 Acronyms and terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

80-88500-5 Rev. AE 3
Tables

Table 2-1: Hardware components of the QRB5165 SoM........................................................................................... 7


Table 2-2: Hardware components of the development kit........................................................................................ 8
Table 2-3: Mainboard connectors............................................................................................................................ 11
Table 2-4: Low-speed expansion connector 1.......................................................................................................... 13
Table 2-5: Low-speed expansion connector 2.......................................................................................................... 15
Table 2-6: Low-speed expansion connector 3.......................................................................................................... 18
Table 2-7: High-speed expansion connector 1......................................................................................................... 21
Table 2-8: High-speed expansion connector 2......................................................................................................... 24
Table 2-9: High-speed expansion connector 3......................................................................................................... 27
Table 2-10: Mainboard interfaces............................................................................................................................ 29
Table 2-11: Board configuration DIP switches......................................................................................................... 30
Table 2-12: Boot configuration DIP switches........................................................................................................... 31
Table 2-13: External boot device selection for RB5 platform...................................................................................31
Table 2-14: Vision mezzanine DIP switches..............................................................................................................36
Table 2-15: 5G mezzanine DIP switches................................................................................................................... 37

80-88500-5 Rev. AE 4
Figures

Figure 2-1: RB5 development board with optional accessories.................................................................................7


Figure 2-2: RB5 block diagram................................................................................................................................. 10
Figure 2-3: RB5 mainboard top and bottom connectors......................................................................................... 11
Figure 2-4: RB5 mainboard interfaces..................................................................................................................... 29
Figure 2-5: RB5 mainboard DIP switches................................................................................................................. 30
Figure 2-6: Dual-band RF antennas..........................................................................................................................32
Figure 2-7: Metal baseplate..................................................................................................................................... 33
Figure 2-8: Metal baseplate with fin/fan................................................................................................................. 34
Figure 2-9: Vision mezzanine................................................................................................................................... 35
Figure 2-10: 5G mezzanine board............................................................................................................................ 37
Figure 3-1: F_DL key................................................................................................................................................. 42
Figure 4-1: Pairing notification.................................................................................................................................50
Figure 4-2: Connecting RB5 platform to display monitor with HDMI cable............................................................. 52
Figure 4-3: Weston flower pattern...........................................................................................................................53
Figure 4-4: Weston simple EGL client application.................................................................................................... 53
Figure 4-5: Components connecting camera to vision board.................................................................................. 56
Figure 4-6: Video playback on display......................................................................................................................73
Figure 4-7: Camera preview on display.................................................................................................................... 73
Figure 4-8: Image preview on display...................................................................................................................... 74

80-88500-5 Rev. AE 5
1 Introduction

®
This document provides a description of the Qualcomm Robotics RB5 Development Kit hardware
elements, instructions for setting up the platform and updating the system software, and guidance for
getting started with software application development in a Linux environment. This document is
intended for software developers who are interested in application software development and system
®
software customization for products based on the Qualcomm Robotics RB5 Platform.
The Robotics RB5 Platform supports both Linux Ubuntu and Linux Embedded operating systems. In
this document, information that is unique to an operating system is presented using separate heads.
For technical support, see https://www.qualcomm.com/support.

80-88500-5 Rev. AE 6
2 Hardware overview

The Qualcomm Robotics RB5 development kit includes the Qualcomm QRB5165 system-on-module
(SoM), which includes the main processor, SDRAM, Flash memory, and wireless connectivity
components. The SoM is mounted on the Robotics RB5 development kit mainboard, which also
includes multiple connectors to support a variety of different peripheral interfaces and stackable
mezzanine cards.

Figure 2-1 RB5 development board with optional accessories


The following tables list hardware components of the SoM and the RB5 development kit:
Table 2-1 Hardware components of the QRB5165 SoM

SoM component Name Details


®
Processor Qualcomm QRB5165 Qualcomm Kryo™ CPU 585
®
Qualcomm Adreno™ GPU 650
®
Qualcomm Hexagon™ DSP

80-88500-5 Rev. AE 7
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-1 Hardware components of the QRB5165 SoM (cont.)

SoM component Name Details


Qualcomm Spectra™ 480 image-processing engine
®
Qualcomm Adreno™ VPU 665 video encode/decode
®
Qualcomm Adreno™ DPU 995 display
®
Qualcomm Sensing Hub
®
Qualcomm Secure Processing Unit SPU240
®
Qualcomm Neural Processing Unit NPU230
SDRAM memory – 8 GB LPDDR5 2750 MHz Package-on-Package (PoP)
UFS Flash memory – 128 GB UFS
®
WLAN/Bluetooth wireless Qualcomm QCA639X 2.4 GHz/5 GHz, 2 × 2 MIMO, 802.11a/b/g/n/ac/ax
technology

Table 2-2 Hardware components of the development kit

Mainboard component Name Details

DSI to HDMI bridge Lontium LT9611UCX 4K at 60-Hz HDMI support with I2S audio
USB hub Genesys GL3590 USB 3.1 Gen2 10 Gb 4-port hub controller
USB to LAN ASIX AX88179 USB 3.0 Gb to 1 Gb Ethernet controller
Audio amplifiers x2 Qualcomm WSA8815 Class-D SoundWire audio amplifier
CAN bus controller Microchip MCP2518FD External CAN controller with SPI
Sensor TDK ICM-42688-P 3-axis gyroscope and 3-axis accelerometer
Onboard digital TDK T5818 PDM digital MEMS microphone
microphone
USB connector USB Type-C USB Type-C with display port (direct connect to
processor)
USB connector USB Type-A (host mode) USB 3.1 Gen 2 through USB hub
HDMI HDMI Type-A Up to 4K at 60 Hz with audio
Power DC power input +12 V from wall supply
microSD card microSD card microSD card tray
Antenna Antenna 0 2.4/5 GHz printed antenna
Antenna Antenna 1 2.4/5 GHz printed antenna
Debug UART microUSB connector Connector with FTDI USB to UART converter
Ethernet RJ45 Ethernet connector Ethernet through USB 3.0 (1 Gb)

Identify a hardware variant


The hardware in RB5 is available in two variants:
■ Package-on-Package (POP)
■ Non-POP

80-88500-5 Rev. AE 8
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

To flash an appropriate build, you need to identify the appropriate RB5 hardware variant. To identify
the hardware variant, run the following command:
adb shell `cat /sys/devices/soc0/soc_id`
An output of 455 denotes that the hardware is a POP variant, and an output of 496 denotes a non-
POP variant.

2.1 What is included


The Qualcomm Robotics RB5 development kit is available in two different versions: Core kit and
Vision kit.
The following are the components in the corresponding kits:
■ Qualcomm Robotics RB5 Core kit
□ Qualcomm Robotics RB5 mainboard
□ Setup Guide
□ Power supply (12 V)
□ USB-A to USB-C cable

■ Qualcomm Robotics RB5 Vision kit


□ Qualcomm Robotics RB5 Core kit
□ Qualcomm Robotics Vision mezzanine board
□ IMX577 main camera
□ OV9282 tracking camera

■ Additional optional accessories (purchased separately)


□ 5G mezzanine board
□ Depth camera (Intel Realsense D435I)
□ Time of Flight (TOF) camera (Panasonic TOF V4T)

NOTE The development kits do not include pre-installed system software. Therefore, the LEDs
on the board do not switch ON until you download the required tools and complete the
build and flash processes.

For instructions to install system software, see Update software.

2.2 What you will need


Additional equipment that is needed to work with the RB5 development kit:
■ HDMI monitor
■ Host machine
■ USB keyboard

80-88500-5 Rev. AE 9
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

■ USB mouse
■ WLAN connection

2.3 RB5 mainboard


The following figure shows a block diagram of the RB5 mainboard. A grouping of the different
interfaces to subsystems, such as camera, display, and USB, is also displayed. This type of
representation enables you to understand the port and interface specifications that are used for the
device operations.

Figure 2-2 RB5 block diagram

80-88500-5 Rev. AE 10
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

2.3.1 RB5 mainboard connectors


The following figure shows how the different connectors are located on the RB5 mainboard using top
and bottom views. The low-speed, high-speed, HDMI, USB, and power connectors are located at the
top of the board. The Ethernet, antenna, microSD card, and debug UART connectors are located at
the bottom of the board. Knowing the placement of these connectors is useful in configuring and
debugging them easily and effectively.

Figure 2-3 RB5 mainboard top and bottom connectors


Table 2-3 Mainboard connectors

Mainboard
Label Name Details
connectors

1 Low-speed LS1 Low-speed interface: SPI, I2C, UART, I2S/PCM, GPIO


connector power
2 Low-speed LS2 Low-speed interface: SPI, I2C, UART, I2S/PCM, DMIC,
connector speakers, CAN, PWMs, ADCs, GPIO power
3 Low-speed LS3 Low-speed interface: SPI, I2C, UART, sensor core,
connector GPIO power, reference clocks
4 High-speed HS2 PCIe, CSI, SPI/UART/ I2C, USB SS, GPIOs
connector
5 High-speed HS3 PCIe, CSI, DSI, reference clocks
connector
6 High-speed HS1 SDIO, DSI, CSI, HS USB, I2C
connector
7 HDMI HDMI Type-A Up to 4K at 60 Hz with audio

80-88500-5 Rev. AE 11
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-3 Mainboard connectors (cont.)

Mainboard
Label Name Details
connectors

8 USB connector USB Type-C USB Type-C with display port (direct connect to
processor). ADB works on this port.
9 USB connector USB Type-A (host USB 3.1 Gen 2 through USB hub
mode)
10 USB connector USB Type-A (host USB 3.1 Gen 2 through USB hub
mode)
11 Ethernet RJ45 Ethernet Ethernet through USB 3.0 (1 GB)
connector
12 Power DC power input +12-V wall power supply
13 Antenna Antenna1 2.4/5 GHz printed antenna
14 Antenna Antenna0 2.4/5 GHz printed antenna
15 microSD card microSD card microSD card tray
16 Debug UART microUSB Connector with FTDI USB to UART converter
connector

2.3.1.1 Low-speed expansion connectors

Low-speed expansion connector 1


The low-speed expansion connector 1 provides the following functionalities:
■ 2x UART
■ 2x I2C
■ 1x SPI
■ 1x PCM
■ 12x GPIOs
■ DC power
■ Ground
The GPIOs labeled Qualcomm Universal Peripheral (QUP) have additional low-speed interface
capabilities (UART, SPI, I2C).
■ For more details on how to use the QUP interfaces, see Qualcomm Robotics RB5 Platform
Software Porting Guide (80-88500-1).
■ For the pin map and GPIO details, see QRB5165 Pin Assignment and GPIO Configuration
Spreadsheet (80-PV086-1A) on www.qualcomm.com. Several GPIOs can be used to wake up the
application processor.

80-88500-5 Rev. AE 12
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Low-speed interfaces can be used to control various peripherals, such as audio functions.

Table 2-4 Low-speed expansion connector 1

Wake-up SoM SoM Wake-up


Additional info GPIO Signal Pin number Signal GPIO Additional info
function pin pin function

– – – – GND 1 2 GND – – – –
– QUP13 E42 36 UART0_CTS 3 4 PWR_BTN_N – A40 PHONE_ON –
– QUP13 D42 38 UART0_TXD 5 6 RST_BTN_N – A42 VOL- –
Yes QUP13 D40 39 UART0_RXD 7 8 SPI0_SCLK 54 C42 QUP17 –
– QUP13 D41 37 UART0_RTS 9 10 SPI0_MISO 52 G36 QUP17 –
Yes QUP12 C45 35 UART1_TXD 11 12 SPI0_CS 55 F36 QUP17 Yes
– QUP12 B46 34 UART1_RXD 13 14 SPI0_MOSI 53 F37 QUP17 –
– QUP4 D35 9 I2C0_SCL 15 16 PCM_FS 141 A10 PCM_FS/I2S0_WS –
– QUP4 A46 8 I2C0_SDA 17 18 PCM_CLK 138 D37 PCM_CLK/I2S0_CLK Yes
– QUP15 E43 45 I2C1_SCL 19 20 PCM_DO 140 D38 PCM_DO/I2S0_D1 –
Yes QUP15 F44 44 I2C1_SDA 21 22 PCM_DI 139 F40 PCM_DI/I2S0_D0 –
Yes QUP1 H33 4 GPIO-A 23 24 GPIO-B 136 K39 PCM0_MCLK Yes
– QUP1 H31 5 GPIO-C 25 26 GPIO-D 7 H32 QUP1 Yes
– QUP1 H30 6 GPIO-E 27 28 GPIO-F* 46 E41 DISPLAYMIPI_ERR_FG/ –
QUP15
Yes DISPLAYVSYNC F43 66 GPIO-G a 29 30 GPIO-H* 116 K41 DISP_RST_N –
Yes CAM0_RST_N K37 93 GPIO-I b 31 32 GPIO-J~ 114 J30 CAM0_PWDN –
Yes CAM1_RST_N G42 92 GPIO-K 33 34 GPIO-L~ 109 J31 CAM1_PWDN Yes
– VREG_S4A_1P8 D45 N/A 1.8 V-A 35 36 SYS_DCIN N/A – DC12V from barrel jack –
– From on board – N/A 5V 37 38 SYS_DCIN N/A – DC12V from barrel jack –
regulator
– – – – GND 39 40 GND – – – –
a dedicated display GPIOs (can be used for other functions)
b dedicated camera GPIOs (can be used for other functions)

80-88500-5 Rev. AE 13
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Low-speed expansion connector 2


The low-speed expansion connector 2 provides the following functionalities:
■ 3x DMIC support
■ Additional 4‑bit I2S audio interface
■ CAN interface
■ Stereo audio amp outputs
■ 2x camera CCI I2C
■ PMIC PWM and ADC pins
■ 1x QUP interface
■ Spare GPIOs
■ Battery ID/therm
■ Other additional functions

80-88500-5 Rev. AE 14
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Low-speed interfaces can be used to control various peripherals, such as audio functions.

Table 2-5 Low-speed expansion connector 2

Wake-up SoM SoM Wake-up


Additional info GPIO Signal Pin number Signal GPIO Additional info
function pin pin function

– CAM3_RST_N G44 144 GPIO-U 1 2 GPIO-Z 25 J36 CAM4_RST_N –


– – K43 152 DMIC CLK1 3 4 CAN_H – – From onboard CAN –
– – K44 153 DMIC DATA1 5 6 CAN_L – – From onboard CAN –
Yes I2S1_DATA2/extcodec/ K30 150 GPIO-V 7 8 1.8V-A – D45 – –
CAM0_STROBE_N
– – J43 154 DMIC CLK2 9 10 GND – – – –
– – J44 155 DMIC DATA2 11 12 PM_GPIO-A – K38 PMGPIO 6 (PM8150L) - –
PWM
– I2S1_DATA3/extcodec/ K31 151 GPIO-W 13 14 PM_GPIO-B – A8 PMGPIO 10 (PM8150L) - –
CAM5_RST_N PWM
Yes – J45 158 DMIC CLK3 15 16 GPIO-M 125 A9 QUP9 –
– – J46 159 DMIC DATA3 17 18 GPIO-N 126 B45 QUP9 Yes
– PM8250_GPIO3 C5 PM_GPIO-F 19 20 GPIO-O 127 B40 QUP9 –
– CCI_I2C_SCL2 H35 106 CCI_I2C_SCL2 21 22 GPIO-P 128 D5 QUP9/ Yes
BOOT_CONFIG_0
– CCI_I2C_SDA2 H34 105 CCI_I2C_SDA2 23 24 GPIO-Q 147 K27 I2S1_WS/extcodec/ Yes
SWIRE
Yes CCI_I2C_SCL3 H36 108 CCI_I2C_SCL3 25 26 GPIO-R 146 K26 I2S1_CLK/extcodec/ –
SWIRE
– From onboard WSA amp – – SPK0_P 27 28 GPIO-S 148 K28 I2S1_DATA0/extcodec –
– From onboard WSA amp – – SKP0_M 29 30 GPIO-T 149 K29 I2S1_DATA1/extcodec –
– From onboard WSA amp – – SPK1_P 31 32 PM_AMUX1 – C7 PM8150LAMUX1 - ADC –
– From onboard WSA amp – – SPK1_M 33 34 PM_AMUX2 – C9 PM8150BAMUX1 - ADC –
– CCI_I2C_SDA3 J35 107 CCI_I2C_SDA3 35 36 BATT_THERM – K46 BATT_THERM –
– PM8250 AMUX1/ B38 – PM_AMUX3 37 38 BATT_ID – K45 PM8150B- BATT_ID –
MDM_SKIN_THERM

80-88500-5 Rev. AE 15
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-5 Low-speed expansion connector 2 (cont.)

Wake-up SoM SoM Wake-up


Additional info GPIO Signal Pin number Signal GPIO Additional info
function pin pin function

– or VPH_PWR J47 – VBAT 39 40 USB_VBUS – E47 USB_VBUS –


– – – – GND 41 42 GND – – – –
– CAM0_STROBE J27 14 GPIO-X 43 44 GPIO-AA 64 D36 CAM4_PWDN/ –
QUP14extra CS
– CAM4_PWDN E37 145 GPIO-Y 45 46 GPIO-BB 27 B47 CAM5_PWDN/ –
BOOT_CONFIG_1

80-88500-5 Rev. AE 16
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Low-speed expansion connector 3


The low-speed expansion connector 3 provides the following functionalities:
■ Four Qualcomm sensor core Qualcomm Universal Peripheral (QUP) interfaces. For more
information about configuring I2C, SPI, UART, see Qualcomm Robotics RB5 Platform Software
Porting Guide (80-88500-1).
■ Interrupts signals for sensors.
■ Additional GPIOs and power supplies.

80-88500-5 Rev. AE 17
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

The GPIOs labeled QUP have additional low-speed interface capabilities (UART, SPI, I2C). Several GPIOs can be used to wake up the application
processor.

Table 2-6 Low-speed expansion connector 3

Wake-up SoM Pin SoM Wake-up


Additional info GPIO Signal Signal GPIO Additional info
function pin number pin function

– CAM2_STROBE G22 100 GPIO-KK 1 2 GPIO-TT 10 E36 CAM4_STROBE –


– PMIC F41 – SLEEP_CLK 3 4 CLK – B35 PMK8002_PMIC_CLK –
– CAM3_STROBE J34 67 GPIO-LL 5 6 GPIO-UU 32 C46 CAM5_STROBE –
Yes QUP19 K32 0 GPIO-MM 7 8 GPIO-YY 115 K40 – –
Yes QUP19 E39 1 GPIO-NN 9 10 GPIO-ZZ 70 K42 – –
Yes QUP19 F38 2 GPIO-OO 11 12 GPIO-VV 88 C40 – Yes
– QUP7 G40 22 GPIO-AAA 13 14 GPIO-WW 89 C41 – Yes
Yes QUP7 G41 23 GPIO-BBB 15 16 SPI3_MISO 172 H43 SSCQUP5 –
Yes – G32 24 GPIO-CCC 17 18 SPI3_MOSI 173 H40 SSCQUP5 –
Yes QUP19 E38 3 GPIO-PP 19 20 SPI3_CLK 174 H41 SSCQUP5 –
– QUP18 G35 56 GPIO-QQ 21 22 SPI3_CS 175 H42 SSCQUP5 Yes
Yes SSC QUP2 J38 166 SPI2_CLK 23 24 PS_INT 129 B41 sensor int Yes
– SSC QUP2 J41 165 SPI2_MOSI 25 26 ACCEL_INT 112 J33 sensor int Yes
Yes SSC QUP2 J40 164 SPI2_MISO 27 28 GYRO_INT 113 J32 sensor int Yes
Yes SSC QUP2 J39 167 SPI2_ACCEL_CS 29 30 MAG_INT 122 J29 sensor int Yes
– SSC QUP2 B2 168 SPI2_CS1 31 32 MAG_DRDY_INT 123 K35 sensor int Yes
Yes SSCQUP5 Extra CS B7 162 SPI3_CS1 33 34 I2C4_SDA 160 J37 SSCQUP0 Yes
(sensor)
– VREG_L8C_1P8 for sensors B42 – 1.8 V-B 35 36 I2C4_SCL 161 H37 SSCQUP0 –
(sensor)
– From onboard regulator – 5V 37 38 1.8V-C – B43 VREG_L5C_1P8 –
– VBATT_CONN_VSENSE_P H47 – VBAT 39 40 GND – – – –
– VBATT_CONN_VSENSE_M G47 – GND 41 42 GND – – – –

80-88500-5 Rev. AE 18
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-6 Low-speed expansion connector 3 (cont.)

Wake-up SoM Pin SoM Wake-up


Additional info GPIO Signal Signal GPIO Additional info
function pin number pin function

– QUP18 F34 57 GPIO-RR 43 44 SPI3_CS2 163 B8 SSCQUP5 Extra CS –


– SSCQUP4/I2C_SDA H38 170 GPIO-SS 45 46 GPIO-XX 171 H39 SSCQUP4/I2S_SCL –

80-88500-5 Rev. AE 19
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

2.3.1.2 High-speed expansion connectors

High-speed expansion connector 1


The high-speed expansion connector 1 provides the following functionalities:
■ SDIO interface
■ Display DSI
■ 2x camera CSI
■ Camera MCLK
■ Camera CCI I2C
■ USB DP/DM

80-88500-5 Rev. AE 20
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-7 High-speed expansion connector 1

Wake-up Wake-up
Additional info SoM pin GPIO Signal Pin number Signal GPIO SoM pin Additional info
function function

– SDC4_DATA0/ A39 76 SD_DAT0 1 2 CSI0_C_P – J11 – –


BOOT_CONFIG_3
– SDC4_DATA1 A38 75 SD_DAT1 3 4 CSI0_C_M – H11 – –
– SDC4_DATA2 A4 74 SD_DAT2 5 6 GND – – – –
– SDC4_DATA3 E45 72 SD_DAT3 7 8 CSI0_D0_P – J12 – –
– SDC4_SCLK D44 73 SD_SCLK 9 10 CSI0_D0_M – K12 – –
– SDC4_CMD E44 71 SD_CMD 11 12 GND – – – –
– – – – GND 13 14 CSI0_D1_P – H13 – –
– – G12 94 CLK0/CSI0_MCLK 15 16 CSI0_D1_M – J13 – –
– – G18 97 CLK3/CSI3_MCLK 17 18 GND – – – –
– – – – GND 19 20 CSI0_D2_P – H15 – –
– – J17 – DSI0_CLK_P 21 22 CSI0_D2_M – J15 – –
– – H17 – DSI0_CLK_M 23 24 GND – – – –
– – – – GND 25 26 CSI0_D3_P – J14 – –
– – K16 – DSI0_D0_P 27 28 CSI0_D3_M – K14 – –
– – J16 – DSI0_D0_M 29 30 GND – – – –
– – – – GND 31 32 CCI_I2C_SDA0 101 G28 – –
– – K18 – DSI0_D1_P 33 34 CCI_I2C_SCL0 102 G29 – –
– – H17 – DSI0_D1_M 35 36 CCI_I2C_SDA1 103 G30 – Yes
– – – – GND 37 38 CCI_I2C_SCL1 104 G31 – Yes
– – J19 – DSI0_D2_P 39 40 GND – – – –
– – H19 – DSI0_D2_M 41 42 CSI3_D0_P – B19 – –
– – – – GND 43 44 CSI3_D0_M – A19 – –
– – K20 – DSI0_D3_P 45 46 GND – – – –
– – J20 – DSI0_D3_M 47 48 CSI3_D1_P – B23 – –

80-88500-5 Rev. AE 21
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-7 High-speed expansion connector 1 (cont.)

Wake-up Wake-up
Additional info SoM pin GPIO Signal Pin number Signal GPIO SoM pin Additional info
function function

– – – – GND 49 50 CSI3_D1_M – A23 – –


– From USB hub – – USB_DP 51 52 GND – – – –
– From USB hub – – USB_DM 53 54 CSI3_C_P – C20 – –
– – – – GND 55 56 CSI3_C_M – B20 – –
– – – – NC 57 58 GND – – – –
– – – – NC 59 60 RESERVED – – – –

80-88500-5 Rev. AE 22
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

High-speed expansion connector 2


The high-speed expansion connector 2 provides the following functionalities:
■ PCIe interface and control signals
■ 2x camera CSI
■ SPI/QUP interface
■ Camera MCLKx2
■ Additional GPIOs
■ USB SS signals

80-88500-5 Rev. AE 23
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-8 High-speed expansion connector 2

Wake-up SoM SoM Wake-up


Additional info GPIO Signal Pin number Signal GPIO Additional info
function pin pin function

– – D13 – PCIE1_REFCLK_M 1 2 CSI1_C_P – B17 – –


– – E13 – PCIE1_REFCLK_P 3 4 CSI1_C_M – A17 – –
– – D11 – PCIE1_RX_M 5 6 GND – – –
– – E11 – PCIE1_RX_P 7 8 CSI1_D0_P – C16 – –
– – D15 – PCIE1_TX_M 9 10 CSI1_D0_M – B16 – –
– – E15 – PCIE1_TX_P 11 12 GND – – –
– PCIE1_RST_N G37 82 GPIO-CC 13 14 CSI1_D1_P – C18 – –
Yes PCIE1_CLK_REQ_N G39 83 GPIO-DD 15 16 CSI1_D1_M – B18 – –
Yes PCIE1_WAKE_N G38 84 GPIO-EE 17 18 GND – – – –
– PCIE2_RST_N F39 85 GPIO-FF 19 20 CSI1_D2_P – B15 – –
Yes PCIE2_CLK_REQ_N D39 86 GPIO-GG 21 22 CSI1_D2_M – A15 – –
Yes PCIE2_WAKE_N J42 87 GPIO-HH 23 24 GND – – – –
– – – – GND 25 26 CSI1_D3_P – C14 – –
– – G14 95 CLK1/CSI1_MCLK 27 28 CSI1_D3_M – B14 – –
– – G16 96 CLK2/CSI2_MCLK 29 30 GND – – – –
– – – – GND 31 32 SPI1_CLK 42 B36 QUP14 –
– – E20 – CSI2_C_P 33 34 SPI1_CS 43 C36 QUP14 Yes
– – F20 – CSI2_C_M 35 36 SPI1_MOSI 41 B37 QUP14 –
– – – – GND 37 38 SPI1_MISO 40 C37 QUP14 Yes
– – D19 – CSI2_D0_P 39 40 CLK4/CSI4_MCLK 98 G20 – –
– – E19 – CSI2_D0_M 41 42 CLK5/CSI5_MCLK 99 G24 – –
– – – – GND 43 44 GPIO-II 78 G26 CAM2_RST_N –
– – E18 – CSI2_D1_P 45 46 GPIO-JJ 47 E40 CAM2_PWDN/QUP14 –
extraCS/QUP15/
BOOT_CONFIG_2
– – F18 – CSI2_D1_M 47 48 PMICSPMI CLK – E34 – –

80-88500-5 Rev. AE 24
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-8 High-speed expansion connector 2 (cont.)

Wake-up SoM SoM Wake-up


Additional info GPIO Signal Pin number Signal GPIO Additional info
function pin pin function

– – – – GND 49 50 PMIC SPMI DATA – E35 – –


– – D17 – CSI2_D2_P 51 52 GND – – – –
– – E17 – CSI2_D2_M 53 54 USB_SS_TX0_P – – From USB hub –
– – – – GND 55 56 USB_SS_TX0_M – – From USB hub –
– – E16 – CSI2_D3_P 57 58 USB_SS_RX0_P – – From USB hub –
– – F16 – CSI2_D3_M 59 60 USB_SS_RX0_M – – From USB hub –

80-88500-5 Rev. AE 25
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

High-speed expansion connector 3


The high-speed expansion connector 3 provides the following functionalities:
■ Additional PCIe interface
■ Additional camera CSI interface
■ Additional display DSI interface
■ Additional clock signals

80-88500-5 Rev. AE 26
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-9 High-speed expansion connector 3

Wake-up Wake-up
Additional info SoM pin GPIO Signal Pin number Signal GPIO SoM pin Additional info
function function

– – E24 – CSI4_C_P 1 2 GND – – – –


– – F24 – CSI4_C_M 3 4 PCIE1_RX1_M – E12 – –
– – D23 – CSI4_D0_P 5 6 PCIE1_RX1_P – F12 – –
– – E23 – CSI4_D0_M 7 8 PCIE1_TX1_M – E14 – –
– – – – GND 9 10 PCIE1_TX1_P – F14 – –
– – D25 – CSI4_D1_P 11 12 GND – – – –
– – E25 – CSI4_D1_M 13 14 PCIE2_REFCLK_M – J21 – –
– – E22 – CSI4_D2_P 15 16 PCIE2_REFCLK_P – H21 – –
– – F22 – CSI4_D2_M 17 18 PCIE2_RX0_M – J23 – –
– – D21 – CSI4_D3_P 19 20 PCIE2_RX0_P – H23 – –
– – E21 – CSI4_D3_M 21 22 PCIE2_RX1_M – K22 – –
– – – – GND 23 24 PCIE2_RX1_P – J22 – –
– – C22 – CSI3_D2_P 25 26 PCIE2_TX0_M – K24 – –
– – B22 – CSI3_D2_M 27 28 PCIE2_TX0_P – J24 – –
– – B21 – CSI3_D3_P 29 30 PCIE2_TX1_M – J25 – –
– – A21 – CSI3_D3_M 31 32 PCIE2_TX1_P – H25 – –
– – – – GND 33 34 GND – – – –
– – E30 – CSI5_C_P 35 36 DSI1_CLK_P – A25 – –
– – F30 – CSI5_C_M 37 38 DSI1_CLK_M – B25 – –
– – D27 – CSI5_D0_P 39 40 DSI1_D0_P – B26 – –
– – E27 – CSI5_D0_M 41 42 DSI1_D0_M – C26 – –
– – D29 – CSI5_D1_P 43 44 DSI1_D1_P – A27 – –
– – E29 – CSI5_D1_M 45 46 DSI1_D1_M – B27 – –
– – E28 – CSI5_D2_P 47 48 GND – – – –

80-88500-5 Rev. AE 27
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-9 High-speed expansion connector 3 (cont.)

Wake-up Wake-up
Additional info SoM pin GPIO Signal Pin number Signal GPIO SoM pin Additional info
function function

– – F28 – CSI5_D2_M 49 50 DSI1_D2_P – B24 – –


– – E26 – CSI5_D3_P 51 52 DSI1_D2_M – C24 – –
– – F26 – CSI5_D3_M 53 54 DSI1_D3_P – B28 – –
– – – – GND 55 56 DSI1_D3_M – C28 – –
– PMIC A35 – PMK8002_RF_CLK1 57 58 GND – – – –
– PMIC A37 – PMK8002_RF_CLK2 59 60 GPIO-DDD 26 K36 – –

80-88500-5 Rev. AE 28
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

2.3.2 RB5 mainboard power


Connect the +12-V power adapter. The board boots up with one of the following options:
■ Using the PWR button
■ Plugging in a USB Type-C cable
■ Setting the CBL_PWR_N DIP switch to the ON position
To view the bootup message logs, plug in a microUSB cable into the debug port and use a serial
terminal (such as PuTTY) or wait for 5–10 seconds for the green light beside the power plug to
illuminate. To reboot the device manually, hold down the PWR button for at least 20 seconds.

NOTE If you plug only the USB Type-C cable, the green LED keeps flashing and the device
does not boot. Ensure to connect the power adapter.

2.3.3 RB5 mainboard LEDs and buttons


The following figure shows the placement of mainboard interfaces: LEDs and buttons on the RB5
mainboard.

Figure 2-4 RB5 mainboard interfaces


Table 2-10 Mainboard interfaces

Label Interface Name Details

1 LEDs Wi-Fi and Bluetooth Yellow: reflects the status of the Wi-Fi device
technology LEDs
Blue: reflects the status of the Bluetooth technology
device
2 LEDs 4 User LEDs Green: driven directly by the SoC
3 Push-button Force USB boot Momentary switch (F_DL): used for emergency USB
switch boot
4 Push-button Power on Momentary switch: serves as the power ON/OFF/Sleep
switch button

80-88500-5 Rev. AE 29
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-10 Mainboard interfaces (cont.)

Label Interface Name Details

5 Push-button Vol- Momentary switch: serves as a reset button and as a


switch volume control button
The reset function must be a software-configured
setting.
6 Push-button Vol+ Momentary switch: used to control the audio volume of
switch the device
7 DIP switches Boot config control (see 4 switches
Table 2-13)
8 DIP switches User controllable 6 switches
options (see Table 2-13)

2.3.4 RB5 DIP switches


The RB5 mainboard provides two DIP switches: DIP_SW_0 and DIP_SW_1.

Figure 2-5 RB5 mainboard DIP switches


Table 2-11 Board configuration DIP switches

DIP_SW_0 Name Details Default

1 Mic switch ON: on board DMIC OFF


OFF: off board DMIC
2 Debug UART ON: debug UART ON
OFF: off board UART
3 CBL_PWR_N ON: auto-power-up OFF
OFF: push the power button to power up
4 HDMI switch ON: DSIO to HS1 connector ON
OFF: DSIO to HDMI bridge
5 Sensor IMU toggle ON: SPI to LS3 connector ON
OFF: SPI to onboard IMU
6 IMU external clock ON: external clock to IMU OFF
OFF: internal clock to IMU

80-88500-5 Rev. AE 30
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Table 2-12 Boot configuration DIP switches

DIP_SW_1 Name Details Default

1 BOOT_CONFIG_1 [GPIO_27] Selects external boot devices (see Table 2-13) OFF
2 BOOT_CONFIG_2 [GPIO_47] OFF
3 BOOT_CONFIG_3 [GPIO_76] OFF
4 BOOT_CONFIG_0 [GPIO_128] ON – disables watchdog OFF
OFF – enables watchdog

The following table indicates the external boot device selection for the RB5 platform based on the
DIP_SW_1 (1, 2, and 3):
Table 2-13 External boot device selection for RB5 platform

GPIO number

FAST_BOOT
90 76 47 27 Order of boot device selection
GPIO bit (3:0)

0000 0 0 0 0 Default: UFS0 → SDC2 → USB0 → EDL


(USB0)
0001 0 0 0 1 SDC2 → USB0 → EDL (USB0)
0010 0 0 1 0 SDC2 → EDL (USB0)
0011 0 0 1 1 USB0 → EDL (SDC2 → USB0)
0100 0 1 0 0 QSPI → EDL (SDC2 → USB0)
0101 0 1 0 1 SPI → EDL (SDC2 → USB0)
0110 0 1 1 0 UFS0 → USB0 → EDL (USB0)
0111 0 1 1 1 Same as fastboot (3:0) = 0000
UFS0 → SDC2 → USB0 → EDL (USB0)

Terms used in the table:


■ UFS: Universal Flash storage
■ SDC: Secure disk card
■ USB0: USB storage device
■ EDL: Emergency Download (EDL) mode or Qualcomm Download (QDL) mode
For example, FAST_BOOT_GPIO bit (3:0) → 0000; indicates selection of the external boot devices
for the RB5 platform in the following order: UFS0 → SDC2 → USB0 → EDL (USB0). The following is
the priority: first UFS0, second SDC2, third USB0. If no external devices are detected, the device falls
back to the EDL mode. When power is applied, FORCE_USB_BOOT (GPIO_132) is checked first,
regardless of the state of the BOOT_CONFIG GPIOs or FAST_BOOT_SEL fuses.

NOTE If the board is not powering up, check the setting on DIP switch 3 for the intended
behavior. If the DIP_SW_0 switch 3 is OFF, the boards will not automatically power up
unless USB Type-C is plugged in. To automatically boot up, set the DIP_SW_0 switch 3
to ON.

80-88500-5 Rev. AE 31
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

2.3.5 RB5 mainboard RF antennas


RB5 uses two dual-band, 2.4/5 GHz, WLAN/Bluetooth technology antennas on the mainboard.
■ To avoid detuning the antennas, use nylon standoffs for mounting holes and check that there is no
metal directly above or below the antennas.
■ QCA639x supports 2 × 2 MIMO with 2x Wi-Fi antenna ports and 1x Bluetooth technology antenna
port (Bluetooth technology antenna can be dedicated or shared with one of the Wi-Fi antennas).
■ Current system-on-module uses a shared Wi-Fi/Bluetooth technology approach on RF chain 0.
■ System-on-module has the option to route RF signals through the board-to-board connector to the
mainboard to eliminate the need for external coaxial cables (current configuration).
A resistor change on the SoM allows you to plug in dual-external antennas on the SoM by using
industry standard MHF-4 coax connectors (move resistor R3311 to R3310 and move resistor R3313 to
R3312).

Figure 2-6 Dual-band RF antennas

80-88500-5 Rev. AE 32
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

2.4 Thermal management


The standard RB5 kit (core or vision) comes with a thin aluminum baseplate for mechanical stability
and thermal management. For high-power use cases (above 6 W power delivered to the processor),
an additional bolt-on fan can be purchased from here, if needed.

Figure 2-7 Metal baseplate

80-88500-5 Rev. AE 33
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Figure 2-8 Metal baseplate with fin/fan

2.5 RB5 mezzanine boards


The RB5 development kit supports vision and 5G mezzanine boards.

80-88500-5 Rev. AE 34
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Vision mezzanine
The vision mezzanine is intended to support interfacing cameras to the RB5 platform. This mezzanine
also adds gigabit multimedia serial links (GMSL) as well as 4 DMICs.

Figure 2-9 Vision mezzanine


The following key components are supported on the vision mezzanine:

Camera
■ 2x GMSL2 camera inputs (using MAX9296A), CSI4 and CSI5
■ Five CAM/CSI camera ports with identical pinouts: CSI0 is split into two cameras (CAM0A and
CAM0B)
■ CAM3 connector includes an option for a higher supply voltage of 5 V and accommodates the
Panasonic TOF camera
■ CAM0B has a parallel/duplicated connector
■ Main camera (IMX577); part number: CMK-IMX577-B-V2.0, intended to be plugged into connector
CAM2, CSI2
■ Tracking camera (OV9282); part number: CMK-VR-OV9282-V1.0, intended to be plugged into
connector CAM1, CSI1
Sensors
■ TDK ICM-42688-P IMU (located on the back side of the board)
■ AKM compass/magnetometer AK09919
■ TDK pressure sensor (ICP-10111)

80-88500-5 Rev. AE 35
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

Audio
■ Four digital PDM mics that interface directly with the RB5 platform
■ Speaker connectors

Table 2-14 Vision mezzanine DIP switches

DIP1 Name Details Default

1 SENSOR_SPI_PASSTHRU ON: SSC sensor SPI routed to IMU_SPI_SELECT OFF


switch
OFF: IMU sensor SPI pass through (SSC QUP2)
2 QUP_9_PASSTHRU ON: QUP 9 routed to IMU_SPI_SELECT switch OFF
OFF: pass through
3 QUP_14_PASSTHRU ON: SPI to CAM2 connector OFF
OFF: pass through
4 PRESS_SENS_DISCONNECT ON: on board OFF
OFF: disconnected
5 MAG_SENSOR_DISCONNECT ON: on board OFF
OFF: disconnected
6 UART0_PASSTHRU ON: on board OFF
OFF: pass through
DIP2 Name Details Default
1 DIP_CSI0A_B_SWITCH ON: CSI0 all 4 lanes to CAM0A OFF
OFF: CSI0 2 lanes to CAM0A, 1 lane to CAM0B
2 MIC_DISCONNECT ON: DMIC 2/3 connects to onboard mics OFF
OFF: DMIC 2/3 pass through
3 IMU_SPI_SELECT ON: connects IMU to QUP9 (AP) – only if DIP 1:2 is OFF
ON
OFF: connects IMU to QUP2 (SSC) – only if DIP 1:1 is
ON
4 IMU_INT_1_2_SELECT_LOGIC1 ON: IMU INT1 to GYRO_INT (GPIO 113), IMU INT2 to OFF
PMIC clock
OFF: IMU INT1 and 2 connected to IMU sensor switch
5 IMU_INT_1_2_SELECT_LOGIC2 ON: IMU INT1 to ACCEL_INT (GPIO 112), IMU INT2 OFF
to GYRO_INT (GPIO 113)
OFF: IMU INT 1 and 2 disconnected
6 PRESSURE_COMPASS_SELECT ON: Pressure/Compass connected to AP I2C (QUP4) OFF
OFF: Pressure/Compass connected to sensor core
I2C (SSC QUP0)

80-88500-5 Rev. AE 36
Qualcomm Robotics RB5 Development Kit User Guide Hardware overview

5G mezzanine
The 5G mezzanine provides support to interface a 5G M.2 module with the RB5 platform. Other WAN
M.2 components can also be used; for example, 4G LTE modules.

Figure 2-10 5G mezzanine board


Table 2-15 5G mezzanine DIP switches

DIP1 Name Details Default

1 MODULE_PWRKEY ON: manually power on the 5G module OFF


OFF: software controls the power-on Via GPIO
2 MODULE_W_DISABLED ON: airplane mode ON OFF
OFF: software controls airplane mode selection via GPIO
3 GPS_DISABLE_N ON: GPS disabled OFF
OFF: software controls GPS enable/disable via GPIO
4 DYN_PWR_CTRL ON: dynamic power control enabled OFF
OFF: dynamic power control disabled
5 MODULE3V3_L-4V2_HESEL ON: module voltage set to 3.3 V OFF
OFF: module voltage set to 4.2 V
6 N/A N/A OFF

80-88500-5 Rev. AE 37
3 Update software

The system software for the RB5 development kit is a combination of multiple subsystem binaries for
the application processor and various subsystems available on the chipset. There are various
methods to flash the latest software release on to the RB5 development board.
■ Procedure from Thundercomm
If you intend to flash the original system software from the manufacturer, then you must follow the
steps that are described in the Thundercomm SDK Manager User Guide. For this procedure, you
need the following tool:
□ Qualcomm Robotics RB5 SDK Manager
This tool is available from Thundercomm and the instructions for downloading, installing, and
using this tool are available on the Thundercomm website. To use this tool, you must have an
active account with Thundercomm.
■ Procedure from Qualcomm
If you intend to flash a selected system software release provided by Qualcomm, then you must
follow the procedures that are described in this document. For these procedures, you need the
following tools:
□ Qualcomm Package Manager (QPM)
□ Qualcomm Product Configuration Assistance (PCAT) tool
□ Qualcomm USB driver (QUD)
□ Qualcomm Unified Tools Service (QUTS)
These tools are available from Qualcomm and the instructions for downloading and installing
these tools are included in this document. To use these tools, you need to have an active account
with Qualcomm.

NOTE To download, build, and compile the software, see a selected software Release Notes
from Qualcomm.

3.1 Host system prerequisites


The host system should meet the following minimum requirements:
■ X86 machine.
■ At least 200 GB free disk space.
■ Linux Distro: Ubuntu 20.04 LTS. (Do not use other versions: 14.04/16.04/18.04/19.04).

80-88500-5 Rev. AE 38
Qualcomm Robotics RB5 Development Kit User Guide Update software

■ Minimum of 16 GB RAM.
■ Quad-core CPU, for example, Intel i7-2600 at 3.4 GHz (equivalent or better).

NOTE A virtual machine environment is not recommended to build the software.

3.1.1 Update Ubuntu-based packages


To update Ubuntu-based packages, run the following commands:
adb shell
apt update

3.1.2 Install Android Debug Bridge and fastboot


The Android Debug Bridge (ADB) is a command-line tool that enables communication with the RB5
device. The adb command facilitates various device actions, such as capturing kernel logs, pushing
application and files to the target device, and allowing you to log in to the device to compile
applications.
Fastboot is a program used to list, install, and erase operating system binary images into nonvolatile
memory such as flash file system partitions on devices that adhere to the fastboot protocol, through a
USB connection from a host computer. This method requires the device to be started in the bootloader
mode with the fastboot protocol enabled.
■ To install adb and fastboot, run the following command on the development host:
sudo apt install git android-tools-adb android-tools-fastboot wget

NOTE ■ To flash the device, install the platform tools based on version r29.0.5 from https://
androidsdkmanager.azurewebsites.net/Platformtools.
■ Verify the adb version on the host system by running the following command:
adb --version
Sample output:
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299

3.1.3 Install Qualcomm Package Manager (QPM)


QPM is a lightweight, always-on client software required to install tools from Qualcomm.
For installation instructions, visit the QPM page.
For authentication, the client machine must connect to https://corpawswsgwx.qualcomm.com.

NOTE In case of a missing dependency for libgtkmm-3.0-1v5, run the following command to
install the package file:
sudo dpkg -i --ignore-depends=<package(s) to ignore> <QPM
Linux .deb package file>

80-88500-5 Rev. AE 39
Qualcomm Robotics RB5 Development Kit User Guide Update software

3.1.4 Install Product Configuration Assistant Tool (PCAT)


PCAT is an integrated software package to configure and manage the chipset devices. The PCAT tool
is useful for updating the system software on the target and recovering the device from the QDL mode.
For more information on how to use the PCAT tool, see Qualcomm Product Configuration Assistant
Tool (PCAT) User Guide (80-PR518-1). To install the PCAT tool, do the following:
1. Download and install Mono 6.12.0. For installation instructions, see https://www.mono-
project.com/download/stable/#download-lin.
Mono is a software platform designed to enable developers to easily create cross-platform
applications. Mono is an open-source implementation of Microsoft's .NET Framework as part of
the .NET Foundation and based on the ECMA standards for C# and the Common Language
Runtime. PCAT tool uses the latest Mono version.
Follow the installation instructions for the Ubuntu-based host.
□ To verify the version, run the following command:
mono --version

2. Install the following tools in the specified order. By default, the tools are installed in the /dev
directory. If you choose to install the tools in a different directory, ensure to use the updated file
path appropriately.
a. Qualcomm USB driver (QUD)
b. Qualcomm unified tools service (QUTS)
c. PCAT

3. To verify if you have access to the QUD, QUTS, and PCAT tools, run the following command:
qpm-cli --product-list
The command displays all the products and tools that you have access for.
Sample output:
---- List of products ---- alpaca apex apex7 deepmap .... .... pcat
qcat .... .... qud quts qxdm5
4. To activate QUD, QUTS, and PCAT licenses, run the following commands:
qpm-cli --license-activate qud
qpm-cli --license-activate quts
qpm-cli --license-activate pcat

5. Install QUD, QUTS, and PCAT. Ensure that the tools are installed in the specified order.
qpm-cli --install qud
qpm-cli --install quts
qpm-cli --install pcat

6. To verify the PCAT version number, run the following command:


pcat -version

80-88500-5 Rev. AE 40
Qualcomm Robotics RB5 Development Kit User Guide Update software

7. To display the PCAT command-line usage, run the following command:


pcat -help

3.2 Flash RB5 software


Prerequisites:
■ Ensure that PCAT is installed on the host system.
■ Ensure that a complete build is created on the host system by following the steps in the Release
Notes from Qualcomm.
You can adopt one of the following methods to flash the latest software release to the RB5
development board:
■ To flash using the Qualcomm PCAT tool (when the device is in the QDL mode), see Flash system
with PCAT.
■ To flash using the Qualcomm fastboot script (HLOS and non-HLOS), see Flash system with
fastboot.
■ To flash only the HLOS image, see Flash Linux with fastboot.
To know whether a device is flashed with Linux Ubuntu or Linux Embedded software, do the following:
1. Connect the board to adb, and power-on the device.
2. Once the device is detected as an adb device, run the following command:
adb root
adb shell cat /firmware/verinfo/ver_info.txt | grep "Meta_Build_ID"

NOTE If the build is flashed with Ubuntu, then the build ID displays UBUN, otherwise it is
understood that the device contains Linux Embedded software.

3.2.1 Flash system with PCAT


Prerequisites:
■ Ensure that QUD, QUTS, and PCAT tools are installed.
■ Ensure that the QRB5165 system software is available with all required executable binaries.

NOTE For more information, see a selected software Release Notes from Qualcomm.

The following procedure provides information on how to download system software on to the device by
using the PCAT tool.
To enter the Qualcomm Download (QDL) mode, do the following:
1. With USB and power not plugged in, hold down the F_DL key.
2. Connect the device to the host system through the USB Type-C.
3. Connect the device to a +12-V wall power supply.

80-88500-5 Rev. AE 41
Qualcomm Robotics RB5 Development Kit User Guide Update software

4. After the device is visible in the download or 9008 mode, release the F_DL key. The download or
9008 mode is visible on the PCAT tool interface.

Figure 3-1 F_DL key


5. To check if the QTI_HS-USB_QDLoader driver is available in the installed directory, run the
following command on the host:
ls –la /dev/Q*
Sample output:
crw-rw-rw- 1 root root 242 0 Dec 10 10:51 /dev/QTI_HS-
USB_QDLoader_9008_3-8:1.0
6. To verify whether the device has entered the QDL mode, run the following command on the host:
lsusb
Sample output:

80-88500-5 Rev. AE 42
Qualcomm Robotics RB5 Development Kit User Guide Update software

Bus 002 Device 014: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL
mode)
7. To check if the device is recognized by the PCAT, run the following command on the host:
pcat -devices
Sample output:
Searching devices in Device Manger, please wait for a moment… ID |
DEVICE TYPE | DEVICE STATE | SERIAL NUMBER | ADB SERIAL NUMBER |
DESCRIPTION | | EDL | d16770b2 |
Qualcomm USB Composite Device: QUSB_BULK_CID:0404_SN:D16770B2

8. Download the system software.


a. To download the meta build, run the following command on the host:
PCAT –PLUGIN SD -DEVICE <device_serial_number> -BUILD
“<path_to_content_xml>/contents.xml” -MEMORYTYPE UFS -FLAVOR asic
b. To download the flat build, run the following command on the host:
PCAT –PLUGIN SD -DEVICE <device_serial_number> -BUILD
“<path_to_flat_build>” -MEMORYTYPE UFS -FLAVOR asic

3.2.2 Flash system with fastboot


The following procedure provides information on how to download complete system software on to the
device using fastboot script.

NOTE If the device does not enter the fastboot mode, follow the procedure in Flash system
with PCAT.

The fastboot script is downloaded along with the software release package from the Qualcomm
ChipCode™ portal.
1. To check if device is connected to the host through USB, run the following command on the host:
adb devices
Sample output:
List of devices attached 84ba9b5f device
To flash the device in the fastboot mode, use one of the following options:
□ Option 1: If the device is detected in the adb mode, run the adb reboot bootloader
command to place the device into the fastboot mode.
□ Option 2: If adb does not detect the device or if the device fails to boot, place the device into
the fastboot mode using the following steps:
i. With USB and power not plugged in, hold down the VOL- key.
ii. Connect the device to the host system through the USB Type-C port.
iii. Plug in the +12-V wall power supply.
iv. Release the VOL- key.

80-88500-5 Rev. AE 43
Qualcomm Robotics RB5 Development Kit User Guide Update software

2. To verify if the device has entered the fastboot mode, run the following command:
fastboot devices
Sample output: 84ba9b5f fastboot
3. When the device is in the fastboot mode, run the following script to flash the full system software:
<base_build_root>/QRB5165.UBUN.2.0/common/build/fastboot_complete.py

NOTE □ The <base_build_root> is the local workspace path where the build is
located.
□ To run the fastboot_complete.py script, you must use the Python version
2.7.

3.2.3 Flash Linux with fastboot


If you intend to modify only application processor software, then do the following to flash only high-
level operating system (HLOS) binaries on to the device:
Linux Ubuntu
1. Navigate to the application processor build software location, for example,
<base_build_root>/lu.um.3.3.1/apps_proc/build-qti-distro-ubuntu-
fullstack-debug/tmp-glibc/deploy/images/qrb5165-rb5
2. To flash in the fastboot mode, run the following commands on the host:
adb reboot bootloader
fastboot flash boot_a <qti-ubuntu-robotics-image-qrb5165-rb5-boot.img>
fastboot flash boot_b <qti-ubuntu-robotics-image-qrb5165-rb5-boot.img>
fastboot flash abl_a abl.elf
fastboot flash abl_b abl.elf
fastboot flash system <qti-ubuntu-robotics-image-qrb5165-rb5-sysfs.ext4>
fastboot reboot

80-88500-5 Rev. AE 44
Qualcomm Robotics RB5 Development Kit User Guide Update software

Linux Embedded
1. Navigate to the application processor build software location, for example,
<base_build_root>/apps_proc/build-qti-distro-fullstack-debug/tmpglibc/
deploy/images/qrb5165-rb5/qti-robotics-image
2. To flash in the fastboot mode, run the following commands on the host:
adb reboot bootloader
fastboot flash abl_a abl.elf
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash persist persist.img
fastboot flash userdata userdata.img
fastboot reboot

80-88500-5 Rev. AE 45
4 Set up the device

To establish communication between the host PC and the RB5 platform, connect a USB cable to
enable the use of the Android Debug Bridge (ADB) utility, and connect a universal asynchronous
receiver-transmitter (UART) cable to enable access to diagnostic messages.

Connect to ADB
Using the USB Type-C cable, connect the RB5 kit with the host system. Ensure that the device is listed
as an ADB device.
adb devices
Sample output: List of devices attached 68f592a device

To enter root user:


adb shell
su
Sample output: root@qrb5165-rb5/#

Set up UART
To view the boot up message logs on a serial console, use the debug microUSB port.
1. Select the proper COM port and set the baud rate to 115200.

2. Log in with the account and password.


□ Account: root
□ Password: oelinux123

4.1 Set up Wi-Fi


To set up the Wi-Fi connection, configure the Wi-Fi station and Wi-Fi access point (AP) modes.

Wi-Fi station mode


In the station (STA) mode, the RB5 device acts as the client and can be connected to a wireless
hotspot or router.
To configure the Wi-Fi station mode:
1. To enable wlan0, run the following command:
ifconfig wlan0

80-88500-5 Rev. AE 46
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

2. Change the SSID and password to match with the router Wi-Fi SSID/password.

NOTE By default, the SSID is Qualcomm and the PSK is ********* .

adb pull /data/misc/wifi/wpa_supplicant.conf


For example,
network={
ssid="Qualcomm"
key_mgmt=WPA-PSK
pairwise=TKIP CCMP
group=TKIP CCMP
psk="*********"
}

3. Push wpa_supplicant.conf (updated file) to the device with path: /data/misc/wifi/#adb


push wpa_supplicant.conf /data/misc/wifi/
4. Reboot the device and wait for the device to boot up.
adb reboot

5. Wait for 1 minute after the device boots up. To check if the device is autoconnected to the router,
run the following command:
ifconfig wlan0

6. Ping the router to confirm the connection using the following command:
ping www.google.com

80-88500-5 Rev. AE 47
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Wi-Fi access point (AP) mode


In the access point mode, the RB5 device acts as an access point, and other client devices can
connect to it.

Configure the Wi-Fi AP mode:

1. Kill wpa_supplicant after reboot. To retrieve the PID of wpa_supplicant, run the following
command:
pgrep wpa_supplicant
kill -9 <wpa_supplicant_PID>

NOTE <wpa_supplicant_PID>: provide wpa_supplicant PID number


2. To set up the software access point (SAP), run the following command:
hostapd /data/misc/wifi/hostapd.conf &
The following figure shows an example of using the default hostapd.conf file:

80-88500-5 Rev. AE 48
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

3. From the hostapd.conf file, identify the SSID and password information. You can also run the
iw wlan0 info command to retrieve the SSID details.

4. To set up the software access point on the dynamic host configuration protocol (DHCP) server, run
the following commands:
ifconfig wlan0 192.168.2.1 netmask 255.255.255.0 up
dnsmasq --dhcp-range=192.168.2.10,192.168.2.100,12h --port=5353

5. To test the connection, navigate to the Wi-Fi settings on the phone and identify the RB5 SSID (for
example, QSoftAP).
6. Select RB5 SSID and provide RB5 hostapd password to connect the device. An IP address from
the dhcp-range is selected for the phone, implying that the connection is established. The
following figure shows that the station (STA) is connected to the software access point:

7. To verify the connection, ping the IP address of the phone from the RB5 device.

80-88500-5 Rev. AE 49
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

4.2 Set up Bluetooth technology


To set up Bluetooth technology, do the following:
1. Ensure that the device is detected on the Android Debug Bridge.
2. Run adb shell, and then btproperty & to start the btconfig application.
3. Start btapp and press the Enter key. The support profiles are listed.
4. Launch gap_menu.
5. Run the enable command to activate Bluetooth technology.

Pair a device
To pair a Bluetooth technology device, do the following:

1. Enable Bluetooth technology and run the pair command in the gap_menu.
pair <BD ADDRESS of device intending to connect>
For example,
pair 40:4D:7F:9D:BB:8C
A notification message displays.

Figure 4-1 Pairing notification


2. Enter yes to complete the pairing process.

4.3 Set up Ethernet


To set up Ethernet, do the following:

1. Connect the Ethernet port and router with the Ethernet cable.
a. Run the following adb shell command:
ifconfig eth0
b. If the command returns the eth0 and IP address, then this result confirms that the Ethernet is
connected.

80-88500-5 Rev. AE 50
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

2. Ping the router <IP address> to verify if the RB5 device is successfully connected.

3. Ping a website, for example www.qualcomm.com, to verify if the online connection is established.

80-88500-5 Rev. AE 51
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

4.4 Set up HDMI display


Weston is enabled by default. To set up the HDMI display, do the following:
1. Set DIP switch 4 of DIP_SW_0 to OFF.

Figure 4-2 Connecting RB5 platform to display monitor with HDMI cable

80-88500-5 Rev. AE 52
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

2. Connect the HDMI cable to the display monitor and power-on the device. Weston starts
automatically when the device boots up. The following Weston flower pattern should be seen on
the display monitor:

Figure 4-3 Weston flower pattern


3. To run the Weston simple EGL client application, run the following commands:
adb shell
export WAYLAND_DISPLAY=wayland-1
export XDG_RUNTIME_DIR=/run/user/root
cd /usr/bin
./weston-simple-egl

NOTE The export WAYLAND_DISPLAY=wayland-1 command is applicable only to the


Linux Embedded system.

The following figure shows the Weston simple EGL client application running on the display
monitor:

Figure 4-4 Weston simple EGL client application

4.5 Set up camera


USB camera
The USB device class definition for video devices or USB video class defines video streaming
functionality on the USB. USB video class (UVC)-compliant peripherals need only a generic driver.
The driver implements the Video4Linux 2 (V4L2) API. The camera application can use standard input/
output controls to set the image size, format, and frame interval and also get image frames.

80-88500-5 Rev. AE 53
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

The USB camera supports UVC-compliant devices, webcams, digital camcorders, and still-image
cameras.

4.5.1 Set up USB webcam


The RB5 development kit supports USB-based cameras. This support is enabled as a USB/UVC
gadget device.
To set up the USB/UVC camera on the RB5 development kit, do the following:
1. Locate the USB port on the RB5 device and connect the USB-based camera.
2. If the USB/UVC camera connection is successful, the software creates two v4l2 device
nodes. Confirm that additional /dev/video* is created by running the following commands
before and after connecting the USB camera:
adb root
adb shell
adb shell ls -l /dev/video*

3. If the camera enumeration is successful, try starting the camera by running a program such as
Yavta.
4. To build Yavta, run the following commands:
cd poky
MACHINE=qrb5165-rb5 DISTRO=qti-distro-ubuntu-debug . qti-conf/
set_bb_env.sh (choose target accordingly)
bitbake yavta

5. Push Yavta to the RB5 development kit.


adb push yavta /usr/bin/
To push the Yavta application manually to the /sbin/ folder:
adb push yavta /sbin/
adb shell chmod 777 /sbin/yavta

6. Connect the USB camera to the device with USB3.0 COM, and then run the following command to
verify the device ID of the USB camera:
adb shell ls -l /dev/video*

7. To verify if the Yavta application exists on the device, run the following command:
adb shell ls -l /usr/bin/

8. To echo parameter definitions, run the following command:


yavta –help
For example:
-F, --file[=name] Read/write frames from/to disk
-f, --format format Set the video format
-c, --capture[=nframes] Capture frames
-t, --time-per-frame num/denom Set the time per frame

80-88500-5 Rev. AE 54
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

9. Run the following command to preview and dump:


yavta -f YUYV -s 1280x960 -t 1/30 -c18000 /dev/video2 -F/data/test.yuv

10. To verify if the camera launched successfully using the generated file inside /data, run the
following command:
ls -l /data/*.yuv

11. To retrieve the YUV file, run the following command:


adb pull /data/test.yuv
You can use the 7yuv player to display the YUV file on the host machine.

4.5.2 Set up MIPI camera


The method for setting up the mobile industry processor interface (MIPI) camera is described as
follows:
Connect camera to the vision board
The following components are required for connecting the camera to the vision board:
■ Qualcomm Robotics RB5 Platform mainboard (mainboard is the one with USB connectors)
■ Qualcomm Robotics RB5 Platform vision mezzanine
■ Tracking camera and tracking camera flex
■ Main camera and main camera flex

80-88500-5 Rev. AE 55
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Figure 4-5 Components connecting camera to vision board

80-88500-5 Rev. AE 56
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

To assemble the Qualcomm Robotics RB5 Platform camera (without bracket), do the following:
1. Plug the vision mezzanine into the mainboard.

2. Plug the tracking camera sensor to the tracking camera flex cable, and plug into the CAM1
(tracking camera) connector on the vision mezzanine.
3. Plug the main camera sensor to the main camera flex cable and plug into the CAM2 (main
camera) connector on the vision mezzanine.

WARNING Plug the flex cables and cameras exactly as shown in the following figure; otherwise,
damage might occur.

80-88500-5 Rev. AE 57
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

4.5.3 Camera use cases


This section describes the following camera use cases: live preview on local display, video recording
saved in device, snapshot with display, snapshot with video recording, dual-camera concurrency, and
multicamera multiclient.

Camera live preview on local display


NOTE The export WAYLAND_DISPLAY=wayland-1 command is applicable only to the Linux
Embedded system.

1. Run the following test command in the adb shell window:


export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 qtiqmmfsrc
name=qmmf ! video/x-raw\(memory:GBM\), format=NV12, width=3840,
height=2160, framerate=30/1, camera=0 ! waylandsink fullscreen=true
async=true sync=false
The following figure shows the host display:

2. To stop, use the CTRL + C keys.

Camera video recording saved in device


1. Run the following test command in the adb shell window:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc camera=0 ! video/x-raw\
(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! queue !
qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location="/data/
4K_30FPS.mp4"

NOTE The default output directory is /data where all the output files are created. If you
want to change the output directory, create a new directory under /data and modify

80-88500-5 Rev. AE 58
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

the location accordingly so that all the output files are created in the specified
directory.
2. To view the video files, run the following commands:
cd data
ls
Sample output:
4k30_h264.mp4 audio misc persist security-tests tombstones vendor

Camera snapshot with display


1. Run the following test command in the adb shell window:
export XDG_RUNTIME_DIR=/run/user/root && gst-pipeline-app -e qtiqmmfsrc
camera=0 name=camsrc ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! waylandsink
fullscreen=true camsrc.image_1 ! "image/
jpeg,width=1280,height=720,framerate=30/1" ! multifilesink location="/
data/4K%d.jpg" sync=true async=false camsrc. ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! queue ! qtic2venc !
h264parse ! mp4mux ! queue ! filesink location="/data/cam5_4K30_264.mp4"

NOTE The default output directory is /data where all the output files are created. If you
want to change the output directory, create a new directory under /data and modify
the location accordingly so that all the output files are created in the specified
directory.
2. Enter the number that appears next to the displayed options. Enter 9 to select camsrc.

80-88500-5 Rev. AE 59
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

3. Enter 34 if you want to select the capture-image option.

4. Enter 0 and then enter 1 to take the snapshot.

5. Enter b to go back to the main menu.


6. Enter q to exit the application.

Camera snapshot with video recording


1. Run the following test command in the adb shell window:
gst-pipeline-app -e qtiqmmfsrc name=qmmf camera=0 ! video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! queue ! qtic2venc !
queue ! h264parse ! mp4mux ! queue ! filesink location=/data/mux1.mp4
qmmf. ! video/x-raw\(memory:GBM
\),format=NV12,width=640,height=480,framerate=30/1 ! queue ! qtic2venc !
queue ! h264parse ! mp4mux ! queue ! filesink location="/data/mux2.mp4"
qmmf.image_2 ! "image/jpeg,width=1920,height=1080,framerate=30/1" !
multifilesink location="/data/frame%d.jpg" sync=true async=false

NOTE The default output directory is /data where all the output files are created. If you
want to change the output directory, create a new directory under /data and modify
the location accordingly so that all the output files are created in the specified
directory.
2. Follow the instructions described in Camera snapshot with display.

80-88500-5 Rev. AE 60
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Dual-camera concurrency
1. Ensure that the main and tracking cameras are connected to the RB5 device hardware. For more
information on MIPI camera setup, see Set up MIPI camera.
□ Main camera (Process 1):
– Stream1: 4K at 30 AVC/HEVC mp4 muxed
– Stream2: 1080p at 30 YUV preview

□ Tracking camera (Process 2):


– Stream1: 720 at 30 YUV (no display, VSLAM)

2. Run the following test commands in different adb shell windows at the same time:
□ Command 1:
gst-pipeline-app -e qtiqmmfsrc camera=0 name=qmmf ! video/x-raw\
(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 !
waylandsink fullscreen=true async=true sync=false qmmf. ! video/x-raw\
(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 !
queue !qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink
location="/data/mux1.mp4" qmmf. ! "image/
jpeg,width=3840,height=2160,framerate=30/1" ! multifilesink location="/
data/frame%d.jpg" sync=true async=false
□ Command 2:
gst-launch-1.0 -e qtiqmmfsrc camera=1 name=qmmf ! video/x-
raw,format=NV12,width=1280,height=720,framerate=30/1 ! multifilesink
enable-last-sample=false location="/data/client2_frame%d.yuv" max-
files=5

NOTE The default output directory is /data where all the output files are created. If you
want to change the output directory, create a new directory under /data and
modify the location accordingly so that all the output files are created in the
specified directory.

80-88500-5 Rev. AE 61
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Multicamera concurrency
The following command will access the camera sensors namely 0-4 using the camera parameters and
helps in encoding the videos with 1280 × 720 resolution of 30 fps in folder/data/.
gst-launch-1.0 -e qtiqmmfsrc name=qmmf camera=0 ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! qtic2venc ! h264parse !
mp4mux ! queue ! filesink location="/data/mux1.mp4" qmmf.qtiqmmfsrc
camera=1 ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! qtic2venc ! h264parse !
mp4mux ! queue ! filesink location="/data/mux2.mp4" qtiqmmfsrc camera=2 !
video/x-raw\(memory:GBM\),format=NV12,width=1280,height=720,framerate=30/1 !
qtic2venc ! h264parse ! mp4mux ! queue ! filesink location="/data/mux3.mp4"
qtiqmmfsrc camera=3 ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! qtic2venc ! h264parse !
mp4mux ! queue ! filesink location="/data/mux4.mp4"

Multicamera multiclient
To run the multicamera multiclient, do the following:
1. To start the main camera process1, run the following command:
export XDG_RUNTIME_DIR=/run/user/root/ && gst-pipeline-app -e qtiqmmfsrc
camera=0 name=qmmf ! video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! waylandsink
sync=false x=0 y=0 width=500 height=500 enable-last-sample=false qmmf. !
video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! queue ! qtic2venc !
queue ! h264parse ! mp4mux ! queue ! filesink location="/data/
main_client1_4k30fps_h264.mp4" qmmf. ! "image/

80-88500-5 Rev. AE 62
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

jpeg,width=3840,height=2160,framerate=30/1" ! multifilesink location="/


data/snapshot%d.jpg" sync=true async=false

NOTE The default output directory is /data where all the output files are created. If you
want to change the output directory, create a new directory under /data and modify
the location accordingly so that all the output files are created in the specified
directory.
2. To start the main camera process2 for the slave stream, after the master stream-up, run the
following command:
export XDG_RUNTIME_DIR=/run/user/root/ && gst-pipeline-app -e qtiqmmfsrc
slave=true camera=0 name=qmmf ! video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! waylandsink
sync=false x=400 y=400 width=500 height=500 async=true sync=false

3. To start tracking camera process1, run the following command:


export XDG_RUNTIME_DIR=/run/user/root/ && gst-launch-1.0 -e qtiqmmfsrc
camera=1 name=qmmf ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=30/1 ! waylandsink
sync=false x=0 y=500 width=500 height=500 enable-last-sample=false

4. To start tracking the camera process2 for the slave stream, after tracking the camera master
stream-up, run the following command:
export XDG_RUNTIME_DIR=/run/user/root/ && gst-pipeline-app -e qtiqmmfsrc
slave=true camera=1 name=qmmf ! video/x-raw\(memory:GBM
\),format=NV12,width=1280,height=720,framerate=15/1 ! waylandsink
sync=false x=800 y=500 width=500 height=500 enable-last-sample=false

5. Run the display on the local host for 1 minute in the main camera primary stream command
window1.
6. Enter the snapshot item by typing qmmf and then specify the number that appears next to the
displayed options to take the snapshot.
7. Enter q to stop the slave stream command window2.
8. Enter q to stop the master stream command window1 after you have finished testing.
9. Stop tracking the camera slave stream first and then the master stream using the CTRL + C keys.
The main camera video is saved.

80-88500-5 Rev. AE 63
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

4.6 Set up audio


Ensure that the digital microphone interface (DMIC) on the board is switched ON. Switch ON the PIN2
on the DIP2 switch board as shown in the following figure. Before testing the record and audio
playback, connect the speaker to the RB5 board as shown in the following figure:

ALSA record and playback


NOTE Not supported on the Linux Embedded systems.

To capture audio recording through Advanced Linux Sound Architecture (ALSA), do the following:

1. Run the following commands:


adb shell
amixer cset name='TX DEC2 MUX' 'MSM_DMIC'
amixer cset name='TX DMIC MUX2' 'DMIC2'
amixer cset name='TX_CDC_DMA_TX_3 Channels' 'One'
amixer cset name='TX_CDC_DMA_TX_3 SampleRate' 'KHZ_48'
amixer cset name='TX_CDC_DMA_TX_3 Format' 'S16_LE'
amixer cset name='TX_AIF1_CAP Mixer DEC2' 1
amixer cset name='TX_DEC2 Volume' 84
amixer cset name='MultiMedia1 Mixer TX_CDC_DMA_TX_3' 1
arecord /data/dmic0.wav -f dat

2. After recording the voice, press CTRL + C to stop the recording. After the recording is completed,
pull the output clip from the /data/ location of the RB5 device.
adb pull /data/dmic0.wav

80-88500-5 Rev. AE 64
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Audio playback through ALSA


NOTE Not supported on the Linux Embedded systems.

For audio playback through ALSA, run the following commands:


adb push dmic0.wav /data/
adb shell
amixer cset name='WSA_CDC_DMA_RX_0 Channels' 'Two'
amixer cset name='WSA RX0 MUX' 'AIF1_PB'
amixer cset name='WSA RX1 MUX' 'AIF1_PB'
amixer cset name='WSA_RX0 INP0' 'RX0'
amixer cset name='WSA_RX1 INP0' 'RX1'
amixer cset name='WSA_COMP1 Switch' 1
amixer cset name='WSA_COMP2 Switch' 1
amixer cset name='SpkrLeft COMP Switch' 1
amixer cset name='SpkrLeft BOOST Switch' 1
amixer cset name='SpkrLeft VISENSE Switch' 1
amixer cset name='SpkrLeft SWR DAC_Port Switch' 1
amixer cset name='SpkrRight COMP Switch' 1
amixer cset name='SpkrRight BOOST Switch' 1
amixer cset name='SpkrRight VISENSE Switch' 1
amixer cset name='SpkrRight SWR DAC_Port Switch' 1
amixer cset name='WSA_RX0 Digital Volume' 68
amixer cset name='WSA_RX1 Digital Volume' 68
amixer cset name='WSA_CDC_DMA_RX_0 Audio Mixer MultiMedia1' 1
aplay /data/dmic0.wav

80-88500-5 Rev. AE 65
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

tinyALSA record and playback


To capture audio recording through tinyALSA, do the following:

1. Run the following commands:


adb root
adb remount
adb shell mount -o rw,remount /
adb shell
tinymix set 'TX DMIC MUX2' 'DMIC3'
tinymix set 'TX_CDC_DMA_TX_3 Channels' 'One'
tinymix set 'TX_AIF1_CAP Mixer DEC2' 1
tinymix set 'MultiMedia1 Mixer TX_CDC_DMA_TX_3' 1
tinycap /data/dmic2.wav -c 1 -r 48000 -b 16

80-88500-5 Rev. AE 66
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

2. After recording the voice, press CTRL + C to stop the recording. After the recording is complete,
pull the output clip from the /data/ location of the device.
adb pull /data/dmic2.wav

Audio playback through tinyALSA


For audio playback through tinyALSA, run the following commands:
adb push dmic0.wav /data/
adb shell
tinymix set 'WSA_CDC_DMA_RX_0 Channels' 'Two'
tinymix set 'WSA RX0 MUX' 'AIF1_PB'
tinymix set 'WSA RX1 MUX' 'AIF1_PB'
tinymix set 'WSA_RX0 INP0' 'RX0'
tinymix set 'WSA_RX1 INP0' 'RX1'
tinymix set 'WSA_COMP1 Switch' 1
tinymix set 'WSA_COMP2 Switch' 1
tinymix set 'SpkrLeft COMP Switch' 1
tinymix set 'SpkrLeft BOOST Switch' 1
tinymix set 'SpkrLeft VISENSE Switch' 1
tinymix set 'SpkrLeft SWR DAC_Port Switch' 1
tinymix set 'SpkrRight COMP Switch' 1
tinymix set 'SpkrRight BOOST Switch' 1
tinymix set 'SpkrRight VISENSE Switch' 1
tinymix set 'SpkrRight SWR DAC_Port Switch' 1
tinymix set 'WSA_RX0 Digital Volume' 68
tinymix set 'WSA_RX1 Digital Volume' 68
tinymix set 'WSA_CDC_DMA_RX_0 Audio Mixer MultiMedia1' 1
tinyplay /data/dmic0.wav

80-88500-5 Rev. AE 67
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Audio hardware abstraction layer (HAL) record and playback


To capture audio recording through hal_rec_test_64bit, do the following:

1. Run the following command:


adb shell hal_rec_test_64bit -c [number of channels] -r [sample rate] -t
[record time]
Example command:
adb shell hal_rec_test_64bit -r 48000 -t 30 -c 1
->sample rate 48000Hz
->channels 1[AUDIO_CHANNEL_IN_MONO]
->record data for 30 secs

2. After recording is completed, pull the output clip from the /data/audio location in the device by
running the following command:
adb pull /data/audio/rec1.wav

80-88500-5 Rev. AE 68
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Audio playback through hal_playback_test_64bit


For audio playback through hal_playback_test_64bit, run the following command:
adb shell hal_play_test_64bit -f [wave file] -t [file type, required for non
WAV formats] -r [sample rate] -v [volume 0 - 1]
For example:
PCM:

adb push test.wav /data/


adb shell hal_play_test_64bit -f /data/test.wav -v 0.5
->file location /data/test.wav
->playback volume 0.5
MP3:

adb push test.mp3 /data/


adb shell hal_play_test_64bit -f /data/test.mp3 -t 2 -r 44100 -v 0.4
->file location /data/test.mp3
->file type MP3 [1:WAV 2:MP3]
->sample rate 44100Hz
->playback volume 0.4

80-88500-5 Rev. AE 69
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

GStreamer record and playback


To capture audio recording and playback through GStreamer, do the following:
1. Run the following commands for recording:
PCM:
adb shell
gst-launch-1.0 -e -v pulsesrc ! audioconvert ! wavenc ! filesink
location="/data/track.wav"
AAC: Software encode
adb shell
gst-launch-1.0 -e -v pulsesrc ! audio/x-
raw,format=S16LE,rate=48000,channels=1 ! audioconvert ! avenc_aac !
aacparse ! mpegtsmux ! queue ! filesink location="/data/Audio_AAC.ts"

2. After recording the voice, press CTRL + C or use the adb shell kill -2 `pidof gst-
launch-1.0 to stop the recording. When the recording is completed, pull the output clip from
the/data/ location of the device.

80-88500-5 Rev. AE 70
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Audio playback through GStreamer


For audio playback through GStreamer, run the following commands:
PCM:
adb push audio_test.wav /data/
adb shell
gst-launch-1.0 filesrc location="/data/audio_test.wav" ! wavparse !
audioconvert ! pulsesink
AAC: Software decode
adb push test.aac /data/
adb shell
gst-launch-1.0 filesrc location="/data/test.aac" ! aacparse ! avdec_aac !
audioconvert ! pulsesink
MP3: Software decode
adb push test.mp3 /data/
adb shell
gst-launch-1.0 filesrc location="/data/test.mp3" ! mpegaudioparse !
mpg123audiodec ! pulsesink

4.7 Set up video


Video encoding
To encode the video using qtic2venc, do the following on the RB5 development kit:

80-88500-5 Rev. AE 71
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

H.264 video encoding

1. Run the following command:


gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtic2venc ! queue !
h264parse ! mp4mux ! queue ! filesink location="/data/mux4K.mp4"

2. Download the /data/mux4K.mp4 file from the device and open it with a video player. The video
plays as expected.
H.265 video encoding

1. Run the following command:


gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM
\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtic2venc ! queue !
h265parse ! mp4mux ! queue ! filesink location="/data/mux4K.mp4

2. Download the /data/mux4K.mp4 file from the device and open it with a video player. The video
plays as expected.

Video decoding
To decode the video using qtic2vdec, do the following on the RB5 development kit:

H.264 video decoding

1. Push the video 3840_2160_H264_30fps.mp4 file to the device.


2. Run the following command:
export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 filesrc location=/
data/mux4K.mp4 ! qtdemux ! queue ! h264parse ! qtic2vdec ! queue !
waylandsink sync=true fullscreen=true

H.265 video decoding

1. Push the video 3840_2160_H265_30fps.mp4 file to the device.


2. Run the following command:
export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 filesrc location=/
data/mux4K.mp4 ! qtdemux ! queue ! h265parse ! qtic2vdec ! queue !
waylandsink sync=true fullscreen=true

4.8 Wayland sink for playback


The Wayland sink is used to playback video, preview camera, or preview image on the local display.

NOTE The Weston is launched automatically during the device bootup.

Video playback on display


NOTE The export WAYLAND_DISPLAY=wayland-1 command is applicable only to the Linux
Embedded system.

80-88500-5 Rev. AE 72
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

To enable video playback on display, run the following command on the RB5 development kit:
export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 filesrc location=/
data/7680_4320_30fps.mp4 ! qtdemux ! queue ! h264parse ! qtic2vdec ! video/x-
raw\(memory:GBM\),compression=ubwc ! queue ! waylandsink x=100 y=100
width=960 height=540

Figure 4-6 Video playback on display

Camera preview on display


To enable camera preview on display, run the following command on the RB5 development kit:
export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 qtiqmmfsrc
name=qmmf ! video/x-raw\(memory:GBM\), format=NV12, width=1920, height=1080,
framerate=30/1, camera=0 ! waylandsink fullscreen=true async=true sync=false

Figure 4-7 Camera preview on display

80-88500-5 Rev. AE 73
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

Image preview on display


To enable image preview on display, run the following command on the RB5 development kit:
export XDG_RUNTIME_DIR=/run/user/root && gst-launch-1.0 multifilesrc
location=/data/output/snapshot9982.jpg ! jpegdec ! videoconvert ! videorate !
waylandsink x=960 y=0 width=960 height=540

Figure 4-8 Image preview on display

4.9 Set up sensors


The inertial measurement unit (IMU) sensor is present on the RB5 platform mainboard. To set up
sensors, do the following:
1. Install the pressure sensor present on the vision mezzanine board in one of the free slots.
2. Ensure that the DIP switch settings are correct to enable the sensor according to the board used.
For more information on the board used, see QRB5165 RB5 Hardware Reference Platform User
Guide (80-PV086-600).
3. Use the driver acceptance test (ssc_drva_test) to validate acceleration, gyroscope, and
pressure sensor streaming. The ssc_drva_test is part of the build.
□ Example command for driver acceptance test:
ssc_drva_test -sensor=accel -duration=5 -sample_rate=50
This example enables the accelerometer sensor for 5 seconds at 50 Hz sample rate in
streaming mode. The value of the -sensor parameter is the sensor type to be enabled. For

80-88500-5 Rev. AE 74
Qualcomm Robotics RB5 Development Kit User Guide Set up the device

example, accel for accelerometer, gyro for gyroscope, and pressure for pressure/
barometer.

□ The output of the test example shows:


– Physical configuration sample rate received is 50 Hz
– A total of 243 acceleration samples were received during the test

80-88500-5 Rev. AE 75
5 Develop applications

To develop applications, use either of the following methods:


■ Writing, compiling, and running the code using the Qualcomm Robotics RB5 Platform shell
terminal.
■ Using a cross-compiler. Copy the final output to the Qualcomm Robotics RB5 Platform.

5.1 Install ROS2


Linux Ubuntu

The current Ubuntu-based platform of QRB5165 is validated for ROS2/Foxy. As the Foxy release is
not a part of the default repository, you must run the following steps to add the ROS2 package
repository to the Ubuntu-based focal sources list before installing ROS2.

Prerequisites:
■ To use ROS2, install the ROS2/Foxy package and ssh.
■ Use ssh to update the gpg key of the ROS2 repository with apt.
■ Ensure that the device is connected to an active Internet connection. For information on how to set
up Wi-Fi on the device, see Set up Wi-Fi.
To install ssh and ROS2 and get a basic ROS2 application running on the RB5 development kit, do the
following:

1. Install ssh.
adb root
adb remount
adb shell
apt update
apt upgrade
apt install openssh-server
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
/etc/init.d/ssh restart

80-88500-5 Rev. AE 76
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

2. To install usbutils, git, bc, and set the locale, run the following commands:
apt install usbutils git bc
apt install libvulkan1=1.2.131.2-1
apt update && apt install locales
locale
locale-gen en_US en_US.UTF-8
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale

3. To ensure that the Ubuntu-based universe repository is enabled, run the following commands:
apt install software-properties-common
add-apt-repository universe

4. To add ROS2 gpg key with apt, run the following commands:
apt update && apt install curl -y
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -
o /usr/share/keyrings/ros-archive-keyring.gpg

5. To add the repository to the sources list, run the following command:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/
ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-
release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/
ros2.list > /dev/null

6. To install ROS2 packages, run the following commands:


apt update

NOTE If the command fails, use the following command:


apt update --fix-missing

apt upgrade
apt install ros-foxy-desktop

NOTE If ROS2 command is not visible, run the command again.

apt install python3-argcomplete

7. Verify if the ROS2 publish/subscribe mechanism is working.


a. On a terminal, test the publish mechanism using the following commands:
adb shell
export ROS_HOME="/tmp/ros"
source /opt/ros/foxy/setup.bash
ros2 run demo_nodes_cpp talker

80-88500-5 Rev. AE 77
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

b. On the other terminal, test the subscribe mechanism using the following commands:
adb shell
export ROS_HOME="/tmp/ros"
source /opt/ros/foxy/setup.bash
ros2 run demo_nodes_py listener

Linux Embedded

The Linux Embedded system comes with a built-in ROS2.

To verify ROS2, do the following:

1. Open a new terminal and run the following commands:


source /usr/bin/ros_setup.sh
export HOME=/data
ros2 run demo_nodes_cpp talker

2. Open another terminal and run the following commands:


source /usr/bin/ros_setup.sh
export HOME=/data
ros2 run demo_nodes_cpp listener

80-88500-5 Rev. AE 78
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

5.2 Build and deploy sample applications


NOTE Not supported on the Linux Embedded systems.

You must clone the Git repository before building and deploying sample applications.

5.2.1 Clone Git repository


NOTE Not supported on the Linux Embedded systems.

The sample code to test the device functionality is available on GitHub. To clone the repository on the
RB5 development kit, do the following:
1. To retrieve the list of devices, run the following command:
adb devices

2. Enter the terminal through the adb shell or ssh. For example:
ssh root@qrb5165-rb5#

3. To create a directory, run the following command:


mkdir -p ~/DEVELOPMENT/qrb5165

4. To clone the Git repository, run the following command:


git clone https://github.com/quic/sample-apps-for-Qualcomm-Robotics-RB5-
platform

5.2.2 Sample applications


NOTE Not supported on the Linux Embedded systems.

Sample applications for the Qualcomm Robotics RB5 Development Kit are available on GitHub.
The sample applications are grouped into categories and each category has a corresponding folder.
See the README file in the respective sample application folders for instructions to build, deploy, and
test the sample application. The following is a list of the available sample applications:
■ AI-ML-apps
This category includes applications that enable AI workloads on the Qualcomm Robotics RB5
development kit and applications that implement selected AI use cases.
□ snpe_classification
This application sets up the environment, compiles, and runs object classification using a DLC
format (generated from Qualcomm® Neural Processing SDK) TFLite model as an input.
□ snpe_detection
This application sets up the environment, compiles, and runs object detection using a DLC
format (generated from Qualcomm Neural Processing SDK) TFLite model as an input.
□ tflite_classification
This application sets up the environment, compiles, and runs object classification using a
TFLite model as an input and implementing the GStreamer pipeline.

80-88500-5 Rev. AE 79
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

□ tflite_posenet
This application sets up the environment, compiles, and runs pose estimation using a TFLite
model as an input and implementing the GStreamer pipeline.
□ tflite_segmentation
This application sets up the environment, compiles, and runs image segmentation using a
TFLite model as an input and implementing the GStreamer pipeline.
■ Codec2-video
This category contains GStreamer-based application for H.264 video encoding and decoding. You
can compile and test the H.264 video encoding and decoding capabilities for different file formats.
■ GStreamer-apps
This category contains a set of Python and C sample applications that show the use of GStreamer
plugins on the Qualcomm Robotics RB5 development platform.
□ gst-alsa
This application implements the playback and recording functions of GStreamer and ASLA on
the RB5 development platform.
□ gst_audio
This application demonstrates audio recording and playback with PulseAudio for WAV, AAC,
and MP3 file formats.
□ gst_camera
This application demonstrates camera live view on display. There are two samples: one is
display from the ISP camera (main onboard camera) and the other is display from the USB
camera.
□ gst_encode_decode
This application demonstrates how to encode camera video into an MP4 file and play back
from the file. There are two samples: one is encoding from the ISP camera (main onboard
camera) and the other is playback of the MP4 file.
□ gst_streaming
This application demonstrates two ways to stream video on the network. The first sample
creates a TCP streaming server with GStreamer. The second sample demonstrates how to
run a Real-Time Streaming Protocol (RTSP) server on the board.
□ gst_tflite
This application shows how to set up the environment, compile, and run object classification
using a TFLite model as an input and implementing the GStreamer pipeline.
□ gst_transform
This application shows how to transform an ISP camera video to the Weston display.

80-88500-5 Rev. AE 80
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

■ ROS-apps
This category contains applications that show the use of ROS middleware for building robotics
applications.
□ ROS-Caffe
This application integrates the Caffe framework into ROS on Qualcomm Robotics RB5
development platform.
□ ROS-TFLite
This application integrates the Tensorflow framework into ROS with object detection API on
the Qualcomm Robotics RB5 development platform.
■ OpenCL-Application
This application demonstrates OpenCL sample code using the following examples:
□ FFT shows the use of OpenCL for fast fourier transform.
□ Benchmark shows the reading and writing rate when the memory unit is Byte, KB, or MB,
respectively.
□ Matrix_multiply shows the multiplication of two 20 × 20 matrices and prints the output of the
input matrices and multiplication of the two matrices on the screen.
■ platform-bringup
This category contains applications to fetch device information, GPIO samples, Weston-Client,
and Wi-Fi hotspots.
□ Device-info
This application provides the following information: list of peripherals to which the device is
connected, status of subsystem through kernel node, CPU and GPU information, display
information, and memory size.
□ GPIO-samples
This application handles the following functions: LED light control, GPIO input and output,
receive GPIO interrupt events, button event catching, simple PWM output, and read the SoC
thermal temperature.
□ WiFi-OnBoarding
Wi-Fi onboarding includes scanning the surrounding hotspots in the STA mode, creating a
new Wi-Fi connection, and obtaining the SSID and PSK of the currently connected Wi-Fi. After
switching to the SAP mode, you can create a new hotspot and get the SSID and PSK of the
current hotspot.
□ Weston-Client-Application
The Weston sample code shows how to compile and run a simple client in Weston.

5.3 Develop with cross-compiler


NOTE Not supported on the Linux Embedded systems.

Prerequisites:

80-88500-5 Rev. AE 81
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

Develop with cross-compiler on the host system:


1. To install the necessary software packages, run the following commands:
sudo apt update
sudo apt install diffstat xmlstarlet texinfo chrpath gcc-aarch64-linux-gnu
libarchive-dev ssh libselinux1-dev fakechroot g++-aarch64-linux-gnu
libiberty-dev qemu-user-static g++ gawk gcc make libwayland-dev fakeroot
libpam0g-dev openjdk-8-jdk-headless binutils-dev util-linux uuid-dev zstd

2. To create soft links, run the following commands:


sudo rm -rf /lib/ld-linux-aarch64.so.1
sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-2.31.so /lib/ld-linux-
aarch64.so.1
sudo ln -sf /bin/bash /bin/sh
sudo dpkg -P qemu-user-static
wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-
static_6.2+dfsg-2ubuntu6_amd64.deb
sudo dpkg -i qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb

3. To install Android tools, run the following command:


sudo apt install android-tools-fsutils

5.3.1 Prepare sysroot


NOTE Not supported on the Linux Embedded systems.

The methods to prepare sysroot on the host system are as follows:

Use sysroot from Yocto


Navigate to the following location to copy the sysroot generated by Yocto:
cp -avx <src tree>/build-qti-distro-Ubuntu-debug/tmp-glibc/work/qrb5165_rb5-
oe-linux/qti-Ubuntu-robotics-image/1.0-r0/rootfs <your sysroot workspace>

Use system.img
Before you begin, check whether system.img is an Android sparse image. If it is a sparse image,
unsparse the image before mounting.
1. To check whether the system.img is an Android sparse image, run the following command:
file qti-Ubuntu-robotics-image-qrb5165-rb5-sysfs.ext4
qti-Ubuntu-robotics-image-qrb5165-rb5-sysfs.ext4: Android sparse image,
version: 1.0, Total of 8192000 4096‑byte output blocks in 11950 input
chunks.

2. To convert a sparse image to raw image, run the following command:


simg2img qti-Ubuntu-robotics-image-qrb5165-rb5-sysfs.ext4 system_raw.img

80-88500-5 Rev. AE 82
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

3. To mount the system_raw.img, run the following commands:


mkdir data
sudo mount system_raw.img data
4. To unmount the system_raw.img, run the following command:
sudo umount data

Sample application: libxml2


As an example, you can use libxml2, an open-source application. The process to develop this
application on the RB5 development kit is as follows:
1. Download the source code from here.
2. To unpack, run the following command:
tar -xvf libxml2-2.9.9.tar.gz

3. To configure the application, run the following command:


./configure --host=arm-linux --build=i386-linux --target=arm --
prefix=<sysroot>/usr CC=/usr/bin/aarch64-linux-gnu-gcc --without-zlib --
without-python
The values of the command parameters are as follows:
□ --prefix=<sysroot>/usr: install architecture-independent files in PREFIX
□ CC=/usr/bin/aarch64-linux-gnu-gcc: set cross compiler
For more details, run
configure-h

4. To build the application, run the following command:


make

5. To install libxml2 to the sysroot folder mounted from the raw image, run sudo.
[sudo] make install

6. To check the output, run the following command:


file libxml2.so.2.9.9
Sample output:
libxml2.so.2.9.9: ELF 64-
bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked
, BuildID[sha1]=a0074ea1ac119ddb9fcc4c1d4baa1489ff27dd25, with debug_inf
o, not stripped

5.3.2 Pack the image


NOTE Not supported on the Linux Embedded systems.

For packing on the host system, use sysroot from Yocto and system.img.

80-88500-5 Rev. AE 83
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

Use sysroot from Yocto


Get the original packing command from uimage.bbclass. The usage of make_ext4fs is shown in
the following code:
make_ext4fs -s -l ${SYSTEM_SIZE_EXT4} -C ${WORKDIR}/rootfs-fsconfig.conf -B $
{DEPLOY_DIR_IMAGE}/system.map ${IMAGE_EXT4_SELINUX_OPTIONS} -b 4096 $
{DEPLO Y_DIR_IMAGE}/${SYSTEMIMAGE_TARGET} ${IMAGE_ROOTFS}
To use make_ext4fs generated by Yocto, see the following example:
<srctree>/build-qti-distro-Ubuntu-debug/tmp-glibc/work/qrb5165_rb5-oe-linux/
qti-Ubuntu-robotics-image/1.0-r0/recipe-sysroot-native/usr/bin/make_ext4fs -s
-l 33554432000 -C
<srctree>/build-qti-distro-Ubuntu-debug/tmp-glibc/work/qrb5165_rb5-oe-linux/
qti-Ubuntu-robotics-image/1.0-r0/rootfs-fsconfig.conf -B <srctree>/build-qti-
distro-Ubuntu-debug/tmp-glibc/deploy/images/qrb5165-rb5/system.map $
{IMAGE_EXT4_SELINUX_OPTIONS} -b 4096 qti-Ubuntu-robotics-image-qrb5165-rb5-
sysfs-new.ext4 <your sysroot workspace>

Use system.img
1. To repack the sysroot, run the following command:
sudo make_ext4fs -s -l 33554432000 -b 4096 sysfs.ext4 <sysroot mount
point>
For example:
sudo make_ext4fs -s -l 33554432000 -b 4096 sysfs.ext4 data
2. To check if the system.img output is an Android sparse image, run the following command:
file sysfs.ext4
sysfs.ext4: Android sparse image, version: 1.0, Total of 8192000 4096-byte
output blocks in 12234 input chunks

5.4 Develop using RB5 platform


NOTE Not supported on the Linux Embedded systems.

The prerequisites for setting up the device for development are:


1. Set up the network (Wi-Fi and Ethernet).
2. Run the following command to set up the build environment:
apt install gcc g++

3. Connect to the USB port and ensure that the device is detected in the Android Debug Bridge
mode.

80-88500-5 Rev. AE 84
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

Write a simple program on the Qualcomm Robotics RB5 Platform shell terminal. Print a line of
characters: Hello World! using the following commands:
adb shell
sh-4.4#vi hello.c
sh-4.4#gcc hello.c -o hello
sh-4.4# ./hello
Hello world!
sh-4.4#

5.4.1 Sample from GitHub


NOTE Not supported on the Linux Embedded systems.

A terminal-based snake game written in C with ncurses. The program uses vim-style to move
around. For more information, see https://github.com/mnisjk/snake.

Download source code


To download source code on the RB5 development kit, do the following:
1. Install Git on the device.
2. Run the following command on the Qualcomm Robotics RB5 Platform shell terminal:
sh-4.4#git clone https://github.com/mnisjk/snake.git

NOTE To clone with SSH, create SSH keys and add it to GitHub.

Install dependencies
The snake.c source file relies on ncurses to draw on the terminal. To install on Ubuntu/Debian,
run the following command:
sh-4.4#apt install libncurses5-dev

Compile and run


Run the following commands:
sh-4.4#cd snake
sh-4.4#gcc -I/usr/include/ -osnake snake.c -lncurses
sh-4.4#./snake

80-88500-5 Rev. AE 85
Qualcomm Robotics RB5 Development Kit User Guide Develop applications

80-88500-5 Rev. AE 86
A References

A.1 Related documents


Document Title Document Number

Qualcomm Robotics RB5 Platform Software Porting Guide 80-88500-1


Qualcomm Robotics RB5 Platform Software Build Guide 80-88500-2
Qualcomm Robotics RB5 Platform Software User Guide 80-88500-3
Qualcomm Robotics RB5 Platform Software Reference Manual 80-88500-4
Qualcomm Robotics RB5 Platform Quick Start Guide 80-88500-6
QRB5165 Data Sheet 80-PV086-1
QRB5165 Technical Reference Manual 80-PV086-5
QRB5165 Pin Assignment and GPIO Configuration Spreadsheet 80-PV086-1A
QRB5165N Data Sheet 80-19631-1
QRB5165N Technical Reference Manual 80-19631-5
QRB5165N Pin Assignment and GPIO Configuration Spreadsheet 80-19631-1A
Qualcomm Product Configuration Assistant Tool (PCAT) User Guide 80-PR518-1

A.2 Acronyms and terms


Acronym or term Expansion

ALSA Advanced Linux sound architecture


APT Advanced package tool
DHCP Dynamic host configuration protocol
DMIC Digital microphone interface
DPU Display processing unit
DSP Digital signal processor
EDL/QDL Emergency download mode or Qualcomm download mode
GBM Graphic buffer malloc
GMSL Gigabit multimedia serial links
HAL Hardware abstraction layer

80-88500-5 Rev. AE 87
Qualcomm Robotics RB5 Development Kit User Guide References

Acronym or term Expansion

HDMI High-definition multimedia interface


HLOS High-level operating system
IMU Inertial measurement unit
ISP Image signal processor
MIMO Multiple input multiple output
MIPI Mobile industry processor interface
NPU Neural processing unit
PoP Package-on-Package
QMMF Qualcomm multimedia framework
QUD Qualcomm USB driver
QUP Qualcomm universal peripheral
QUTS Qualcomm unified tools service
ROS Robot operating system
SDC Secure disk card
SDK Software development kit
SoM System-on-Module
SPU Secure processing unit
TFLite TensorFlow Lite
TZ TrustZone
UART Universal asynchronous receiver/transmitter
UFS Universal Flash storage
UVC USB video class
V4L Video4Linux
VPU Video processing unit
vSLAM Visual synchronous localization and mapping
WLAN Wireless local area network

80-88500-5 Rev. AE 88
LEGAL INFORMATION

Your access to and use of this material, along with any documents, software, specifications, reference board files, drawings, diagnostics and other
information contained herein (collectively this “Material”), is subject to your (including the corporation or other legal entity you represent,
collectively “You” or “Your”) acceptance of the terms and conditions (“Terms of Use”) set forth below. If You do not agree to these Terms of Use,
you may not use this Material and shall immediately destroy any copy thereof.

1) Legal Notice.
This Material is being made available to You solely for Your internal use with those products and service offerings of Qualcomm Technologies, Inc.
(“Qualcomm Technologies”), its affiliates and/or licensors described in this Material, and shall not be used for any other purposes. If this Material is
marked as “Qualcomm Internal Use Only”, no license is granted to You herein, and You must immediately (a) destroy or return this Material to
Qualcomm Technologies, and (b) report Your receipt of this Material to qualcomm.support@qti.qualcomm.com. This Material may not be altered,
edited, or modified in any way without Qualcomm Technologies’ prior written approval. Unauthorized use or disclosure of this Material or the
information contained herein is strictly prohibited, and You agree to indemnify Qualcomm Technologies, its affiliates and licensors for any damages
or losses suffered by Qualcomm Technologies, its affiliates and/or licensors for any such unauthorized uses or disclosures of this Material, in whole
or part.

Qualcomm Technologies, its affiliates and/or licensors retain all rights and ownership in and to this Material. No license to any trademark, patent,
copyright, mask work protection right or any other intellectual property right is either granted or implied by this Material or any information disclosed
herein, including, but not limited to, any license to make, use, import or sell any product, service or technology offering embodying any of the
information in this Material.

THIS MATERIAL IS BEING PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESSED, IMPLIED, STATUTORY OR OTHERWISE. TO
THE MAXIMUM EXTENT PERMITTED BY LAW, QUALCOMM TECHNOLOGIES, ITS AFFILIATES AND/OR LICENSORS SPECIFICALLY DISCLAIM ALL
WARRANTIES OF TITLE, MERCHANTABILITY, NON-INFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, SATISFACTORY QUALITY, COMPLETENESS
OR ACCURACY, AND ALL WARRANTIES ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR COURSE OF PERFORMANCE.
MOREOVER, NEITHER QUALCOMM TECHNOLOGIES, NOR ANY OF ITS AFFILIATES AND/OR LICENSORS, SHALL BE LIABLE TO YOU OR ANY THIRD PARTY
FOR ANY EXPENSES, LOSSES, USE, OR ACTIONS HOWSOEVER INCURRED OR UNDERTAKEN BY YOU IN RELIANCE ON THIS MATERIAL.

Certain product kits, tools and other items referenced in this Material may require You to accept additional terms and conditions before accessing
or using those items.

Technical data specified in this Material may be subject to U.S. and other applicable export control laws. Transmission contrary to U.S. and any other
applicable law is strictly prohibited.

Nothing in this Material is an offer to sell any of the components or devices referenced herein.

This Material is subject to change without further notification.

In the event of a conflict between these Terms of Use and the Website Terms of Use on www.qualcomm.com or the Qualcomm Privacy Policy
referenced on www.qualcomm.com, these Terms of Use will control. In the event of a conflict between these Terms of Use and any other agreement
(written or click-through, including, without limitation any non-disclosure agreement) executed by You and Qualcomm Technologies or a Qualcomm
Technologies affiliate and/or licensor with respect to Your access to and use of this Material, the other agreement will control.

These Terms of Use shall be governed by and construed and enforced in accordance with the laws of the State of California, excluding the U.N.
Convention on International Sale of Goods, without regard to conflict of laws principles. Any dispute, claim or controversy arising out of or relating
to these Terms of Use, or the breach or validity hereof, shall be adjudicated only by a court of competent jurisdiction in the county of San Diego,
State of California, and You hereby consent to the personal jurisdiction of such courts for that purpose.

2) Trademark and Product Attribution Statements.


Qualcomm is a trademark or registered trademark of Qualcomm Incorporated. Arm is a registered trademark of Arm Limited (or its subsidiaries) in
the U.S. and/or elsewhere. The Bluetooth® word mark is a registered trademark owned by Bluetooth SIG, Inc. Other product and brand names
referenced in this Material may be trademarks or registered trademarks of their respective owners.

Snapdragon and Qualcomm branded products referenced in this Material are products of Qualcomm Technologies, Inc. and/or its subsidiaries.
Qualcomm patented technologies are licensed by Qualcomm Incorporated.

You might also like