Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock3/Debian"

(WIFI Connection)
Line 8: Line 8:
  
 
== Work with ROCK 3 Debian ==
 
== Work with ROCK 3 Debian ==
 +
 
=== Introduction to ROCK 3 Debian ===
 
=== Introduction to ROCK 3 Debian ===
[[File:ROCKPI4-Debian-desktop.png | 800px ]]
 
  
 
ROCK 3 Debian  is an easy to use desktop system. While working with ROCK 3 Debian, you will find it do well on playing music, Internet, Bluetooth, AI and so on.
 
ROCK 3 Debian  is an easy to use desktop system. While working with ROCK 3 Debian, you will find it do well on playing music, Internet, Bluetooth, AI and so on.
Line 16: Line 16:
  
 
Command prepended by $ means the command may be executed by an unprivileged user.  And command prepended by # means the command may be executed by an privileged user. But the symbol, $ or #, is not part of the command.
 
Command prepended by $ means the command may be executed by an unprivileged user.  And command prepended by # means the command may be executed by an privileged user. But the symbol, $ or #, is not part of the command.
=== Use System Tool Terminal ===
 
 
There are three kinds of tools for Terminal. They are LXTerminal, ""UXTerm"" and ""XTerm"". You are encouraged to choose your favorite one.
 
Click on the icon, flying bird, on the bottom left in the ROCK3 Debian's main window, and click on the icon, System Tools to select your wanted Terminal tool. Here is the LXTerminal as an example.
 
If you try to experience more excitement, just as we want you to do that, you can type the following command to be a super user.
 
  $ sudo su
 
  
[[File:terminal-LXTerminal.png | 800px ]]
 
 
=== Access from the Host PC/Laptop ===
 
=== Access from the Host PC/Laptop ===
  
Line 29: Line 22:
  
 
Check [[rock3/dev/serial-console | Serial Console]]
 
Check [[rock3/dev/serial-console | Serial Console]]
 +
 
==== Option 2: SSH ====
 
==== Option 2: SSH ====
 
SSH server  is enabled on port 22 of ROCK 3 default image.  
 
SSH server  is enabled on port 22 of ROCK 3 default image.  
  
Please use [https://angryip.org/ angryip] or use this command '''"ifconfig"''' by serial console to find your board IP address.
+
Please use [https://angryip.org/ angryip] to find your board IP address.
 +
 
 +
$ ping ip-of-device
 +
$ ssh rock@ip-of-device
  
  $ ping ip-of-device
 
  $ ssh linaro@ip-of-device
 
 
=== Debian Default User Account ===
 
=== Debian Default User Account ===
  
 
Non-root User:
 
Non-root User:
  
  User Name : linaro
+
User Name : rock
  Password  : linaro
+
Password  : rock
  
 
===Desktop ===
 
===Desktop ===
  
 
The preinstalled Desktop is xfce4.
 
The preinstalled Desktop is xfce4.
 +
 
=== Install and update  necessary packages ===
 
=== Install and update  necessary packages ===
  
Line 52: Line 48:
 
Install packages;
 
Install packages;
  
  $ sudo apt-get update
+
$ sudo apt-get update
  $ sudo apt-get install -y rockchip-overlay
+
$ sudo apt-get install -y rockchip-overlay
  $ sudo apt-get install -y linux-4.4-rock-3-latest
+
$ sudo apt-get install -y linux-4.4-rock-3-latest
  
 
=== Network Connection ===
 
=== Network Connection ===
  
 
There are two methods for network connection. One is Ethernet and the other is WIFI.
 
There are two methods for network connection. One is Ethernet and the other is WIFI.
 +
 
==== Ethernet Connection ====
 
==== Ethernet Connection ====
 
You can use a network cable (one end connected to the external network port or route)  to connect your ROCK 3 to the network. The ROCK 3 will automatically configure the network for your surfing on the Internet.
 
You can use a network cable (one end connected to the external network port or route)  to connect your ROCK 3 to the network. The ROCK 3 will automatically configure the network for your surfing on the Internet.
  
 
===== To test the Ethernet, we need to follow the steps: =====
 
===== To test the Ethernet, we need to follow the steps: =====
 +
* Switch to super user mode by command
 +
$ sudo su
  
* Check whether the Ethernet is normal by command, '''ifconfig''', which would show us a network card, eth0, and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.  
+
* Check whether the Ethernet is normal by command, ifconfig, which would show us a network card, eth0, and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.  
  
  $ ifconfig
+
$ ifconfig
  $ ping www.baidu.com
+
$ ping www.baidu.com
  
 
* If failed to connect to a normal domain. , try  
 
* If failed to connect to a normal domain. , try  
  
  $ sudo dhclient eth0
+
$ sudo dhclient eth0
  
 
==== WIFI Connection ====
 
==== WIFI Connection ====
When there is not a network cable for your ROCK 3 the WIFI connection is another good choice. ROCK Pi N10 supports 2.4G/5G WIFI wireless network.
+
 
 +
When there is not a network cable for your ROCK 3 the WIFI connection is another good choice. ROCK Pi N10 supports 2.4G/5G WIFI and WIFI 6 wireless network.
 +
 
 
=====To test the WIFI performance, we need to follow the steps:=====
 
=====To test the WIFI performance, we need to follow the steps:=====
  
 
* Switch to super user mode
 
* Switch to super user mode
  $ sudo su
+
$ sudo su
  
 
* Open the WIFI
 
* Open the WIFI
  $ nmcli r wifi on
+
$ nmcli r wifi on
  
 
* Scan WIFI
 
* Scan WIFI
  $ nmcli dev wifi
+
$ nmcli dev wifi
  
 
* Connect to WIFI network
 
* Connect to WIFI network
  $ nmcli dev wifi connect "wifi_name" password "wifi_password"
+
$ nmcli dev wifi connect "wifi_name" password "wifi_password"
  
 
* Test WIFI perpormance by tool iperf.
 
* Test WIFI perpormance by tool iperf.
  
=== Check the DDR Menory ===
+
=== Check DDR size ===
Rock3a  has several different DDR memory sizes, such as 2G, 4G, 8G.
+
ROCK 3 has several different DDR sizes, such as 2G, 4G, 8G.
 
  $ free -h
 
  $ free -h
 
               total        used        free      shared  buff/cache  available
 
               total        used        free      shared  buff/cache  available
 
  Mem:          '''7.4Gi'''        72Mi      7.1Gi        16Mi      182Mi      7.2Gi  
 
  Mem:          '''7.4Gi'''        72Mi      7.1Gi        16Mi      182Mi      7.2Gi  
 
  Swap:            0B          0B          0B
 
  Swap:            0B          0B          0B
For example, the DDR memory on this board is 8G.
 
=== Storage device ===
 
  
 +
For example, the size of DDR on this board is 8G.
 +
 +
=== Storage device ===
 
* eMMC: /dev/mmcblk0
 
* eMMC: /dev/mmcblk0
 
* uSD Card: /dev/mmcblk1
 
* uSD Card: /dev/mmcblk1
Line 106: Line 108:
 
=== Test RTC Device ===
 
=== Test RTC Device ===
 
First, plug in RTC battery and power on.Check the rtc device:
 
First, plug in RTC battery and power on.Check the rtc device:
  root@linaro-alip:~# dmesg | grep rtc
+
  root@rock3a:~# dmesg | grep rtc
[    0.328780] [drm] Cannot find any crtc or sizes
+
[    0.328964] [drm] Cannot find any crtc or sizes
+
 
  [    0.749597] rk808-rtc rk808-rtc: registered as rtc0
 
  [    0.749597] rk808-rtc rk808-rtc: registered as rtc0
 
  [    0.751404] rk808-rtc rk808-rtc: setting system clock to 2017-08-04 09:00:02 UTC (1501837202)
 
  [    0.751404] rk808-rtc rk808-rtc: setting system clock to 2017-08-04 09:00:02 UTC (1501837202)
Line 116: Line 116:
 
  $ hwclock -w
 
  $ hwclock -w
 
  $ hwclock -r
 
  $ hwclock -r
  root@linaro-alip:~# hwclock -r
+
  root@rock3a:~# hwclock -r
 
  2021-08-17 20:00:04.745124+00:00
 
  2021-08-17 20:00:04.745124+00:00
 
  $ poweroff
 
  $ poweroff
Line 122: Line 122:
 
Third, back to power after 10 mins and check whether the rtc clock run the same time
 
Third, back to power after 10 mins and check whether the rtc clock run the same time
 
  $ hwclock -r
 
  $ hwclock -r
  root@linaro-alip:~# hwclock -r
+
  root@rock3a:~# hwclock -r
 
  2021-08-17 20:10:14.745124+00:00
 
  2021-08-17 20:10:14.745124+00:00
  
Line 129: Line 129:
 
  $ aplay -D plughw:1,0 test.wav
 
  $ aplay -D plughw:1,0 test.wav
 
   
 
   
  root@linaro-alip:~# aplay -D plughw:1,0 6.wav  
+
  root@rock3a:~# aplay -D plughw:1,0 6.wav  
 
  xcb_connection_has_error() returned true  
 
  xcb_connection_has_error() returned true  
 
  Playing WAVE '6.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
 
  Playing WAVE '6.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Revision as of 07:15, 24 August 2021

    ROCK 3 >  Debian

Work with ROCK 3 Debian

Introduction to ROCK 3 Debian

ROCK 3 Debian is an easy to use desktop system. While working with ROCK 3 Debian, you will find it do well on playing music, Internet, Bluetooth, AI and so on.

ROCK 3 Debian uses systemd to manage system.

Command prepended by $ means the command may be executed by an unprivileged user. And command prepended by # means the command may be executed by an privileged user. But the symbol, $ or #, is not part of the command.

Access from the Host PC/Laptop

Option 1: Serial console

Check Serial Console

Option 2: SSH

SSH server is enabled on port 22 of ROCK 3 default image.

Please use angryip to find your board IP address.

$ ping ip-of-device
$ ssh rock@ip-of-device

Debian Default User Account

Non-root User:

User Name : rock
Password  : rock

Desktop

The preinstalled Desktop is xfce4.

Install and update necessary packages

Add Radxa APT, see Radxa APT.

Install packages;

$ sudo apt-get update
$ sudo apt-get install -y rockchip-overlay
$ sudo apt-get install -y linux-4.4-rock-3-latest

Network Connection

There are two methods for network connection. One is Ethernet and the other is WIFI.

Ethernet Connection

You can use a network cable (one end connected to the external network port or route) to connect your ROCK 3 to the network. The ROCK 3 will automatically configure the network for your surfing on the Internet.

To test the Ethernet, we need to follow the steps:
  • Switch to super user mode by command
$ sudo su
  • Check whether the Ethernet is normal by command, ifconfig, which would show us a network card, eth0, and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.
$ ifconfig
$ ping www.baidu.com
  • If failed to connect to a normal domain. , try
$ sudo dhclient eth0

WIFI Connection

When there is not a network cable for your ROCK 3 the WIFI connection is another good choice. ROCK Pi N10 supports 2.4G/5G WIFI and WIFI 6 wireless network.

To test the WIFI performance, we need to follow the steps:
  • Switch to super user mode
$ sudo su
  • Open the WIFI
$ nmcli r wifi on
  • Scan WIFI
$ nmcli dev wifi
  • Connect to WIFI network
$ nmcli dev wifi connect "wifi_name" password "wifi_password"
  • Test WIFI perpormance by tool iperf.

Check DDR size

ROCK 3 has several different DDR sizes, such as 2G, 4G, 8G.

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7.4Gi        72Mi       7.1Gi        16Mi       182Mi       7.2Gi 
Swap:            0B          0B          0B

For example, the size of DDR on this board is 8G.

Storage device

  • eMMC: /dev/mmcblk0
  • uSD Card: /dev/mmcblk1
  • NVME M.2 SDD: /dev/nvme0n1

Test RTC Device

First, plug in RTC battery and power on.Check the rtc device:

root@rock3a:~# dmesg | grep rtc
[    0.749597] rk808-rtc rk808-rtc: registered as rtc0
[    0.751404] rk808-rtc rk808-rtc: setting system clock to 2017-08-04 09:00:02 UTC (1501837202)

Second, use the follow commands to set the system time and synchronization to the rtc clock.

$ date -s "2021-08-17 20:03:00"
$ hwclock -w
$ hwclock -r
root@rock3a:~# hwclock -r
2021-08-17 20:00:04.745124+00:00
$ poweroff

and then disconnect the power supply Third, back to power after 10 mins and check whether the rtc clock run the same time

$ hwclock -r
root@rock3a:~# hwclock -r
2021-08-17 20:10:14.745124+00:00

Test Audio Player

Download a wav audio file, and use the command to test.

$ aplay -D plughw:1,0 test.wav

root@rock3a:~# aplay -D plughw:1,0 6.wav 
xcb_connection_has_error() returned true 
Playing WAVE '6.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Test USB Host

Plug in the U dish and use the command by serial console.

$ dmesg | tail
[  133.773558] usb 2-1: SerialNumber: CCYYB18M1CFKO4H4
[  133.774332] usb-storage 2-1:1.0: USB Mass Storage device detected
[  133.774657] scsi host0: usb-storage 2-1:1.0
[  134.841096] scsi 0:0:0:0: Direct-Access     aigo     U350             1100 PQ: 0 ANSI: 6
[  134.846394] sd 0:0:0:0: [sda] 30720000 512-byte logical blocks: (15.7 GB/14.6 GiB)
[  134.847554] sd 0:0:0:0: [sda] Write Protect is off
[  134.847635] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  134.848824] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  134.858173]  sda: sda1
[  134.861161] sd 0:0:0:0: [sda] Attached SCSI removable disk
$ sudo mount /dev/sda1 /mnt
$ lsblk
root@linaro-alip:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    1 14.7G  0 disk 
└─sda1         8:1    1 14.7G  0 part /mnt

If /dev/sda1 is successfully mounted, this usb host is working properly.