info Overview

The Orange Pi RV2 is a powerful RISC-V single-board computer featuring a quad-core processor, up to 8GB RAM, and full Linux support. It's designed for edge computing, IoT applications, and embedded Linux development with the open-source RISC-V architecture.

Perfect for developers looking to build smart home systems, edge AI applications, network appliances, or simply explore RISC-V computing, the Orange Pi RV2 offers impressive performance at an affordable price point.

tips_and_updates
Why Choose Orange Pi RV2?
Full Linux distribution support, powerful quad-core RISC-V processor, extensive GPIO and peripheral interfaces, active community, and excellent value for money.

Key Features

speed

Quad-Core Power

1.5GHz RISC-V processor for demanding applications

memory

Up to 8GB RAM

Plenty of memory for multitasking and complex workloads

usb

Rich Connectivity

USB 3.0, Ethernet, WiFi, Bluetooth support

display_settings

HDMI Output

4K video output for desktop applications

description Technical Specifications

Component Specification
Processor Quad-core RISC-V @ 1.5GHz
RAM 2GB / 4GB / 8GB LPDDR4X
Storage MicroSD card slot, eMMC socket (optional)
Video Output HDMI 2.0 (4K@60Hz)
USB Ports 2x USB 3.0, 1x USB 2.0 (OTG)
Network Gigabit Ethernet, WiFi 5, Bluetooth 5.0
GPIO 40-pin header (compatible with Raspberry Pi)
Display DSI connector for LCD panels
Camera CSI connector for camera modules
Power 5V/3A via USB-C or GPIO header
Operating Temperature 0°C to 70°C
Dimensions 85mm x 56mm

build Initial Setup

What You'll Need

  • Orange Pi RV2 board
  • MicroSD card (16GB or larger, Class 10 recommended)
  • 5V/3A USB-C power supply
  • HDMI cable and monitor (optional for headless setup)
  • USB keyboard and mouse (for initial setup)
  • Ethernet cable or WiFi credentials

Quick Start Steps

1Download the OS Image

Download the latest Ubuntu or Debian image for Orange Pi RV2 from the official website.

2Flash the Image

# Using Balena Etcher (recommended)
1. Open Balena Etcher
2. Select the downloaded image file
3. Select your SD card
4. Click "Flash!"

# Or using dd on Linux
sudo dd if=ubuntu-orangepi-rv2.img of=/dev/sdX bs=4M status=progress
sudo sync

3First Boot

  • Insert the flashed SD card into Orange Pi RV2
  • Connect HDMI, keyboard, and mouse
  • Connect power - the board will boot automatically
  • Wait for the first boot to complete (may take 2-3 minutes)
check_circle
Success! If you see the login prompt, your Orange Pi RV2 is ready. Default credentials are usually: orangepi / orangepi

computer Linux Installation & Configuration

Initial System Update

After first boot, update your system:

sudo apt update
sudo apt upgrade -y
sudo apt install build-essential git python3-pip -y

Configure System Settings

Use the configuration tool to set up your system:

sudo orangepi-config

This allows you to:

  • Expand filesystem to use full SD card
  • Change hostname and password
  • Configure localization (timezone, keyboard)
  • Enable/disable services
  • Configure network settings

wifi Network Configuration

The Orange Pi RV2 supports both wired Ethernet and wireless WiFi connections. This section covers how to configure networking for your board.

Wired Ethernet

Ethernet typically works out of the box with DHCP. To verify your connection:

# Check network interfaces
ip addr show

# Check connectivity
ping -c 4 google.com

# View current IP address
hostname -I

Static IP Configuration

To set a static IP address, edit the netplan configuration:

/etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 192.168.1.100/24
      gateway4: 192.168.1.1
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4

Apply the configuration:

sudo netplan apply

WiFi Configuration

Connect to WiFi using nmcli (NetworkManager command line interface):

# List available WiFi networks
nmcli dev wifi list

# Connect to a WiFi network
nmcli dev wifi connect "YourNetworkSSID" password "YourPassword"

# Check connection status
nmcli connection show

# View saved connections
nmcli connection show --active
tips_and_updates
Tip: For hidden networks, use: nmcli dev wifi connect "SSID" password "pass" hidden yes

WiFi with Netplan

Alternatively, configure WiFi via netplan:

/etc/netplan/02-wifi.yaml
network:
  version: 2
  wifis:
    wlan0:
      dhcp4: true
      access-points:
        "YourNetworkSSID":
          password: "YourPassword"

Setting Up SSH for Remote Access

Enable and configure SSH for headless operation:

# Install SSH server (if not installed)
sudo apt install openssh-server -y

# Enable SSH service
sudo systemctl enable ssh
sudo systemctl start ssh

# Check SSH status
sudo systemctl status ssh

# Find your IP address
ip addr show | grep inet

Now you can connect from another computer:

ssh orangepi@192.168.1.100

Firewall Configuration

Secure your board with UFW (Uncomplicated Firewall):

# Install UFW
sudo apt install ufw -y

# Allow SSH connections
sudo ufw allow ssh

# Allow specific ports (e.g., web server)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Enable firewall
sudo ufw enable

# Check status
sudo ufw status verbose
warning
Important: Always allow SSH before enabling the firewall, or you may lock yourself out of remote access!

settings_input_component GPIO Programming

The Orange Pi RV2 features a 40-pin GPIO header compatible with Raspberry Pi pinout.

Python GPIO Example

Install the GPIO library:

sudo pip3 install OPi.GPIO

Blink an LED on GPIO Pin 11:

blink_led.py
import OPi.GPIO as GPIO
import time

# Use board pin numbering
GPIO.setmode(GPIO.BOARD)

# Set up pin 11 as output
GPIO.setup(11, GPIO.OUT)

try:
    while True:
        GPIO.output(11, GPIO.HIGH)  # LED ON
        time.sleep(1)
        GPIO.output(11, GPIO.LOW)   # LED OFF
        time.sleep(1)
except KeyboardInterrupt:
    GPIO.cleanup()

Reading Input from a Button

button_read.py
import OPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BOARD)

# Set up pin 11 as output (LED)
# Set up pin 13 as input with pull-up resistor (Button)
GPIO.setup(11, GPIO.OUT)
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP)

try:
    while True:
        button_state = GPIO.input(13)
        if button_state == GPIO.LOW:  # Button pressed
            GPIO.output(11, GPIO.HIGH)
            print("Button pressed!")
        else:
            GPIO.output(11, GPIO.LOW)
        time.sleep(0.1)
except KeyboardInterrupt:
    GPIO.cleanup()

code Python Development

Python is an excellent choice for development on the Orange Pi RV2. It comes pre-installed on most Linux distributions and offers extensive libraries for hardware interaction, web development, data processing, and more.

Setting Up Python Environment

First, ensure Python and pip are up to date:

# Check Python version
python3 --version

# Update pip
python3 -m pip install --upgrade pip

# Install essential development tools
sudo apt install python3-dev python3-venv -y

Creating a Virtual Environment

Best practice is to use virtual environments for your projects:

# Create a new virtual environment
python3 -m venv ~/myproject/venv

# Activate the virtual environment
source ~/myproject/venv/bin/activate

# Your prompt will change to show (venv)
# Install packages within the environment
pip install flask requests numpy

# Deactivate when done
deactivate

Essential Libraries for Hardware Projects

# GPIO control
pip install OPi.GPIO

# I2C communication
pip install smbus2

# SPI communication  
pip install spidev

# Serial/UART communication
pip install pyserial

# Sensor libraries
pip install adafruit-circuitpython-dht
pip install adafruit-circuitpython-bmp280

Example: I2C Temperature Sensor

Read temperature from a BMP280 sensor connected via I2C:

temp_sensor.py
import smbus2
import time

# BMP280 I2C address
BMP280_ADDR = 0x76

# Initialize I2C bus
bus = smbus2.SMBus(1)

def read_temperature():
    # Read calibration data and temperature
    # (simplified example - full implementation needs calibration)
    data = bus.read_i2c_block_data(BMP280_ADDR, 0xFA, 3)
    raw_temp = (data[0] << 12) | (data[1] << 4) | (data[2] >> 4)
    
    # Apply calibration (simplified)
    temperature = raw_temp / 5120.0
    return temperature

try:
    while True:
        temp = read_temperature()
        print(f"Temperature: {temp:.2f}°C")
        time.sleep(2)
except KeyboardInterrupt:
    print("Stopped")
finally:
    bus.close()

Example: Simple Flask Web Server

Create a web interface to monitor your Orange Pi:

web_monitor.py
from flask import Flask, jsonify
import subprocess
import os

app = Flask(__name__)

def get_cpu_temp():
    """Read CPU temperature"""
    try:
        temp = subprocess.check_output(
            ["cat", "/sys/class/thermal/thermal_zone0/temp"]
        )
        return float(temp) / 1000
    except:
        return 0

def get_memory_usage():
    """Get memory usage percentage"""
    with open('/proc/meminfo', 'r') as f:
        lines = f.readlines()
    total = int(lines[0].split()[1])
    available = int(lines[2].split()[1])
    used_percent = ((total - available) / total) * 100
    return round(used_percent, 1)

def get_disk_usage():
    """Get disk usage percentage"""
    stat = os.statvfs('/')
    total = stat.f_blocks * stat.f_frsize
    free = stat.f_bfree * stat.f_frsize
    used_percent = ((total - free) / total) * 100
    return round(used_percent, 1)

@app.route('/')
def index():
    return '''
    <h1>Orange Pi RV2 Monitor</h1>
    <p>Visit /api/status for system stats</p>
    '''

@app.route('/api/status')
def status():
    return jsonify({
        'cpu_temp': get_cpu_temp(),
        'memory_percent': get_memory_usage(),
        'disk_percent': get_disk_usage()
    })

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)

Run the server:

pip install flask
python3 web_monitor.py

Access it at http://your-orangepi-ip:5000

lightbulb
Pro Tip: Use gunicorn for production deployments: pip install gunicorn && gunicorn -w 4 -b 0.0.0.0:5000 web_monitor:app

Running Python Scripts at Startup

Create a systemd service to run your Python script automatically:

/etc/systemd/system/myapp.service
[Unit]
Description=My Python Application
After=network.target

[Service]
Type=simple
User=orangepi
WorkingDirectory=/home/orangepi/myproject
ExecStart=/home/orangepi/myproject/venv/bin/python app.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable myapp.service
sudo systemctl start myapp.service
sudo systemctl status myapp.service

widgets Docker Containers

Docker enables you to run containerized applications on your Orange Pi RV2, making it easy to deploy services like databases, web servers, home automation platforms, and more with isolated environments and simplified dependency management.

Installing Docker

Install Docker using the official convenience script:

# Download and run the install script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add your user to the docker group (avoid using sudo)
sudo usermod -aG docker $USER

# Log out and back in, then verify installation
docker --version
docker run hello-world
tips_and_updates
Note: After adding yourself to the docker group, you need to log out and log back in for the changes to take effect.

Installing Docker Compose

Docker Compose makes it easy to define and run multi-container applications:

# Install Docker Compose plugin
sudo apt install docker-compose-plugin -y

# Verify installation
docker compose version

Example: Running Portainer

Portainer provides a web-based UI to manage your Docker containers:

# Create a volume for Portainer data
docker volume create portainer_data

# Run Portainer
docker run -d \
  --name portainer \
  --restart=always \
  -p 9000:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Access Portainer at http://your-orangepi-ip:9000

Example: Home Assistant with Docker Compose

Deploy Home Assistant for home automation:

docker-compose.yml
version: '3.8'

services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - ./homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

Deploy with:

# Create directory and deploy
mkdir -p ~/homeassistant
cd ~/homeassistant

# Create the docker-compose.yml file (paste content above)
nano docker-compose.yml

# Start the container
docker compose up -d

# View logs
docker compose logs -f

Example: MQTT Broker + Node-RED Stack

A complete IoT development stack:

iot-stack/docker-compose.yml
version: '3.8'

services:
  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto:latest
    ports:
      - "1883:1883"
      - "9001:9001"
    volumes:
      - ./mosquitto/config:/mosquitto/config
      - ./mosquitto/data:/mosquitto/data
      - ./mosquitto/log:/mosquitto/log
    restart: unless-stopped

  nodered:
    container_name: nodered
    image: nodered/node-red:latest
    ports:
      - "1880:1880"
    volumes:
      - ./nodered:/data
    environment:
      - TZ=America/Port_of_Spain
    depends_on:
      - mosquitto
    restart: unless-stopped

  influxdb:
    container_name: influxdb
    image: influxdb:2.7
    ports:
      - "8086:8086"
    volumes:
      - ./influxdb:/var/lib/influxdb2
    environment:
      - DOCKER_INFLUXDB_INIT_MODE=setup
      - DOCKER_INFLUXDB_INIT_USERNAME=admin
      - DOCKER_INFLUXDB_INIT_PASSWORD=adminpassword
      - DOCKER_INFLUXDB_INIT_ORG=myorg
      - DOCKER_INFLUXDB_INIT_BUCKET=iot
    restart: unless-stopped

Useful Docker Commands

# List running containers
docker ps

# List all containers (including stopped)
docker ps -a

# View container logs
docker logs -f container_name

# Stop a container
docker stop container_name

# Remove a container
docker rm container_name

# List images
docker images

# Remove unused images
docker image prune -a

# View resource usage
docker stats

# Execute command in running container
docker exec -it container_name bash

# Docker Compose commands
docker compose up -d      # Start services in background
docker compose down       # Stop and remove containers
docker compose pull       # Pull latest images
docker compose restart    # Restart services

Managing Docker Storage

Docker can consume significant storage. Clean up periodically:

# Remove all unused data (containers, networks, images, cache)
docker system prune -a

# Check Docker disk usage
docker system df

# Remove specific unused resources
docker container prune  # Remove stopped containers
docker image prune      # Remove dangling images
docker volume prune     # Remove unused volumes
warning
Storage Warning: If using an SD card, be mindful of write cycles. Consider using an external SSD or eMMC for Docker data directories to extend storage lifespan.

RISC-V Docker Image Compatibility

Not all Docker images support RISC-V architecture yet. Look for images tagged with riscv64 or multi-architecture images. Many popular images now include RISC-V support.

check_circle

Supported

Portainer, Home Assistant, Node-RED, Mosquitto, InfluxDB, Grafana, Nginx, PostgreSQL

help

Check First

Always verify RISC-V support on Docker Hub before deploying new images

public Project: Simple Web Server

Turn your Orange Pi RV2 into a web server hosting a simple website.

Install Nginx

sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx

Create Your Website

sudo nano /var/www/html/index.html

Add your HTML content, then access your website by navigating to your Orange Pi's IP address in a web browser!

Enable HTTPS with Let's Encrypt

Secure your website with a free SSL certificate:

# Install Certbot
sudo apt install certbot python3-certbot-nginx -y

# Obtain certificate (replace with your domain)
sudo certbot --nginx -d yourdomain.com

# Auto-renewal is configured automatically
sudo certbot renew --dry-run

router Project: IoT Gateway

Transform your Orange Pi RV2 into a powerful IoT gateway that can collect data from sensors, process it locally, and forward it to cloud services.

Architecture Overview

sensors

Data Collection

MQTT broker receives data from IoT sensors and devices

memory

Processing

Node-RED processes and transforms incoming data

storage

Storage

InfluxDB stores time-series data locally

cloud_upload

Cloud Sync

Forward data to AWS, Azure, or Google Cloud

See the Docker Containers section for the complete deployment stack.

download Downloads & Resources

Get the latest software, images, and documentation:

download Coming Soon!