4001 R3S/R3S LTS 4G EN

来自Mcuzone Wiki

切换语言为中文

Keywords

FriendlyElec NanoPi R3S, FriendlyElec NanoPi R3S LTS, RK3566, 4G LTE, FriendlyWrt, OpenWrt, Ubuntu

I. Introduction

The 4G module for the R3S is a 4G LTE kit designed specifically for the FriendlyElec NanoPi R3S development board. It is based on our CM4 4G mini module, which we have designed a 4G carrier board along with a matching 3D-printed base to compose the set. The 3D printed base is designed to replace the R3S enclosure base and incorporates an integrated 4G antenna. The 4G module is supported driver-free by the Friendlywrt and Ubuntu, with auto-identification and no need for additional driver installation.

4001_Friendly_NanoPi_R3S_131.jpg

Module NL668-EU

(soc from Qualcomm)

NL668-EAU

(soc from Qualcomm)

NL668-AM

(soc from Qualcomm)

Qualcomm 4G
BAND • LTE FDD: B 1/3/5/7/8/20

• LTE TDD: B 38/40/41

• WCDMA: B 1/5/8

• GSM/GPRS/EDGE: 850/900/1800MHz

• LTE FDD: B 1/3/5/7/8/20/28

• LTE TDD: B 38/40/41

• WCDMA: B 1/5/8

• GSM/GPRS/EDGE: 850/900/1800MHz

• LTE FDD: B2/4/5/12/13/17/66/71

• WCDMA: B2/4/5

• LTE FDD: B1/3/5/8

• LTE TDD: B34/38/39/40/41

• WCDMA: B 1/8

• EVDO/CDMA1X: BC0

• GSM/GPRS/EDGE: 900/1800MHz

II. Work with FriendlyWrt

R3S: The version of the FriendlyWrt we tested: rk3566-sd-friendlywrt-23.05-20240826.img.gz

R3S LTS: The version of the FriendlyWrt we tested: rk3566-sd-friendlywrt-24.10-20250625.img.gz

The 4G module is used as a WAN port in the FriendlyWrt. Connect the R3S's LAN port to the PC's network port. Open a web browser on the PC and navigate to 192.168.2.1 to log in to the FriendlyWrt backend page (the default username is root and the password is password).

2.1 Test 4G module

Navigate to "Services - Terminal", log in to the terminal with the default username: root and password: password:

Execute ip addr, and the result is as follows:

You can see usb0, which is Qualcomm 4G, NL668-EU/EAU/AM. This indicates that the OS has recognized the 4G module, but it has not yet obtained an IP address.Afterwards, we set 4G as WAN. The steps are as follows:

Navigate to "Network - Interfaces", and click on "Add new interface...":

Configure as shown in the figure below (the "Name" can be customized), select "usb0" for the "Device", and then click "Create interface":

Click on "Firewall Settings", in the "Create / Assign firewall-zone" section, select "wan", and then click "Save":

It automatically returns to the "Interfaces" page, then click "Save and Apply":

Wait for a moment, and we can see that the 4G module has obtained an IP address:

Back in the terminal, execute ifconfig usb0 to check the network parameters of the 4G module:

4001_Friendly_NanoPi_R3S_42.jpg

A successful ping to the domain indicates that the 4G module is now able to browse the internet normally:

4001_Friendly_NanoPi_R3S_43.jpg

4G Module internet speed test:

4001_Friendly_NanoPi_R3S_02.jpg

Note: Network speed testing is affected by the network environment and the testing method. The speed provided here is for reference only, please refer to the actual speed for accurate information.

2.2 with an external USB Ethernet adapter

The R3S comes equipped with two Ethernet ports. If a third Ethernet port is required, it can be added through the USB 3.0 port; however, this will disable the 4G functionality. We have tested that the R3S supports USB Ethernet adapters with the RTL8153 chipset, which can be used as a second LAN port. The procedure is as follows:

Do not connect the USB Ethernet adapter first, let the OS boot up normally and log in to the backend page.

Insert the USB Ethernet adapter, wait for a moment, and then run ifconfig -a in the terminal. Once eth2 appears in the output, it is ready:

Then navigate to "Network - Interfaces - Devices", and click "Configure..." behind "br-lan":

Click the arrow next to "Bridge ports", select both eth1 and eth2, and then click "Save":

After saving, return to the previous page and click "Save and Apply":

This sets the newly added USB Ethernet adapter as a LAN port, while the original built-in LAN port can still be used normally.

2.3 With an external USB WiFi

The R3S has only one USB port, which can be used to connect an external USB WiFi adapter; however, in this case, the 4G functionality will not be available. For example, using an external RTL8812 USB WiFi adapter:

Note: Connecting to the internet via a WiFi adapter can be unstable, and there might be an issue with not being able to find the AP.

III. Work with Ubuntu OS

3.1 Test the 4G module

R3S: The version of the FriendlyElec Ubuntu(command-line version, without a GUI) we tested: rk3566-sd-ubuntu-noble-core-6.1-arm64-20241114.img.gz

R3S LTS: The version of the FriendlyElec Ubuntu(command-line version, without a GUI) we tested: rk3566-sd-ubuntu-noble-core-6.1-arm64-20250613.img.gz

Connect the LAN port of the R3S to the upstream router, then connect the PC to the same upstream router.After the OS boots, check the IP address of the R3S through the router's backend. In this document, the address obtained by the OS is: 192.168.8.35.

Download and install the terminal software MobaXterm on your PC. The download link for MobaXterm is:

https://mobaxterm.mobatek.net/download-home-edition.html

Then use MobaXterm to connect to the OS via SSH (username: root, password: fa):

4001_Friendly_NanoPi_R3S_27.jpg

Excecute ifconfig -a to view the following network parameters:

eth0 is the WAN port of the R3S, and since it is not connected to a network cable, it does not have an IP address.

eth1 is the LAN port of the R3S, connected to the upstream router, and it has correctly obtained an IP address.

usb0 is the 4G module, which has correctly obtained an IP address.

Execute route to view the routing table. Since usb0 is listed first, it indicates that the internet connection is currently through the 4G module:

At this point, when we ping the IP address and the domain name, both are successful, indicating that the 4G module is working properly:

3.2 Modification of Network Priority

The Ubuntu OS on the R3S, prioritizes connecting to the internet through the 4G network by default,.

If you want to prioritize the wired network for internet access, you can execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1

Explanation of these two commands (separated by '&&'):

sudo ip route del default: Remove the default route from the routing table.

sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1: Add the gateway of the wired network as a new default route (ensure to use the actual gateway address).

After completing the execution, execute the route command to view the routing table. The current default route is the gateway of the wired network (eth1 is listed first):

This way, the network will default to using the wired connection. If you need to switch back to defaulting to the 4G network, please execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.225.1

Or, you can restart the OS.

Note that 192.168.225.1 is the default gateway for the 4G module; please refer to the actual configuration.

Note: After a reboot, the routing table resets. To ensure the network continues to use the wired or wireless connection as the default route post-restart, you'll need to execute sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1 again.

3.3 AT command operation

Please install usbutils first:

apt install usbutils

Use lsusb to view USB devices, the red-boxed entry indicates the 4G module:

Note down the ID value of the 4G module: 05c6 90b6.

Use the following command to enable the ttyUSB serial port of the 4G module, where the value after echo is the ID value recorded earlier:

modprobe option

sh -c 'echo 05c6 90b6 > /sys/bus/usb-serial/drivers/option1/new_id'

After executing the above two commands, execute the following:

ls /dev

At this point, you should be able to see three devices under the dev directory: ttyUSB0, ttyUSB1, ttyUSB2.

Install the serial port software minicom:

apt install minicom

Open the AT command serial port using minicom:

minicom -D /dev/ttyUSB0

(Note: Which serial port to use should be determined by the ability to enter and execute AT commands without garbled or erratic output after accessing that serial port.)

If you need to view echo responses, type the command: ate1, then press Enter. You can continue to type other commands, and after pressing Enter, you will see the results.

4001_Friendly_NanoPi_R3S_35.jpg

Common AT commands:

1) Check if the SIM card is detected:

at+cpin?

Return ready to indicate the card has been recognized, if return error, you need to check the hardware.

2) Check antenna signal quality:

at+csq

eturn values between 26 and 31 indicate a good signal, with 31 representing a full signal strength; return values between 20 and 25 indicate a barely acceptable signal; return values below 20 indicate a poor signal or that the antenna might not be connected.

3) Check network registration status:

at+cops?

Normally, it should return the network supporter's code: 7, where 7 represents 4G.

Note: The above command at+csq should not include a question mark, while the other two commands require a question mark.

4) View the SIM card's IMEI code:

at+cgsn

5) Reset 4G module (Sometimes, if you reinsert the SIM card, hot swapping may not work; in such cases, you can use this reset command to reset the module.):

at+reset

6) Disable radio frequency:

at+cfun=0

Enable radio frequency:

at+cfun=1

The two commands mentioned above can be used in pairs to allow the module to re-register with the network without restarting the 4G module.

3.4 Modify the 4G IP address

If the default 4G IP address assigned at the factory conflicts with the IP address being used by the user, or if there is a need to modify the IP address, you can change the 4G module's IP to directly obtain a public IP. Please execute the AT command:

Set the 4G module's IP to directly obtain a public IP. Please execute the AT command:

Set the IP to public: AT+GTIPPASS=1

Set the IP to private: AT+GTIPPASS=0

Check whether the current IP is a public or private IP:AT+GTIPPASS?

After modifying the IP, a power cycle reboot is required for the changes to take effect.

IV. Work with Debian OS

Flash the Debian OS(command-line version, without a GUI) to a TF card.

R3S: The version of the FriendlyElec Debian we tested: rk3566-sd-debian-bookworm-core-6.1-arm64-20250311.img.gz

R3S LTS: The version of the FriendlyElec Debian we tested: rk3566-sd-debian-bookworm-core-6.1-arm64-20250613.img.gz

Similar to Ubuntu, connect to R3S using MobaXterm via SSH. The IP address of R3S is 192.168.8.216, with the username "pi" and password "pi".

Excecute ip addr to view the following network parameters:

eth0 is the WAN port of the R3S, and since it is not connected to a network cable, it does not have an IP address.

eth1 is the LAN port of the R3S, connected to the upstream router, and it has correctly obtained an IP address.

usb0 is the 4G module, which has correctly obtained an IP address.

Execute ip route to view the routing table. Since usb0 is listed first, it indicates that the internet connection is currently through the 4G module:

At this point, when we ping the IP address and the domain name, both are successful, indicating that the 4G module is working properly:

The remaining operations in the Debian OS, such as modification of network priority, AT command operation, and modify the 4G IP address, are the same as in Ubuntu. Please refer to the previous section.

V. NanoPi 4G and WiFi selection guide

No. NanoPi Model CPU Ethernet Built-in 4G Built-in WiFi USB Notes
1 R2S PLUS RK3328 2 CM4 CAT4-USB RTL8822(SDIO) 2 1 USB left after using 4G
2 R3S RK3566 2 CM4 Qualcomm 4G-USB None 1 No USB after using 4G
3 R5C RK3568B2 2 CM4 Qualcomm 4G-USB MT7922/8822CE 2 1 USB left after using 4G
4 R5S LTS 3 CM4 Qualcomm 4G-USB External MT7922/8822CE 2 1 USB left after using 4G
Qualcomm 4G/ZTE CAT4-M.2 None
5 R6C RK3588S 2 CM4 Qualcomm 4G-USB External MT7922/8822CE 2 1 USB left after using 4G
Qualcomm 4G/ZTE CAT4-M.2 None
6 M6 1 Qualcomm 4G/ZTE CAT4-M.2 MT7922/8822CE 3
7 R6S 3 CM4 Qualcomm 4G/ZTE CAT4/CAT4-USB None 2 1 USB left after using 4G
8 T6 (Ver. 2301) RK3588 2 CAT4/Qualcomm 4G/ZTE CAT4 MT7922/8822CE 1
9 T6 LTS CM4 Qualcomm 4G/ZTE CAT4/CAT4-USB MT7922/8822CE 3+2 3+1 USB left after using 4G
10 R4S RK3399 2 CM4 CAT4-USB None 2+1
11 R4SE CM4 CAT4-USB None 2 1 USB left after using 4G
12 Zero2 RK3528A 1 External CM4 CAT4-USB MT7922/8822CE 1 No USB after using 4G

VI. Summary

We only introduce the usage and operations for 4G module based on NanoPi R3S/R3S LTS, without covering the operations and software system specific to the NanoPi R3S/R3S LTS development board itself. For information about the NanoPi R3S/R3S LTS boards, please visit the FriendlyElec's website:

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R3S

Contact Us

0001_x.jpg 0002_fb.jpg 0004_ytb.jpg 0003_bb.jpg 0005_qq.jpg QQ:8204136

Email: mcuzone@vip.qq.com

Tel: +86(0)13957118045

If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!

Copyright 2004-2025 Wildchip

T