Template: CM4-DUAL-ETH-MINI User Guide
From Waveshare Wiki
User Guide
Note
Do not plug or unplug any device while it is powered on.
Image Programming
- Write Image for Compute Module Boards eMMC version
- Write Image for Compute Module Boards Lite version
FAN
- This simple demo can control the fan automatically, which also will read the CPU temperature and automatically adjust.
- Install the library:
sudo apt-get update sudo apt-get install python-pip sudo pip install RPi.GPIO
or
sudo apt-get update sudo apt-get install python3-pip sudo pip3 install RPi.GPIO
- Example program download:
wget https://files.waveshare.com/upload/e/ee/CM4-DUAL-ETH-MINI-Example.zip unzip CM4-DUAL-ETH-MINI-Example.zip -d ./CM4-DUAL-ETH-MINI-Example cd CM4-DUAL-ETH-MINI-Example/FAN/
- Run
python main.py
or
python3 main.py
- (Optional) Auto startup:
sudo nano /etc/rc.local
Add (../ please change to the path of your own file) before the last line 'exit 0':
python ../main.py
or
python3 ../main.py
Network Card
- The new version of the Raspberry Pi system kernel integrates the driver of RTL8111H, if you can't find the network card, you can try to upgrade the software package:
sudo apt update sudo apt upgrade
- If using another version of the system, please install the driver:
wget https://files.waveshare.com/upload/e/ee/CM4-DUAL-ETH-MINI-Example.zip unzip CM4-DUAL-ETH-MINI-Example.zip -d ./CM4-DUAL-ETH-MINI-Example cd CM4-DUAL-ETH-MINI-Example/Driver/ tar vjxf r8168-8.050.03.tar.bz2 cd r8168-8.050.03 sudo ./autorun.sh
- (Optional) If you compile the kernel yourself, you can choose the following options to load the driver:
Device Drivers > Network device support > Ethernet driver support > Realtek devices > Realtek 8169/8168/8101/8125 ethernet support