How to Transform Raspberry Pi 3+ into a Powerful Router

Last Issue Review:

Playing with Raspberry Pi 3+ a trial run

Playing with Raspberry Pi 3+ to succeed, one must first sharpen their tools

Playing with Raspberry Pi 3+ Bluetooth configuration and evaluation

Playing with Raspberry Pi 3+ painful experience with Win 10 IoT

Playing with Raspberry Pi 3+ turning it into a portable WiFi

Previously, we implemented the portable WiFi function based on bridge mode, now I will use another method to achieve this, using OpenWrt to build a more powerful wireless router.

I referred to the operation process of this article on the internet https://my.oschina.net/wangandi/blog/687389, but some steps in this article have issues that can lead to failure, I will identify and solve these problems.

First, we need to download the OpenWrt image. OpenWrt does not yet support Pi 3, so we need to download the LEDE image. LEDE is a branch of OpenWrt, as introduced on its official website (https://www.lede-project.org/).

The LEDE project is a Linux based embedded meta distribution based on OpenWrt targeting a wide range of wireless SOHO routers and non-network devices.

LEDE spun away from the mother project in May 2016, aims for an open governance model and attempts to simplify contributions to encourage new developers in embedded development.

LEDE, or Linux Embedded Development Environment, is a branch of OpenWrt, but the operation method is exactly the same, integrating adbyby, shadow-socks, redsocks2, chinadns, shadowvpn, PPTP VPN server, etc.

1. Download the image that supports Raspberry Pi 3

How to Transform Raspberry Pi 3+ into a Powerful Router

Download link:

https://downloads.lede-project.org/snapshots/targets/brcm2708/bcm2710/lede-brcm2708-bcm2710-rpi-3-ext4-sdcard.img

2. Burn the image to the SD card. Originally planned to use the dd command on Ubuntu to burn, but VirtualBox cannot mount the SD card to the virtual machine OS, I tried to solve this but gave up. Instead, I used Win32DiskImager on Windows to burn to the SD card.

How to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful Router

3. Insert the SD card into the Raspberry Pi and power it on.

How to Transform Raspberry Pi 3+ into a Powerful Router

4. After starting the Raspberry Pi, set a password for root, then edit the /etc/config/network file. OpenWrt will set the Pi’s built-in network card IP address to 192.168.1.1, which conflicts with the main router’s address, so change the default IP to 192.168.1.11, set the gateway to the upper router IP: 192.168.1.1, and set DNS to 114.114.114.114.

config interface ‘loopback’

option ifname ‘lo’

option proto ‘static’

option ipaddr ‘127.0.0.1’

option netmask ‘255.0.0.0’

config globals ‘globals’

option ula_prefix ‘fdf5:21a2:7ab9::/48’

config interface ‘lan’

option type ‘bridge’

option ifname ‘eth0’

option proto ‘static’

option ipaddr ‘192.168.1.11’

option netmask ‘255.255.255.0’

option ip6assign ’60’

option gateway ‘192.168.1.1’

option dns ‘114.114.114.114’

config interface ‘wan’

option proto ‘dhcp’

option ifname ‘eth0’

5. Modify /etc/config/wireless, this step needs attention, many articles online modify /etc/wireless causing incorrect configuration. Mainly set ssid ‘openwrt_raspberry_pi3’, password key ‘testopenwrt’.

config wifi-device ‘radio0’

option type mac80211

option channel ’11’

option hwmode ’11g’

option path ‘platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1’

option htmode ‘HT20’

option disabled ‘0’

config wifi-iface ‘default_radio0’

option device ‘radio0’

option network ‘lan’

option mode ‘ap’

option ssid ‘openwrt_raspberry_pi3’

option encryption ‘psk2’

option key ‘testopenwrt’

How to Transform Raspberry Pi 3+ into a Powerful Router

6. Install luci software, then you can access the router via browser. A very important step in this process is: open the router’s Linux terminal and enter the command “opkg update”, to start downloading Packages.gz and updating. If this step is not executed, it will result in Cannot install, Unknown package ‘luci’.

How to Transform Raspberry Pi 3+ into a Powerful Router

Enter the command “opkg install luci” to install luci software, it will automatically download the associated libraries and install and configure them automatically, we just need to wait for the installation completion prompt: Configuring luci.

Enter the command “/etc/init.d/uhttpd enable” and press enter to start the uhttpd service.

Enter the command “/etc/init.d/uhttpd start” and press enter to start uhttpd.

How to Transform Raspberry Pi 3+ into a Powerful Router

7. Modify /etc/config/firewall, add a rule at the end of the file to allow SSH connections through WAN.

# open ssh on wan interface

config rule

option src wan

option dest_port 22

option target ACCEPT

option proto tcp

Use Putty to log in to the Raspberry Pi, and you will see the BusyBox startup interface.

How to Transform Raspberry Pi 3+ into a Powerful Router

Open the mobile WiFi, search for openwrt_raspberry_pi3, and enter the password to connect to AP openwrt_raspberry_pi3.

How to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful Router

After a successful connection, check the IP information.

How to Transform Raspberry Pi 3+ into a Powerful Router

After connecting to WiFi, use the mobile browser to visit EEworld forum.

How to Transform Raspberry Pi 3+ into a Powerful Router

In the terminal, use the command ifconfig to check the local network information. The local IP is 192.168.1.11.

How to Transform Raspberry Pi 3+ into a Powerful Router

In the browser on the computer, enter “192.168.1.11” to access the router configuration interface, entering the root account and password.

How to Transform Raspberry Pi 3+ into a Powerful Router

The router homepage is quite similar to the general router homepage information.

How to Transform Raspberry Pi 3+ into a Powerful Router

The wireless statistics page can provide the running status of the WiFi and connected devices.

How to Transform Raspberry Pi 3+ into a Powerful Router

Welcome to click to read the original text and communicate with the author.

Follow EEWORLD (Electronic Engineering World) WeChat public account: reply “contribution”, your original work will have the opportunity to appear in our WeChat push.

To communicate with more industry peers, please click to read the original text to log into EEWORLD forum.

How to Transform Raspberry Pi 3+ into a Powerful Router

WeChat ID: EEWORLD Forum Activities E at your fingertips

How to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful Router

How to Transform Raspberry Pi 3+ into a Powerful Router

Follow EEWORLD service account EE benefits at your fingertips

How to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful Router

How to Transform Raspberry Pi 3+ into a Powerful Router

WeChat ID: EEXINRUI Chip Information Sharp Interpretation

How to Transform Raspberry Pi 3+ into a Powerful RouterHow to Transform Raspberry Pi 3+ into a Powerful Router

Leave a Comment

×