NanoPi R1

From FriendlyELEC WiKi
Revision as of 02:39, 17 January 2019 by Yftan (Talk | contribs) (Configure Wireless)

Jump to: navigation, search

查看中文

1 Introduction

Overview
Front
Back
  • The NanoPi R1("R1") is a complete open source board developed by FriendlyElec for makers, hobbyists, fans and etc.
  • The NanoPi R1 has one Gbps Ethernet port and one Fast Ethernet port. It has an onboard 2.4G Wi-Fi module. FriendlyElec ported OpenWRT to the R1. With some additional settings it will work like a router.Its good networking performance and features make it a good platform for various network applications.

2 Hardware Spec

  • CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz
  • DDR3 RAM: 512MB/1GB
  • Storage: NC/8GB eMMC
  • Network:
    • 10/100/1000M Ethernet x 1,
    • 10/100M Ethernet x 1
  • WiFi: 802.11b/g/n, with SMA antenna interface
  • Bluetooth:4.0 dual mode
  • USB Host: Type-A x2
  • MicroSD Slot x 1
  • MicroUSB: for OTG and power input
  • Debug Serial Port: 3Pin 2.54mm pitch pin-header
  • UART: 4Pin 2.54mm pitch pin-header
  • LED: LED x 3
  • KEY: KEY x 1
  • PC Size: 50.5 x 60mm
  • Power Supply: DC 5V/2A
  • Temperature measuring range: -40℃ to 80℃
  • OS/Software: U-boot,Ubuntu-Core,OpenWRT
  • Weight: xxg

3 Diagram, Layout and Dimension

3.1 Layout

NanoPi R1 Layout

3.2 Board Dimension

NanoPi R1-dimensions.png

For more details refer to:NanoPi_R1 pcb file in dxf format

4 Get Started

4.1 Essentials You Need

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

  • NanoPi R1
  • 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 R1 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
nanopi-r1_sd_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip FriendlyCore based on UbuntuCore and Linux-4.14 kernel
nanopi-r1_sd_openwrt_4.14_armhf_YYYYMMDD.img.zip OpenWrt and Linux-4.14 kernel
nanopi-r1_eflasher_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip eflasher image which is used to install FriendlyCore(Linux-4.14) to eMMC
nanopi-r1_eflasher_openwrt_4.14_armhf_YYYYMMDD.img.zip eflasher image which is used to install OpenWrt(Linux-4.14) to eMMC
Flashing Utility
win32diskimager.rar Windows utility. Under Linux users can use "dd"


4.3.1.1 Flash to eMMC
4.3.1.1.1 Flash OS with eflasher Utility
  • For more details about eflasher refer to the wiki link: EFlasher
  • Extract the eflasher Image and win32diskimager.rar files. Insert a TF card(at least 4G) 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.
  • Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the green LED is on and the blue LED is blinking this indicates your board has successfully booted.
  • If your board doesn't support HDMI or no monitor is connected you can select an OS by running the following command:
$ su root
$ eflasher

The password for "root" is "fa".

We take "nanopi-r1_eflasher_friendlycore-xenial_4.14_armhf_YYYYMMDD.img" as an example. After you run the "eflasher" command you will see the following messages:

eflasher_friendlycore1
Type "1", select writing friendlycore system to eMMC you will see the following messages:

eflasher_friendlycore2_h3
Type "yes" to start installation:

eflasher_friendlycore3
After it is done power off the system, take off the TF card, power on again your system will be booted from eMMC.

  • If you want to flash other system to eMMC you can download the whole images-for-eflasher directory and extract the package under that directory to the FRIENDLYARM partition of an installation SD card.

eflasher_friendlyarm_h3

5 How to Use OpenWrt

5.1 Introduction

OpenWrt is a highly extensible GNU/Linux variant for embedded devices. Unlike many other distributions for routers, OpenWrt is built from the ground up to be a full-featured, easily modifiable OS for a router. In practice this means you can have all the features with none of the bloat, powered by a Linux kernel that is more recent than most other distributions. For more details you can refer to OpenWrt website.

5.2 Login OpenWrt

  • Login from serial port

Here is a hardware setup to connect your board to a serial device:
1) Connect your board to a FriendlyElec's PSU_ONECOM module. Both the module's DC port and the board's MicroUSB need to be powered by a 5V/2A power supply.Note: insufficient power supply may not make the system work normally.
PSU_ONECOM-R1
2) Connect your board to a FriendlyElec's Matrix-USB2UART module. The board's MicroUSB needs to be powered by a 5V/2A power supply
USB2UART-R1
By default a user logs in as "root" and doesn't need a password for "root". You can set a password for "root" by using the "passwd" command.
R1-login
When your board is booted for the first time it will automatically extend its TF card's rootfs file system to its max available space:
resize_rootfs
This will take a while and you need to wait for the process to complete.

  • Login via SSH

A NanoPi R1 that runs FriendlyElec's OpenWrt by default is configured as a secondary router. Its Gbps Ethernet(eth0) is configured as WAN and Fast Ethernet(eth1) is configured as LAN.
If you want to login via SSH you need to connect your R1's Gbps Ethernet to a master router's LAN port. Here is a hardware setup:
r1_lan_connected
We assume the IP address for the board's Gbps Ethernet(eth0) is 192.168.1.163. Run the following command to login via SSH:

$ ssh root@192.168.1.163

By default a user logs in as "root" without a password.

  • Login from Web

OpenWrt supports system login from a LuCI Web page. You can refer to <Login via SSH> to configure your system. We assume the IP address for your board's Gbps Ethernet is 192.168.1.163. After type in the IP address in a browser's address bar you will be able to login. Here is what you should see:
R1-OpenWrt-LuCI
By default a users logs in as "root" without a password. Click on the "Login" button you will login.

5.2.1 Configure WAN and LAN

  • After login, navigate to the top of the page, click on Network ---> Interfaces, and click on "WAN" and "LAN" to configure WAN and LAN.

R1_Interfaces_WAN R1_Interfaces_LAN

5.3 Connect to R1's WiFi Hotspot

By default a NanoPi R1 that runs OpenWrt is configured as a secondary router. To achieve better performance you need to install a WiFi antenna to your board. By default the board's WiFi module AP6212 works in the AP mode and its hotspot's name is "OpenWrt". You can use a smart phone to connect to this hotspot without a password and browse the internet.
After your smart phone is successfully connected to the board's WiFi hotspot you can go to "LuCI" -> "Netwrok" -> "Wireless" to check your connection:
openwrt_wifiap_connected
By default the WiFi hotspot falls into 192.168.2.x and you can open a browser on your phone and type 192.168.2.1 in the browser's address bar to visit LuCI:
phone_luci

5.4 有线网络设备连接开发板的LAN口

NanoPi R1的OpenWrt系统默认被配置为二级无线路由功能,其中的百兆以太网口(eth1)被配置LAN功能,PC/开发板等有线网络设备可以通过网线连接到R1的LAN口,然后访问互联网,示例如下:
r1_lan_connected
此时,NanoPi NEO已经能访问互联网了:

$ ping www.baidu.com
64 bytes from 14.215.177.38: icmp_seq=2 ttl=56 time=19.5 ms
Wireless, enter the configuration page for WiFi hotspot and click on "Edit" to configure WiFi hotspot.

R1-Wireless

  • Go to Interface Configuration ---> General Setup ---> ESSID and you can change your wifi hotspot's name. After you make your change click on Save & Apply to save your change.

R1-Wireless-ESSID

  • Go to Interface Configuration ---> Wireless Security and you can reset your WiFi hotspot's Encryption. You can reset your WiFi hotspot's password in the "Key" field and click on Save & Apply to save your change.

R1-Wireless-Key

  • Go to Network ---> Wireless and you can check all the available WiFi hotspot devices listed in "Associated Stations".

R1-Wireless-Associated Stations
--->

6 Developer's Guide

7 Resources

7.1 Schematics and Datasheets

8 Update Log

8.1 Jan-02-2019

  • Released English Version