Getting Started with BPI-R3 MINI
Contents
Introduction
Banana Pi BPI-R3 Mini Router board with MediaTek MT7986A(Filogic 830) quad core ARM A53 chip design ,2G DDR RAM ,8G eMMC flash onboard,It is a very high performance open source router development board,support Wi-Fi6 2.4G/5G with MT7976C, support 2x 2.5GbE ethernet port.
MediaTek MT7986(Filogic 830)
The MT7986(Filogic 830) integrates four Arm Cortex-A53 cores up to 2GHz with up to 18,000 DMIPs of processing power and 6Gbps of dual 4x4 Wi-Fi6 connectivity. It has two 2.5g Ethernet interfaces and serial peripheral interfaces (SPI). Filogic 830‘s built-in hardware acceleration engine enables fast and reliable Wi-Fi offloading and wireless network connection. In addition, the chip supports Mediatek FastPath™ technology, which is suitable for games, AR/VR and other low-latency applications.
Wi-fi 6 has many advantages over its predecessors, including lower latency, larger bandwidth capacity and faster transmission rates. Wireless network devices supporting the 6GHz band mainly use 160MHz wide channel and 6GHz uncongested bandwidth to provide multigigabit transmission and low-latency wi-fi connection, providing reliable wireless network for streaming media, games, AR/VR and other applications.
Key Features
- MediaTek MT7986A(Filogic 830) Quad core ARM Cortex A53
- Wifi 6 2.4G/5G(MT7976C)
- 2G DDR RAM
- 8G eMMC flash
- 128MB Nand flash
- 2x 2.5GbE Ethernet port
- 1x M.2 Key B USB inerface
- 1x M.2 KEY M PCIe inerface
- 1x USB2.0 interface
Development
Basic Development
Prepare to develop
* Prepare USB-Serial interface * Using your USB-Serial Connect debug console on BPI-R3 MINI Note: Debug Uart 3.3v TTL
*R3 boot switch Jumper Setting Note: EMMC Boot or Nand boot Support.
Warnning
Note: Because BPI-R3 MINI can't support that it boot from SD, So the factory will flash one default image into Nand and EMMC Device. if you want to update EMMC device, please boot from Nand, otherwise you update Nand device when it boot from EMMC. Anytime please confirm that one EMMC or Nand device include one bootable image, it's very important.
How to burn image to onboard eMMC
Note: when you want to Update EMMC device, Firstly Change boot switch to boot from Nand device, then after boot up,you need flash one emmc image into EMMC device. Finally you change bootstrap to boot from EMMC.
Before burning image to eMMC, please prepare a USB disk. Let's take OpenWrt image (mtk-bpi-r3mini-EMMC-20230719.img, bl2_emmc.img) for example, the steps are below:
1. Copy EMMC boot OpenWrt image(mtk-bpi-r3mini-EMMC-20230719.img, bl2_emmc.img) to USB disk. 2. Change boot switch Jumper, the board boot from Nand device, then power up the board. 3. Plug in USB disk to the board, and mount the USB to /mnt or other directory as follows: (you can skip mounting if it is mounted automatically) * mount -t vfat /dev/sda1 /mnt * change your directory to the mounting point, here is : cd /mnt
4. Execute following command to enable and copy image to EMMC device: * echo 0 > /sys/block/mmcblk0boot0/force_ro * dd if=bl2_emmc.img of=/dev/mmcblk0boot0 * dd if=mtk-bpi-r3mini-EMMC-20230719.img of=/dev/mmcblk0 * mmc bootpart enable 1 1 /dev/mmcblk0
5. power off R3MINI board, remove u-disk driver, change bootstrap to boot from emmc device. Note: Enable EMMC device, boot strap is from EMMC.
How to burn image to onboard Nand
Note: when you want to Update Nand device, Firstly Change boot switch to boot from EMMC device, then after boot up,you need flash one nand image into nand device. Finally you change bootstrap to boot from Nand device.
Before burning image into Nand, please prepare a USB disk. Let's take OpenWrt image (mtk-bpi-r3mini-NAND-20230719-single-image.bin) for example, the steps are below:
1. Copy Nand boot OpenWrt image(mtk-bpi-r3mini-NAND-20230719-single-image.bin) to USB disk. 2. Change boot switch Jumper, the board boot from EMMC device, then power up the board. 3. Plug in USB disk to the board, and mount the USB to /mnt or other directory as follows: (you can skip mounting if it is mounted automatically) * mount -t vfat /dev/sda1 /mnt * change your directory to the mounting point, here is : cd /mnt
4. Execute following command to erase the whole Nand flash and copy image to nand device: * mtd erase /dev/mtd0 * dd if=mtk-bpi-r3mini-NAND-20230719-single-image.bin of=/dev/mtdblock0
5. power off BPI-R3 MINI board, remove u-disk driver, change bootstrap to boot from Nand device. Note: Enable Nand device, boot strap is from Nand.
Network-Configuration
- Network-Configuration refer to: http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:network:start
- Network Interface: eth1 is for WAN; eth0, rax0, ra0 is for LAN, ra0 is for 2.4G wireless, rax0 is for 5G wireless.
root@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr EE:A1:57:81:CA:19
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link inet6 addr: fd63:8bea:d5ce::1/60 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:2418 (2.3 KiB)
br-wan Link encap:Ethernet HWaddr EE:A1:57:81:CA:19
inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:8538 (8.3 KiB)
eth0 Link encap:Ethernet HWaddr EE:A1:57:81:CA:19
inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:4408 (4.3 KiB) Interrupt:124
eth1 Link encap:Ethernet HWaddr 4A:BB:84:B4:5D:3F
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:8674 (8.4 KiB) Interrupt:124
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:56 errors:0 dropped:0 overruns:0 frame:0 TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4368 (4.2 KiB) TX bytes:4368 (4.2 KiB)
ra0 Link encap:Ethernet HWaddr 00:0C:43:26:60:38
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:6
rax0 Link encap:Ethernet HWaddr 02:0C:43:36:60:38
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@OpenWrt:/# brctl show br-wan
bridge name bridge id STP enabled interfaces br-wan 7fff.eea15781ca19 no eth1
root@OpenWrt:/# brctl show br-lan
bridge name bridge id STP enabled interfaces br-lan 7fff.eea15781ca19 no eth0, rax0, ra0, apclix0, apcli0
root@OpenWrt:/#
Advanced Development
GPIO Control
- echo xxx > /sys/class/gpio/export
- echo in/out > /sys/class/gpio/gpioxxx/direction
- echo 0/1 > /sys/class/gpio/gpioxxx/value
Check the base gpio, you could see mine is 411
For example: if you want to change gpio 22 as out highlevel, you need input commands like this:
- echo 433(22+411) > /sys/class/gpio/export
- echo out > /sys/class/gpio/gpio433/direction
- echo 1 > /sys/class/gpio/gpio433/value
FAN
- CN16 supports PWM control.
PWM FAN Control
- echo 0 > /sys/class/pwm/pwmchip0/export
- echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period
- echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
- echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity
- echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
M.2 KEY B slot
currently, M.2 KEY B slot only support USB 4G/5G module, example: Quectel RM500U when you insert one 4G/5G module, you may check it.
4G/5G Module
- BPI-R3 supports 4G LTE EC25, 5G Quectel RM500U-CN Series
Note: The availability of 4G/5G depends on the local carrier frequency band.
Ap mode on BPI-R3
- ra0 is MT7986a 2.4G wifi
- rax0 is MT7986a 5G wifi
Wifi & Serial cable
- If the chip type of serial cable is pl2303, the driver fails to load the firmware apparently and thus the wifi can't work.
- Other types including cp2102,ch340 and FDTI are all available, serial cable vlotage must be 3.3v LVTTL standard.
FAQ
- MT7986a Reference Manual for Develope Board(BPi)
TTL Voltage
- The debug-uart TTL is tolerant to 3.3V.