NanoPi R2S

From FriendlyARM WiKi
Jump to: navigation, search

查看中文

1 Introduction

Overview
Front
Back
Case
  • The NanoPi R2S(as "R2S") is an open source platform with dual-Gbps Ethernet ports designed and developed by FriendlyElec for IoT applications.
  • The NanoPi R2S uses the RK3328 SoC. It has two Gbps Ethernet ports and 1G DDR4 RAM. FriendlyElec ported an OpenWrt system for it. It works with Docker CE. It is a good platform for developing IoT applications, NAS applications, smart home gateways etc.

2 Hardware Spec

  • CPU: Rockchip RK3328, Quad-core Cortex-A53
  • DDR4 RAM: 1GB
  • Network:
    • Internal 10/100/1000M Ethernet Port x 1
    • USB3.0 converted 10/100/1000M Ethernet Port x 1
  • USB2.0 Host: Type-A x1
  • MicroSD Slot x 1
  • MicroUSB: power input and USB Slave
  • Debug Serial Port: 3.3V TTL, 3-pin 2.54mm pitch connector
  • LED: LED x 3
  • KEY: KEY x 1 programmable
  • PC Size: 55.6 x 52mm
  • Power Supply: DC 5V/2A
  • Temperature measuring range: 0℃ to 80℃
  • OS/Software: U-boot,Ubuntu-Core,OpenWrt


  • Network Transmission Rates
TX RX
WAN 941 Mbps 941 Mbps
LAN 941 Mbps 941 Mbps
Notes: 1. test utility: iperf
2. use indepedent IP address section and test with a PC in simplex communication mode

3 Diagram, Layout and Dimension

3.1 Layout

NanoPi R2S Layout

  • GPIO 24-Pin Spec
Pin# Name Linux gpio Pin# Name Linux gpio
1 SYS_3.3V 2 VDD_5V
3 I2C0_SDA / GPIO2_D1 89 4 VDD_5V
5 I2C0_SCL / GPIO2_D0 88 6 GND
7 GPIO2_A2 / IR_RX 66 8 UART1_TX / GPIO3_A4 100
9 GND 10 UART1_RX / GPIOG3_A6 102
For more details refer to:NanoPi_R2S_V1.0_1912-Schematic.pdf
Dimensional Diagram:NanoPi R2S PCB file in dxf format

4 Get Started

4.1 Essentials You Need

Before starting to use your NanoPi R2S get the following items ready

  • NanoPi R2S
  • MicroSD Card/TF Card: Class 10 or Above, minimum 8GB SDHC
  • MicroUSB 5V/2A power adapter
  • A host computer running Ubuntu 16.04 64-bit system

4.2 TF Cards We Tested

To make your NanoPi R2S boot and run fast we highly recommend you use a Class10 8GB SDHC TF card or a better one. The following cards are what we used in all our test cases presented here:

  • SanDisk TF 8G Class10 Micro/SD High Speed TF card:

SanDisk microSD 8G

  • SanDisk TF128G MicroSDXC TF 128G Class10 48MB/S:

SanDisk microSD 128G

  • 川宇 8G C10 High Speed class10 micro SD card:

chuanyu microSD 8G

4.3 Install OS

4.3.1 Download Image Files

Go to download link to download the image files under the officail-ROMs directory and the flashing utility under the tools directory:

Image Files:
rk3328-sd-friendlycore-bionic-5.4-arm64-YYYYMMDD.img.zip Based on UbuntuCore 18.04 and Linux-5.4.12 Kernel
rk3328-sd-friendlywrt-5.4-YYYYMMDD.img.zip Based on OpenWrt and Linux-5.4.12 Kernel
Flashing Utility:
win32diskimager.rar Windows utility. Under Linux users can use "dd"

4.3.2 Linux

4.3.2.1 Flash to TF
  • FriendlyCore / Debian / Ubuntu / OpenWrt / DietPi are all based on a same Linux distribution and their installation methods are the same.
  • Extract the Linux image and win32diskimager.rar files. Insert a TF card(at least 8G) into a Windows PC and run the win32diskimager utility as administrator. On the utility's main window select your TF card's drive, the wanted image file and click on "write" to start flashing the TF card.


After it is installed you will see the following window:
win32disk-finish

  • Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the PWR LED is on and the STAT LED is blinking this indicates your board has successfully booted.
    ;

5 Work with FriendlyWrt

5.1 Introduction to FriendlyWrt

FriendlyWrt is a customized system made by FriendlyElec based on an OpenWrt distribution. It is open source and well suitable for developing IoT applications, NAS applications, smart home gateways etc.

5.2 Account & Password

By default the password is NULL. You can set a password for root for web and SSH login.

5.3 Network Connection

Use a network cable to connect NanoPi-R2S's WAN to a master router and the board will get an IP address via DHCP. Login into the router and check NanoPi-R2S's IP address.

5.4 Login FriendlyWrt

Type NanoPi-R2S's IP address in a browser's address bar and enter to open FriendlyWrt's administration page or you can login into FriendlyWrt's administration page via SSH.

5.5 Install Software Packages

5.5.1 Update Package List

Before install software packages update the package list:

$ opkg update

5.5.2 List Available Packages

$ opkg list

At the time of writing there are 3241 available packages.

5.5.3 List Installed Packages

$ opkg list-installed

5.5.4 Install Packages

$ opkg install <package names>

5.5.5 Remove Packages

$ opkg remove <package names>

5.6 Work with Docker Applications

5.6.1 Work with Docker: Install JellyBin

mkdir -p /jellyfin/config
mkdir -p /jellyfin/videos
docker run --restart=always -d -p 8096:8096 -v /jellyfin/config:/config -v /jellyfin/videos:/videos jellyfin/jellyfin:10.1.0-arm64 -name myjellyfin

After installation, visit port 8096 and here is what you would find:
FriendlyWrt+JerryFin

5.6.2 Work with Docker: Install Personal Nextcloud

mkdir /nextcloud -p
docker run -d -p 8888:80  --name nextcloud  -v /nextcloud/:/var/www/html/ --restart=always --privileged=true  arm64v8/nextcloud

After installtion, visit port 8888.

5.7 Enable Swap Partition

Run the following commands in a commandline utility and reboot:

/etc/enable-swap.sh
reboot

5.8 Mount smbfs

mount -t cifs //192.168.1.10/shared /movie -o username=xxx,password=yyy,file_mode=0644

5.9 Compile FriendlyWrt

Refer to: How to Build FriendlyWrt/zh

6 Work with FriendlyCore

6.1 FriendlyCore User Account

  • Non-root User:
   User Name: pi
   Password: pi
  • Root:
   User Name: Root
   Password: fa

6.2 Update Software Packages

$ sudo apt-get update

6.3 Setup Network Configurations

By default "eth0" is assigned an IP address obtained via dhcp. If you want to change the setting you need to change the following file:

vi /etc/network/interfaces.d/eth0

For example if you want to assign a static IP to it you can run the following commands:

auto eth0
iface eth0 inet static
    address 192.168.1.231
    netmask 255.255.255.0
    gateway 192.168.1.1

To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory.

7 Resources

7.1 Datasheets and Schematics

8 Update Logs

8.1 2020-01-18

Released English version