4009 M5/M6 4G EN

来自Mcuzone Wiki

切换语言为中文

Keywords

FriendlyElec NanoPi M6, RK3588S,NanoPi M5,RK3576,M.2 NVMe, 4G LTE,Debian, Ubuntu, Android

I. Introduction

The M6-4G is a 4G LTE module specifically designed for the FriendlyElec NanoPi M6/M5 board, expanded through its M.2 M interface. FriendlyElec's Ubuntu OS and Debian OS support driver-free and automatic-identification of 4G. FriendlyElec's Android only supports ZTE CAT4 4G. The 4G system adopts Qualcomm and ZTE solutions, with an onboard Nano SIM card slot. The 4G antenna uses an IPEX 1 interface and features dual antennas.

NanoPi M6 ("M6") is an open-source, high-performance all-in-one edge computing platform designed and produced by the FriendlyElec team. It adopts the Rockchip RK3588S as the main control processor, equipped with 64-bit LPDDR5 memory and an optional eMMC flash storage module. It supports running multiple OSs such as FriendlyWrt, Android, Debian and Ubuntu, and features GPU and VPU acceleration.

The M6 is highly suitable for businesses to customize and develop their own systems, and perfect for embedded hobbyists to discover and craft their own distinctive projects.

The NanoPi M5 ("M5") is an open-sourced mini SBC device, designed and developed by FriendlyElec.It is based on Rockchip RK3576 SoC, with 32-bits LPDDR4X/LPDDR5 RAM and UFS 2.0 storage(optional). It supports booting from TF cards and is compatible with a wide range of operating systems, including Android 14, Debian, Ubuntu, FriendlyWrt, Buildroot, OpenMediaVault, and more. It is also fully compatible with headless systems.

Model M5 M6 R6C R6S T6 CM3588/Plus R5S
CPU RK3576 RK3588S RK3588S RK3588S RK3588 RK3588 RK3568B2
Ethernet 2*GIGA 1*GIGA G/2.5G G/2*2.5G 2*2.5G 2.5G 2*2.5G/G

If the CPUs are the same, the OSs used are also the same. Thus, the M6/R6C/R6S use the same OS, and the T6/CM3588 also use the same OS.

II. Hardware Spec

The M6-4G utilizes the M.2 M-key of the PCIe on the development board to expand USB ports for connecting a 4G module. The DC-DC power supply is entirely built into the M6 unit without occupying the eMMC module's interface. Also applicable to the M5.

1) DC-DC power supply chip.

2) 1*4G LTE.

3) 1*Nano SIM card slot.

4) 2*IPEX 1 antennas.

5) 2*LEDs, one is the power indicator, one is the 4G network registration indicator.

4009_M6_4G_46.jpg

4009_M6_4G_19.jpg

4009_M6_4G_20.jpg

Module NL668-EU

(soc from Qualcomm)

NL668-EAU

(soc from Qualcomm)

NL668-AM

(soc from Qualcomm)

ZTE CAT4 4G

(soc from ZTE)

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

III. Work with Ubuntu OS

The tested FriendlyElec's Ubuntu OS (graphical desktop version) ,and boot from the TF card.

M6 version is: rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20250122.img.gz

M5 version is: rk3576-sd-ubuntu-noble-desktop-6.1-arm64-20250404.img.gz

Execute lsusb in the terminal. The result is as follows:

Qualcomm 4G/NL668-AM/EU/EAU:

ZTE CAT4 4G:

The area within the red frame is the 4G module.

Execute ifconfig -a to view the network parameters as follows:

1) Qualcomm 4G/NL668-AM/EU/EAU:

usb0 is the 4G module.

Execute the route command to view the routing table. Since usb0 is listed first, the 4G network takes priority for internet access.

4009_M6_4G_23.jpg

2) ZTE CAT4 4G:

4009_M6_4G_43.jpg

Execute the route command to view the routing table. Since eth0 is listed first, the wired network takes priority for internet access.

4009_M6_4G_03.jpg

10.11.162.121 serves as the default gateway for the 4G module; please confirm based on actual settings.

▶If you want to prioritize the 4G 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 10.11.162.121

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 10.11.162.121 : Add the gateway of the 4G network as a new default route.

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

4009_M6_4G_04.jpg

To revert to prioritizing the wired network, you may restart the OS or use the method described above.

Note: After a reboot, the routing table resets. To ensure the network continues to use the 4G network 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 10.11.162.121 again.

After confirming that 4G network is set as the default for internet access, we successfully ping both the IP and domain name.

4009_M6_4G_05.jpg

Go to https://www.speedtest.cn/to run a speed test, with the following results:

(M6)Qualcomm 4G NL668-EAU:

4009_M6_4G_25.jpg

(M6)ZTE CAT4 4G:

4009_M6_4G_47.jpg

(M5)ZTE CAT4 4G:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

IV. Work with Debian OS

The FriendlyElec's Debian OS (graphical desktop version) ,and boot from the TF card.

M6 version is: rk3588-sd-debian-bullseye-desktop-6.1-arm64-20250123.img.gz

M5 version is: rk3576-sd-debian-bullseye-desktop-6.1-arm64-20250402.img.gz

Execute lsusb in the terminal. The result is as follows:

Qualcomm 4G/NL668-AM/EU/EAU:

ZTE CAT4 4G:

The area within the red frame is the 4G module.

Execute ip addr to view the network parameters as follows:

1) Qualcomm 4G/NL668-AM/EU/EAU:

usb0 is the 4G module.

Execute the ip route command to view the routing table. Since usb0 is listed first, the 4G network takes priority for internet access.

2) ZTE CAT4 4G:

(M6)Execute the ip route command to view the routing table. Since eth0 is listed first, the wired network takes priority for internet access.

10.129.122.170 serves as the default gateway for the 4G module.

If you want to prioritize the 4G 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 10.129.122.170

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

After confirming that 4G network is set as the default for internet access, we successfully ping both the IP and domain name.

Go to https://www.speedtest.cn/to run a speed test, with the following results:

Qualcomm 4G NL668-EAU:

4009_M6_4G_30.jpg

(M6)ZTE CAT4 4G:

(M5)ZTE CAT4 4G:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

V. Work with Android OS

The model of the 4G module is ZTE CAT4 4G (other 4G modules are not supported by the FriendlyElec Android OS).

(M6)The FriendlyElec Android OS: rk3588-sd-android12-20240821.img.gz.

(M5)The FriendlyElec Android OS: rk3576-sd-android14-20250521.img.gz

Boot from the TF card, you can directly access the internet via ZTE CAT4. A successful Internet connection indicator will appear in the status bar at the top right corner of the desktop, as shown in the figure below:

(M6)

3007_CM4_4G_Mini_55.jpg

Open Chrome, connect to Internet, visit a speed test website to conduct a speed test, and the results are as follows:

(M5):

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

▶ If you need to check the detailed status of the network, you can download and install the terminal software Termux for viewing. The download link is:

http://www.mcuzone.com/wiki/3007_CM4_4G_Mini/termux_1020.apk

After installing Termux, open the software and execute ifconfig -a in terminal:

(M6):

4009_M6_4G_45.jpg

(M5):

We can ping public IP addresses, for example:

ping 220.189.288.38

ping www.mcuzone.com

3007_CM4_4G_Mini_43.jpg

VI. 4G related operations

6.1 4G AT command

The usage of AT commands is the same across all devices. Here, we will demonstrate using the M6 Ubuntu OS and ZTE CAT4 4G module.

Execute lsusb in terminal:

Record the ID value of the 4G module: 2cb7 0001

Use the following command to open the ttyUSB serial port, where the value after echo is the ID recorded above:

sudo modprobe option

sudo sh -c 'echo 2cb7 0001 > /sys/bus/usb-serial/drivers/option1/new_id'

After execution is complete, execute:

ls /dev/ttyUSB*

At this point, you should be able to see five devices under the dev directory: ttyUSB0 through ttyUSB4.

4009_M6_4G_13.jpg

Install the serial port software minicom:

sudo apt install minicom

Open the AT command serial port through minicom:

sudo minicom -D /dev/ttyUSB0

(Note: The selection of which serial port to use should be based on entering the port and being able to input AT commands without garbled characters or erratic results.)

The first time you enter an AT command, there may be no echo. If you then type at and press Enter, and it returns "OK," it means the system is working properly. If you need to check the echo, type the command: ATE1, then press Enter. Continue typing other commands and press Enter to see the echo.

4009_M6_4G_14.jpg

6.2 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

Return values between 26 and 31 indicate a good signal, with 31 representing a full signal strength; values between 20 and 25 indicate a barely acceptable signal; and 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.

4. View the 4G module'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.

6.3 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.

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.

6.4 FAQ

6.4.1 What should I do if I can't ping a domain name?

Q: After executing ifconfig -a, you can see that an IP address has been obtained, but you are unable to ping a domain name. How can this issue be resolved?

A: If pinging the IP address is successful, it indicates that the 4G module can access the internet normally. If pinging the domain name fails (as shown in the figure below), then there is an issue with the DNS server resolution.

Plug an Ethernet cable into the Ethernet port of the M6 to connect to the internet via cable. Then install the DNS server switching software udhcpc(Using Ubuntu OS and ZTE CAT4 as examples):

sudo apt install udhcpc

After installation is complete, unplug the network cable and execute(Please execute ifconfig -a to check the network identifier following -i, and then view the corresponding 4G module information):

sudo udhcpc -i eth1

Then you can ping the URL:

6.4.2 What should I do if I have to run udcpc every time the OS starts?

Q: For a 4G module that needs to connect to the internet by modifying the DNS server, it can connect normally after installing and running udcpc. However, udcpc needs to be run every time the OS reboots. If you want to automatically connect to the internet via the 4G network upon startup, what should you do?

A: You need to add a startup command in the rc.local file. You can refer to the following steps(Taking ZTE CAT4 4G as an example, eth1 is the network identifier of the 4G module, which can be seen by executing ifconfig -a. Please refer to the actual situation for details):

Enable rc-local service:

sudo systemctl enable --now rc-local

Open the rc.local file using the following command:

sudo nano /etc/rc.local

Add the commands you want to execute on startup above "exit 0":

sleep 5 && sudo udhcpc -i eth1 && sleep 5 && sudo udhcpc -i eth1 && sleep 5 && sudo udhcpc -i eth1

The purpose of the sleep command is to delay the execution of subsequent commands by a specified number of seconds. Since it takes some time for the 4G module to obtain an IP address, to prevent udhcpc from failing, it is necessary to execute the command multiple times with a certain delay between each execution. As a result, the 4G network will be available approximately 20 seconds after the OS starts up.

Then save the file, so that the OS can automatically connect to the internet via the 4G module upon startup.

VII. 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/ CM4 Qualcomm 4G/NL668-EAU/EU/AM--USB RTL8822(SDIO) 2 1 USB left, after using 4G
2 R3S RK3566 2 CM4 Qualcomm 4G/NL668-EAU/EU/AM-USB None 1 No USB after using 4G
3 R5C RK3568B2 2 CM4 Qualcomm 4G/NL668-EAU/EU/AM-USB MT7922/8822CE 2 1 USB left, after using 4G
4 R5S LTS 3 CM4 Qualcomm 4G/NL668-EAU/EU/AM-USB External MT7922/8822CE 2 1 USB left ,after using 4G
Qualcomm 4G/NL668-EAU/EU/AM/ZTE CAT4-M.2 None
5 R6C RK3588S 2 CM4 Qualcomm 4G/NL668-EAU/EU/AM-USB External MT7922/8822CE 2 1 USB left, after using 4G
Qualcomm 4G/NL668-EAU/EU/AM/ZTE CAT4-M.2 None
6 M6 1 Qualcomm 4G/NL668-EAU/EU/AM/ZTE CAT4-M.2 MT7922/8822CE 3
7 R6S 3 CM4 CAT4/Qualcomm 4G/NL668-EU/EAU / AM/ZTE CAT4-USB None 2 1 USB left ,after using 4G
8 T6 (Ver. 2301) RK3588 2 CAT4/Qualcomm 4G/NL668-EU/EAU/AM/ZTE CAT4(miniPCIe) MT7922/8822CE 1
9 T6 LTS CM4 CAT4/Qualcomm 4G/NL668-EU/EAU/AM/ZTE CAT4--USB MT7922/8822CE 3+2 3+1 USB left, after using 4G
10 R4S RK3399 2 CM4 CAT4/Qualcomm 4G/NL668-EAU/EU/AM--USB None 2+1
11 R4SE CM4 CAT4/Qualcomm 4G/NL668-EAU/EU/AM--USB None 2 1 USB left ,after using 4G
12 M5 RK3576 2 Qualcomm 4G/NL668-EAU/EU/AM/ZTE CAT4--M.2 SDIO 2
13 Zero2 RK3528A 1 External CM4 CAT4/ Qualcomm 4G/NL668-EAU/EU/AM--USB MT7922/8822CE 1 No USB after using 4G

VIII. Summary

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

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

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

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