跳转到内容

1005 RPi0-2U2E EN

来自Mcuzone Wiki

切换语言为中文

Keywords

Raspberry Pi Zero, Zero W, Zero WH, Zero2 W, USB2.0-A, Dual 100Mbps Ethernet, Expansion Board, USB HUB

I. Introduction

The Raspberry Pi Dual Network Expansion Board is specifically designed for the Raspberry Pi Zero series, supporting all versions including the Zero, Zero W, Zero WH, and Zero 2W. It also supports some domestic boards with compatible test points, such as the Orange Pi Zero 2W.

This expansion board connects to the Zero series via gold-plated pogo pins, with two pins for power supply and another two for USB communication. Please note that the Micro USB (OTG) port on the Zero cannot be used to connect other USB devices or USB cables, otherwise the USB functionality of the expansion board will be disabled.

Power supply method: It can be powered either via the MicroUSB port labeled PWR on the Raspberry Pi Zero, or through the USB-C port on the expansion board. Only one method should be used at a time; they cannot be used simultaneously.

The expansion board is essentially a USB hub that utilizes the Zero's built-in USB OTG as a host. Through the USB hub, it expands one port into four: two ports are used for USB to 100Mbps Ethernet adapters, while the other two are extended as standard USB 2.0 Type-A host ports. The new version reserves a 1.25mm-4Pin connector for one of the USB 2.0-A ports, allowing expansion for built-in devices such as 4G network cards.

(Note: When using this expansion board, the Raspberry Pi Zero development board cannot utilize the OTG function. If you need to use the OTG function, all interfaces on the expansion board will become unavailable.)

II. Hardware Spec

1) Connect via gold-plated pogo pins and Zero series for power and communication.

2) Power supply: onboard USB-C 5V power supply or the Zero's own PWR MicroUSB power supply, either can be used but not simultaneously.

3) 2*100Mbps Ethernet.

4) 2*USB 2.0-A host ports, both equipped with 2A fuses; in the new version, one of the USB 2.0-A ports is reserved with a 1.25mm 4-pin port, sharing the same set of USB signals, either can be used but not simultaneously, allowing for 4G CAT1 expansion.

5) Size: 70*56mm, with four M2.5 mounting holes for assembling Raspberry Pi Zero.

6) PCB board is UL and RoHS certified, with flame resistance rating 94V-0.

7) Optional full aluminum alloy case, case size: 80*58*38mm.

1005_Zero-DETH_DUSB_46.jpg

III. Work with Raspberry Pi OS

This document is based on the hardware of Raspberry Pi Zero 2W.

The OS uses Raspberry Pi OS, specifically Raspberry Pi OS with desktop, the version is: 2023-05-03-raspios-bullseye-arm64.img.xz.

(If using a board from the Raspberry Pi Zero 1st-gen series, only 32-bit OSs are supported. Please note the version when downloading.)

You can download it in:

https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

Different versions of Raspberry Pi OS have varying strategies for 4G network management. Based on the 64-bit OS version, the results are as follows:

OS version(64-bit) Test results
2023-02-21-bullseye Driver-Free, No Dial-Up Required, Auto-identification, plug and play, automatic internet connection.
2023-05-03-bullseye
2023-12-05-bookworm Driver-Free, No Dial-Up Required, Auto-identification, but there may be instances of network connection failure,

and the OS requires the installation of DNS software.

2024-07-04-bookworm
2024-11-19-bookworm
2025-05-13-bookworm
2025-10-01-trixie

The Raspberry Pi Zero series boards only support 32-bit OS. The test results are as follows:

OS version (32-bit) Test results
2023-02-21-bullseye Driver-Free, No Dial-Up Required, Auto-identification, plug and play, automatic internet connection.
2023-05-03-bullseye
2023-12-05-bookworm
2024-07-04-bookworm
2024-11-19-bookworm
2025-05-13-bookworm
2025-10-01-trixie

☆ 3.1 View hardware devices

3.1.1 View USB devices

Open the terminal and execute lsusb, as shown in the figure below:

You can see the OS has detected two 100Mbps Ethernet cards.

3.1.2 View network devices

Open the terminal and execute ifconfig, as shown in the figure below:

1005_Zero-DETH_DUSB_38.jpg

We use the network speed testing tool iperf3 for speed tests.

Download iperf3 for Windows:

http://www.mcuzone.com/down/Software.asp?ID=10000634

Install iperf3 on Linux:

sudo apt-get install iperf3

3010_RPi_4B-4G_Probe_56.jpg

Test results for 100Mbps Ethernet:

eth0: around 93Mbps in Client mode, around 94Mbps in Server mode:

eth1: around 93Mbps in Client mode, around 94Mbps in Server mode:

☆ 3.2 Use of Ethernet

If one network port uses the internal network, and the other uses the external network, or if the two network ports are on different network segments, you need to manually assign different IP addresses to these two ports.

By default, the IP addresses obtained by the two Ethernet ports of the Raspberry Pi OS are automatically assigned after startup. If we need to set a fixed IP address of our choice, we must configure it manually.

Right-click the network icon in the top-right corner of the desktop and open "Wireless & Wired Network Settings...":

Select the network card you want to modify, for example "eth0", then fill in the network parameters, click "Apply" to save, and "Close" to exit:

Re-plug the network cable to obtain a new address, thereby completing the manual IP configuration for the first network card (set here as 192.168.8.12).

If you need to set a fixed IP address of your choice for the second network card as well, perform the same operation for "eth1" (set it to 192.168.8.13 here). After completing the settings, execute ifconfig in the terminal:

1005_Zero-DETH_DUSB_48.jpg

It can be seen that both network cards have been set to the specified static IP addresses.

☆ 3.3 Test the 4G module connected via USB

Our RPi0-CAT1 module is designed to be used with the expansion board and can be assembled into the casing together. Note: The 1.25mm-4P connector corresponds to the USB-A port, which must not be connected to any USB device, otherwise the 4G function will be disabled.

3.3.1 Module connection

Without connecting the Ethernet cable, we can see that the 4G module (eth2) has successfully obtained an IP address by executing ifconfig -a in the terminal:

Status LED indications are as follows:

The blinking status of 1.8 seconds on and 0.2 seconds off (which can also be identified by the on duration being longer than the off duration) indicates that the 4G module is connected to the network.

The blinking status of 1.8 seconds off and 0.2 seconds on indicates a problem with the SIM card or network. Please check the SIM card and antenna.

3.3.2 Internet connection test

After the 4G module successfully obtains an IP address, we test pinging external IP addresses and domain names, such as:

ping 220.189.255.38

ping www.mcuzone.com

All successful, indicating that the 4G module is functioning normally:

Some versions of Raspberry Pi OSs can only ping IP addresses, but may encounter network failures when pinging domain names, reporting DNS errors:

1005_Zero-DETH_DUSB_54.jpg

At this point, the OS needs to install the DNS switching software udhcpc.

Connect the Ethernet port of the CM4 WiFi7 Expansion Board to the upstream router, and then execute the following command in the terminal:

sudo apt install udhcpc

1005_Zero-DETH_DUSB_55.jpg

After installation, unplug the network cable and execute:

sudo udhcpc -i eth2

1005_Zero-DETH_DUSB_56.jpg

After the execution is completed, we ping the IP and domain name, and both are successful.

3.4 Frequently Asked Questions

3.4.1 Startup issue

If during the startup process, your OS gets stuck on the Raspberry Pi logo and cannot boot:

0007_Zero_4G_Cat1_58.jpg

Or repeatedly restarts, or if the keyboard, mouse, and 4G module are unusable after startup, please carefully check whether the headers are properly aligned with the gold-plated pogo pins. Also, open the config.txt file in the root directory of the TF card system partition on your PC and check the USB initialization script:

Please confirm whether the three red boxed areas in the image below are fully configured. If not, manually add them completely and save the file:

# otg_mode=1 (It is recommended to comment this out)

dtoverlay=dwc2,dr_mode=host (Ensure to add at both required locations)

3.4.2 Network Card priority setting

If there are multiple connected networks, there is an issue of network card priority, i.e., which card is used for internet access by default.

Currently connected to a wired network (eth1) and also connected to 4G CAT1 (eth2). To check the default network device, you can use the route command, for example:

1005_Zero-DETH_DUSB_58.jpg

At this point, eth1 is ranked first, so the default internet connection is through the wired network.

If you need to use 4G CAT1 as the default connection, you can execute:

sudo udhcpc -i eth2

1005_Zero-DETH_DUSB_56.jpg

Then execute the route command again:

1005_Zero-DETH_DUSB_59.jpg

At this point, eth2 is ranked first, so the default internet connection is through the 4G CAT1.

IV. Work with Ubuntu Server

This document is based on the hardware of Raspberry Pi Zero 2W, and the OS is Ubuntu Server LTS. Before use, the OS's USB and Ethernet need to be configured. The expansion board can only be used after the configuration is complete.

The version is: ubuntu-24.04-preinstalled-server-arm64+raspi.img.xz

You can download it in:

https://ubuntu.com/download/raspberry-pi

☆4.1 Configure OS

4.1.1 Configure USB

After writing the Ubuntu Server OS image, please open the config.txt file in the root directory of the TF card system partition on your PC and check the USB initialization script. Ubuntu Server initializes USB twice, but the first initialization is not configured in host mode. Make sure the section highlighted in red in the image below is fully configured. If it is not, please add it manually. Failure to make this change will prevent USB devices from functioning:

dtoverlay=dwc2,dr_mode=host

4.1.2 Configure username and password

Insert the TF card into the Zero 2W and boot the OS. After the first boot, you will be prompted to log in. The username and password are both "ubuntu". After successful login, you will be required to change the password:

After the modifications are completed, you will automatically enter the OS.

4.1.3 Configure Ethernets

For the Raspberry Pi Zero series boards, the Ethernet interface is disabled by default and requires additional configuration to use.

Connect any Ethernet cable to the upstream router, then execute ip addr to check and record the network interface name:

Among them, the 2nd and 3rd network cards (enx00e099d51fa4, enx00e099d6eb5e) are USB to 100Mbps Ethernet cards.

Then execute the following command to open the network configuration file:

sudo nano /etc/netplan/50-cloud-init.yaml

Edit the network configuration file according to the image below:

Save and exit, then restart.

After rebooting, you can connect to the network and install the net-tools package for use:

sudo apt install net-tools

After the configuration is complete, connect the other Ethernet port to the upstream router, execute the ifconfig command, and check the information of both network cards to ensure that both can obtain IP addresses:

☆ 4.2 Ethernet test

After the network card successfully obtains an IP address, any single port or both ports connected to the upstream router can successfully ping external network addresses, such as:

ping www.mcuzone.com

If you can ping it, it means the connection is successful.

Download iperf3 for Windows:

http://www.mcuzone.com/down/Software.asp?ID=10000634

Install iperf3 on Linux:

sudo apt-get install iperf3

Test results for 100Mbps Ethernet:

Network card 2: around 93Mbps in Client mode, around 94Mbps in Server mode:

Network card 3: around 93Mbps in Client mode, around 94Mbps in Server mode:

☆ 4.3 Test the 4G module connected via USB

Connect the external 4G module to the expansion board. This document uses a 4G CAT1 module for testing. Note: The 1.25mm-4P connector corresponds to the USB-A port, which must not be connected to any USB device, otherwise the 4G function will be disabled.

1005_Zero-DETH_DUSB_78.jpg

4.3.1 Module configuration

Without connecting the Ethernet cable, execute ifconfig -a. Compared to the previous two wired network cards, we can see that the 4G module is enx2089846a96ab:

Then execute the following command to open the network configuration file:

sudo nano /etc/netplan/50-cloud-init.yaml

Edit the network configuration file according to the image below:

Save and exit, then restart.

Execute the command ifconfig -a to check the external 4G module information and obtain the IP address:

4.3.2 Network test

After the 4G module successfully obtains an IP address, we can ping external network addresses, such as:

ping www.mcuzone.com

1005_Zero-DETH_DUSB_20.jpg

Since the 4G module is the only available internet connection at this point, a successful ping indicates that the 4G CAT1 network is successfully connected.

The network card priority settings in the Ubuntu Server are the same as those in the Raspberry Pi OS. Please refer to the relevant content in the previous chapter.

V. 4G related operations

5.1 Use AT commands

The usage of the AT command is the same in Raspberry Pi OS and Ubuntu Server. This chapter explains it based on the Raspberry Pi OS. The operations are as follows:

After the OS starts up, execute the command in the terminal:

lsusb

1005_Zero-DETH_DUSB_80.jpg

Record the ID value of the 4G module: 19d1 0001

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

sudo modprobe option

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

Then execute the command in the terminal:

ls /dev

At this point, you should see three devices generated under the dev directory: ttyACM0 - ttyACM2:

Install the serial port software minicom:

sudo apt-get install minicom

0007_Zero_4G_Cat1_13.jpg

By default , the AT command serial port is ttyACM0.

Open the AT command serial port through minicom:

sudo minicom -D /dev/ttyACM0

(Note: Typically, three ports (ttyACM0 to ttyACM2)will appear. In general, the AT port is ttyACM0 under most OSs. If that doesn't work, you may try other ports such as ttyACM2. If multiple USB-to-serial devices are present, further attempts will be needed until the correct AT port is identified.)

The first time you enter an AT command, there may be no echo. If you then input the command at and press Enter, and it returns "OK," it indicates that everything is working properly. If you need to check the echo, please type the command: ate1, then press Enter. After that, you can continue to type other commands and see the inputs.

1005_Zero-DETH_DUSB_62.jpg

5.2 Common AT commands

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

VI. Work with OpenWrt

The expansion board is paired with the Raspberry Pi Zero 2W, and its two Ethernet ports can be configured in a one-in-one-out switch mode, with one serving as the WAN port (connected to the upstream router) and the other as the LAN port for connecting to a PC.

The OpenWrt is compiled by our company, and the version is: openwrt-bcm27xx-bcm2709-rpi-2-squashfs-sysupgrade-linux-6.1.98-20240723.img.gz

6.1 Preparation

Connect the 100Mbps Ethernet port (eth0) on the expansion board to the PC.

1005_Zero-DETH_DUSB_38.jpg

After the OS starts up, go to Windows Settings, find Network & Internet, and open the connected network under Ethernet to view the default gateway IP address. This address is the access address for the OpenWrt's configuration page. As shown in the figure, the tested address in this article is 192.168.198.1.

Then open a web browser, enter 192.168.1.1 to access the OpenWrt. The default username is root, and the default password is password:

6.2 Test Ethernet

Click on "System - TTYD Terminal", then log in to the terminal. The default username is root, and the password is password:

Execute ifconfig -a, and the result is as follows:

Here, eth0 is the WAN, and eth1 is the LAN.

Connect eth1 to the upstream router, then click "Network - Interfaces". After a moment, we can see that the WAN port has successfully obtained an IP address:

Click on "System - TTYD Terminal", Use the default username and password to log in to the terminal, then ping an external network address in the terminal:

ping www.mcuzone.com

It can be pinged, indicating the network is functioning properly.

Open https://www.speedtest.cn/ on your PC to run a speed test, with the following results:

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.

6.3 Test USB connection with 4G module

Connect the external 4G module to the expansion board. This document uses a 4G CAT1 module for testing. Note: The 1.25mm-4P connector corresponds to the USB-A port, which must not be connected to any USB device, otherwise the 4G function will be disabled.

1005_Zero-DETH_DUSB_78.jpg

We can configure the 4G CAT1 as another WAN port.

When eth0 is not connected to the network cable, start the OS, log in to the TTYD terminal, and execute ifconfig -a:

Here, eth2 refers to 4G CAT1.

Click "Network - Interfaces" - "Add new interface...":

Configure as shown in the figure, where the "Name" can be customized, and then click the "Submit" button:

In the "Firewall Settings", set "Create / Assign firewall-zone" to "wan", then click "Save":

Then it will automatically return to the interface page. Wait a moment, and you will see the extended the 4G obtain an IP address:

Click on "System - TTYD Terminal", Use the default username and password to log in to the terminal, then ping an external network address in the terminal:

ping www.mcuzone.com

It can be pinged, indicating the network is functioning properly.

Open https://www.speedtest.cn/ on your PC to run a speed test, with the following results:

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

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