Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
To compile OpenWrt, you need to compile it in the Linux environment. You can use the VM virtual machine to realize the compilation. At the same time, you need to be able to access the Internet, otherwise, the basic compilation will fail. Here I use the 20.04.1-Ubuntu (Ubuntu self-installation) environment to operate.
1. To update the software list, run the command line in the terminal:
sudo apt-get -y update
2. Update software to run:
sudo apt-get -y upgrade
3. Install compiling environment dependencies:
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget swig rsync
#create folder mkdir openwrt #Give folder permissions, if you don't add permissions, you will get an error: how to enter the directory sudo chmod 777 openwrt cd openwrt #download source code git clone https://git.openwrt.org/openwrt/openwrt.git #Enter the corresponding directory again cd openwrt cd openwrt #update source ./scripts/feeds update -a #Install ./scripts/feeds install -a #Function configuration editing make menuconfig
Normally, the following configuration interface will be entered (the operation is relatively simple, you can use the direction key and Enter to control):
Enter the LUCI configuration interface and enable the web management function.
LuCI--->1.Collections--->luci
-*- kmod-usb-core
<*> kmod-usb-hid
-*- kmod-usb-net
<*> kmod-usb-net-rtl8152
-*- kmod-usb2
<*> kmod-usb2-pci
<*> kmod-usb3
Then select exit, return to the previous layer, and then click Exit.
make -j8 download V=s && make -j1 V=s
It is recommended to execute it before going to bed at night as the waiting time will be very long.
Find the successfully compiled system in the directory "~/openwrt/openwrt/bin/targets/bcm27xx/bcm2711". You can copy the system to Windows to program (or directly on your ubuntu) to CM4 or program to SD card.
vi /etc/config/network
After modification, please restart it.
After restarting, you can see that the IP of our computer jumps to the same segment as the IP set.
The browser can log in through the management address. The management IP has just been changed here. If it has not been changed, it is still 192.168.1.1 (how many IPs have been modified before, and how many IPs are entered in the browser), and directly choose to log in (password: root).
The login interface is as follows:
According to the displayed situation, we fill in the local IP of the wan port, the gateway points to the next IP address, which is the IP address given by your optical modem, then enter the advanced settings to set DNS, and then select Save.
After returning, you need to click Save and Apply to take effect.
Test Network - Diagnose Network - Use network tools to see if you can access the Internet normally. Then we test the PC terminal networking situation.
If the test results are as above, it means that your network setup is complete.
Click Network-->Interface-->Device Configure br-lan
Select ETH2 ETH3 ETH4 in the bridge port as shown in the figure below, then click save, return to the previous layer, click save and apply, and finally click the interface column to see that the br-lan device has 4 ports.
After we connect a device to the ETH4 port, we can check that there are two devices in the arp table to test whether ETH4 can communicate with the ETH0 device normally.
cd /lib/firmware/brcm/ ls cp brcmfmac43455-sdio.raspberrypi,4-model-b.txt brcmfmac43455-sdio.raspberrypi,4-compute-module.txt # restart after execution reboot
After restarting, please log in to the web management interface, you can see more wireless options in the network drop-down menu. Please click to enter the wireless settings.
After entering we enable the wireless function.
After startup, you can see that the default channel of the radio is 36 channels of the 5G frequency band. It is possible that our wireless terminal equipment may not be able to search for the changed SSID. Select the following to edit the SSID to enter the device configuration.
Modify the working frequency as follows. You can also modify the SSID name and working mode in the interface configuration.
By default, the SSID is open and no password is set. You can enter the wireless security to set the password.
Finally, don't forget to click Save in the lower right corner. Remember to save and apply after returning. If there is no problem with the settings, you can search for the corresponding SSID signal on your wireless device.
After the mobile phone can search for the corresponding signal connection, you can see the connected device in the wireless.