• sales

    +86-0755-88291180

Raspberry Pi CM4 to 4B IO Board User Guide

Features

This product is suitable for customers with the following needs:

  • Raspberry Pi CM4 IO board. Compatible with 4B Size and functions same as much as possible.
  • USB HUB extends USB 2.0 x 4
  • Rj45 network port
  • GPIO audio headphone (occupying GPIO18 and GPIO19)
  • Camera and DSI interface.

Introduction


1. USBx4       5. Micro HDMI      9.Earphone Jumper
 
2. RJ45          6.TypeC power        10.CM4
 
3. Earphone     7.DSI0             11.SD card
 
4. CAM0        8.CM4 BOOT

CSI DSI

Configuration

CSI and DSI are disabled by default. When using camera and DSI, three I2C devices, I2C-10, I2C-11, and I2C-0, will be occupied.
Start up as follows:

wget https://www.waveshare.net/w/upload/7/75/CM4_dt_blob_Source.zip
 unzip -o  CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source
 sudo chmod 777 -R CM4_dt_blob_Source
 cd CM4_dt_blob_Source/
 #If using two cameras and DSI0 execute
 sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
 #If executed with two cameras and DSI1
 sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
 #When using any DSI, HDMI1 has no image output, even if you do not connect the DSI screen, as long as the corresponding file is compiled, then HDMI1 will not output.
 #If you need to restore, delete the corresponding dt-blob.bin Just: sudo rm -rf /boot/dt-blob.bin 
 #After the execution is complete, turn off the power and restart the CM4


Old version(Buster)

The camera needs to run raspi-config, select Interfacing Options->Camera->Yes->Finish-Yes, reboot the system, open the enable camera, and then restart to save the changes.

Testing the Raspberry Pi Camera
View the first connected camera screen:

sudo raspivid -t 0 -cs 0

View the picture of the second camera connected:

sudo raspivid -t 0 -cs 1


New version(Bullseye)

If using the latest Raspberry Pi OS(Bullseye):

#The new system uses dual cameras
#remove camera_auto_detect=1 in config.txt
#camera_auto_detect=1

#Add to
dtoverlay=imx219,cam1
dtoverlay=imx219,cam0

#Where imx219 is the camera sensor model, there are other sensors
dtoverlay=ov5647,cam0
dtoverlay=imx219,cam0
dtoverlay=ov9281,cam0
dtoverlay=imx477,cam0

#then reboot
reboot

#open camera
libcamera-hello -t 0
or
libcamera-hello


#Other part of the command:
#Check if the camera is detected
libcamera-hello --list-cameras

#Open the corresponding camera
libcamera-hello  --camera 1
libcamera-hello  --camera 0

#taking photos
libcamera-jpeg -o test.jpg
#You can add --camera to specify the camera

More instructions LINK

  • NOTE: If using the DSI interface the display will have an HDMI disabled, even if just compiling the corresponding file without connecting the DSI screen.
  • Any connection of two HDMIs can output images, not limited to that HDMI. If two HDMI screens are connected, only HDMI0 has image output.
  • If you want to enable both HDMI, delete the dt-blob.bin file with the following command:
sudo rm -rf /boot/dt-blob.bin
  • Then restart

GPIO Audio

  • sudo nano /boot/config.txt
  • add to
    dtoverlay=audremap,pins_18_19
  • save & Exit restart
  • sudo raspi-config  
    select Audio -> 'headphone'

USB2.0

The USB port is disabled by default on the CM4 to save power. If you need to start, you need to add the following to the config.txt file:

dtoverlay=dwc2,dr_mode=host

After restarting

If you use the latest Raspberry Pi OS (image after October 30, 2021) USB2.0 is OTG mode by default, CM4 will report an error:

config failed, hub doesn't have any ports! (err -19)

However, USB can still be used. If you want to remove this error, remove otg_mode=1 in [cm4] of config.txt, and add dtoverlay=dwc2, dr_mode=host (USB cannot be recognized without adding it).

Detailed information

CM4 to 4B IO Board.step

CM4 to 4B IO Board.DWG

TAG: Desktop Arduino MLX90641 ESP32 S3 Raspberry Pi Pico 2 RP2350A 1.54inch TouchScreen 1.54 inch ePaper Display Development Board 200×200 RP2040 Raspberry Pi Pico 2 RP2350 1.8 inch AMOLED Development Board Display 368×448 TouchScreen Programmable Watch QSPI Solar Power Manager Module (D) ESP32 C3 1.44inch LCD ESP32-S3 DeepSeek AI Box Robot Development Board N16R8 Toy Doll Option 0.71 inch Electronic Eyes PC USB Secondary Screen Industrial 4-ch RS485 DC Detection Module Modbus RTU DIN Rail Raspberry Pi Industrial 10.1 inch DSI LCD HMI TouchScreen MIPI Display 1280x800 10.1inch One-Body PC With Front Camera For Pi 4/5 Raspberry Pi Pico 2 RP2350 2.25inch LCD Display Development Board RGB Lighting 76×284 6-Axis IMU SD-Port EG25-G Mini PCIe SIMCom Original 4G LTE Cat-4 Module Global Coverage GNSS PCI Express Mini Card Raspberry Pi 5 PCIe FFC Connector to Standard PCIe x1 Slot (C) Expansion Board Gripper Serial Robotic Arm Gripper Mechanical claw Serial Bus Servo ST3215/CF35-12 Raspberry Pi 5 RTC charge configuration Industrial ESP32 S3 AI 7inch (C) Development Board 7 inch TouchScreen Display Sensor Industrial 8-ch PWM RS485 pulse output module Modbus RTU rail Raspberry Pi Pico 2 Tiny RP2350B RP2350-Linux Mini Development Board with PSRAM-8MB Or Without PSRAM