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

Difference between revisions of "RockpiE/OpenWRT"

(openwrt_update)
(ROCK Pi E OpenWRT)
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
 
     # opkg list-installed | grep "htop"
 
     # opkg list-installed | grep "htop"
  
 +
== Using external storage devices ==
 +
 +
    # opkg update
 +
    # opkg install usbutils kmod-usb-storage-uas
  
 
== Network Connection ==
 
== Network Connection ==
Line 46: Line 50:
 
To test the Ethernet, we need to follow the steps:
 
To test the Ethernet, we need to follow the steps:
  
* Plug in WAN ethernet to eth0 (100M) port
+
* Plugin WAN ethernet to eth0 (100M) port
* Plug in LAN ethernet to eth1 (1000M port)
+
* Plugin LAN ethernet to eth1 (1000M port)
  
After connection is established, the LAN client should get an IP in the network 192.168.1.0/24.
+
After a connection is established, the LAN client should get an IP in the network 192.168.1.0/24.
  
 
Use any SSH client to ssh into the ROCK Pi E.
 
Use any SSH client to ssh into the ROCK Pi E.
Line 59: Line 63:
  
 
     # ifconfig
 
     # ifconfig
   
 
 
     # ping www.baidu.com
 
     # ping www.baidu.com
  
Line 73: Line 76:
  
 
== Web Interface==
 
== Web Interface==
OpenWrt provides an web-interface for the easy of configuration.
+
OpenWrt provides a web-interface for the easy of configuration.
  
 
Follow these steps to open the web-interface:
 
Follow these steps to open the web-interface:
Line 79: Line 82:
 
* Connect client to LAN port
 
* Connect client to LAN port
 
* Open 192.168.1.1 with any browser
 
* Open 192.168.1.1 with any browser
* Login with the root password (default: empty)
+
* Login with root user and password (default: empty)
  
 
=== Wireless Access-Point in web-interface ===
 
=== Wireless Access-Point in web-interface ===
Line 85: Line 88:
 
'''1.''' Connect to the web-interface at '''http://192.168.1.1''', and login with your “root” password
 
'''1.''' Connect to the web-interface at '''http://192.168.1.1''', and login with your “root” password
  
'''2.''' Go to Network → Wireless. This page lists a separate Wi-Fi configuration section for each of your physical radios, (many devices you may have, will have one radio for 2.4 GHz and a second one for 5 GHz).
+
'''2.''' Go to Network → Wireless. This page lists a separate Wi-Fi configuration section for each of your physical radios, (many devices you may have, will have one radio for 2.4 GHz, and a second one for 5 GHz).
  
 
'''3.''' For each of your radios, you can create a Wi-Fi network by clicking Add:
 
'''3.''' For each of your radios, you can create a Wi-Fi network by clicking Add:
Line 104: Line 107:
  
 
=== I2C ===
 
=== I2C ===
 +
 
To enable I2C, follow the following steps:
 
To enable I2C, follow the following steps:
  
Line 109: Line 113:
 
    
 
    
 
2. Access OpenWrt console via SSH  
 
2. Access OpenWrt console via SSH  
 
+
 
+
 
     ssh root@192.168.1.1
 
     ssh root@192.168.1.1
 
  
 
3. Execute  
 
3. Execute  
Line 147: Line 149:
 
      
 
      
 
     opkg install kmod-usb-storage kmod-fs-vfat luci-app-samba4
 
     opkg install kmod-usb-storage kmod-fs-vfat luci-app-samba4
 +
 
Web interface
 
Web interface
  
Line 180: Line 183:
  
 
=== Selecting web-interface in menuconfig ===
 
=== Selecting web-interface in menuconfig ===
For installing web-interface in openwrt during compilation, select the packages in menuconfig
+
For installing web-interface in OpenWrt during compilation, select the packages in menuconfig
  
 
     LuCi > Collection > luci
 
     LuCi > Collection > luci
 
=== Selecting i2c in menuconfig===
 
=== Selecting i2c in menuconfig===
For using i2c in openwrt during compilation, select the packages in menuconfig
+
For using i2c in OpenWrt during compilation, select the packages in menuconfig
  
 
     Kernel Modules > kmod-i2c-core
 
     Kernel Modules > kmod-i2c-core
Line 195: Line 198:
  
 
=== Selecting python in menuconfig===
 
=== Selecting python in menuconfig===
For installing python in openwrt during compilation, select the packages in menuconfig
+
For installing python in OpenWrt during compilation, select the packages in menuconfig
  
 
     Languages > Python > python
 
     Languages > Python > python
Line 208: Line 211:
  
 
* Updated to latest master
 
* Updated to latest master
* Boost upto 1.5GHz
+
* Boost up to 1.5GHz
* Seperate feed repository
+
* Separate feed repository
 
* opkg install support
 
* opkg install support

Latest revision as of 06:48, 25 August 2020

    ROCK Pi E >  OpenWRT


ROCK Pi E OpenWRT

Introduction to ROCK Pi E OpenWrt

The OpenWrt Project is a Linux operating system targeting embedded devices. It is primarily used on embedded devices to route network traffic. OpenWrt provides a fully writable filesystem with package management.

OpenWrt Default User Account

Root User:

   User Name: root
   Password: NULL(empty)

Install and update necessary packages

Install packages;

   # opkg update
   # opkg install htop

List Install packages;

   # opkg list-installed
   # opkg list-installed | grep "htop"

Using external storage devices

   # opkg update
   # opkg install usbutils kmod-usb-storage-uas

Network Connection

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

Ethernet Connection

ROCK Pi E provides dual ethernets. This makes it perfect as a router.

  • eth1(1000M) -> LAN
  • eth0(100M) -> WAN

You will need two network cables at the same time to connect your ROCK Pi E to the network and the LAN client to access it. The ROCK Pi E will automatically configure the network for the LAN clients.

To test the Ethernet, we need to follow the steps:

  • Plugin WAN ethernet to eth0 (100M) port
  • Plugin LAN ethernet to eth1 (1000M port)

After a connection is established, the LAN client should get an IP in the network 192.168.1.0/24.

Use any SSH client to ssh into the ROCK Pi E.

   ssh root@192.168.1.1


Check whether the internet connection is functioning by command, ifconfig, which would show us three interfaces, br-lan, eth0 and eth1, and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.

   # ifconfig
   # ping www.baidu.com

Wireless Connection

Configure Wireless using OpenWrt Web-interface.

VLAN

OpenWrt supports 802.1Q VLAN.

Usage Example:

  • For tagged traffic on VLAN100 on eth0 interface, use eth0.100
  • For untagged traffic, use eth0

Web Interface

OpenWrt provides a web-interface for the easy of configuration.

Follow these steps to open the web-interface:

  • Connect client to LAN port
  • Open 192.168.1.1 with any browser
  • Login with root user and password (default: empty)

Wireless Access-Point in web-interface

1. Connect to the web-interface at http://192.168.1.1, and login with your “root” password

2. Go to Network → Wireless. This page lists a separate Wi-Fi configuration section for each of your physical radios, (many devices you may have, will have one radio for 2.4 GHz, and a second one for 5 GHz).

3. For each of your radios, you can create a Wi-Fi network by clicking Add:

3.1. On the first Wi-Fi network that you configure, go to the Device Configuration and open the tab Advanced Settings: in the Country Code field, select the correct county code, where your OpenWrt device is installed. This is important to ensure your OpenWrt device meets the legal regulations in your country. (all other configured radios will use the same device settings)

3.2. For each Wi-Fi network, in the “Interface Configuration” section, configure your Wi-Fi settings:

  • In the tab General Setup, enter an ESSID to become the name of your Wi-Fi network
  • In the tab Wireless Security, select an Encryption method (e.g. “WPA2-PSK”, recommended for home/small office networks)
  • In the tab Wireless Security, select a Cipher (e.g. “auto” is recommended)
  • In the tab Wireless Security, enter a Key, a secret phrase which clients must use to connect to your Wi-Fi network. NB: With WPA2-PSK, the Key must be at least eight (8) characters.
  • If needed, configure further settings according to your needs. Other default settings ordinarily correct for general usage.

4. Click Save & Apply when done.

Common Hardware Interfaces, I2C, SPI, UART, etc

I2C

To enable I2C, follow the following steps:

1. Compile OpenWrt with i2c support

2. Access OpenWrt console via SSH

   ssh root@192.168.1.1

3. Execute

   i2cdetect 0

4. Check I2C address

WARNING! This program can confuse your I2C bus,
cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? Y/n
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          XX XX XX XX XX XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX 48 XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX

UART

The debugger console baud rate options: 1500000n8.

Installing packages with opkg

Installing SAMBA Network Shares

Command Line interface

   opkg update
   
   opkg install kmod-usb-storage kmod-fs-vfat luci-app-samba4

Web interface

   1. System > Software
   
   2. Update Lists
   
   3. Search and Install

Compiling from sources

Compiling OpenWrt for ROCK Pi E

   1. git clone --depth 1 https://github.com/jayanta525/rock-pi-e.git openwrt/
   
   2. cd openwrt/
   
   3. ./scripts/feeds update -a
   
   4. ./scripts/feeds install -a
   
   5. make menuconfig 			#select device and required packages here
     
   6. make -j$(nproc)

Selecting device in menuconfig

   Target System > Rockchip
   
   Subtarget > RK33xx boards (64 bit)
   
   Target Profile > Radxa Rock Pi E

Selecting web-interface in menuconfig

For installing web-interface in OpenWrt during compilation, select the packages in menuconfig

   LuCi > Collection > luci

Selecting i2c in menuconfig

For using i2c in OpenWrt during compilation, select the packages in menuconfig

   Kernel Modules > kmod-i2c-core
   
   Kernel Modules > kmod-i2c-gpio
   
   Kernel Modules > kmod-i2c-gpio-custom
   
   Utilities > i2c-tools

Selecting python in menuconfig

For installing python in OpenWrt during compilation, select the packages in menuconfig

   Languages > Python > python
   
   Languages > Python > python-dev

Changelog

2020.07.28

[download https://jayanta525.gitlab.io/openwrt-rockpie/]

  • Updated to latest master
  • Boost up to 1.5GHz
  • Separate feed repository
  • opkg install support