Skip to content
Thomas edited this page Apr 6, 2022 · 14 revisions

Welcome to the pikvm-CM4-Board wiki!

Flashing the OS image

From this video you can learn how to flash image quickly.How to flash the eMMC on a Raspberry Pi Compute Module 4 video

Using RPi Imager (Linux, MacOS and Windows)

1、If you use raspberry pi computing modules such as CM3 or CM4 EMMC,you can initialize EMMC through the usbboot. If you use an SD card, you can see the 2 part directly. First, use the jumper cap to short the boot pin.Then connect the data cable to the USB OTG interface.Power on blikvm and observe the act light, the green light is always on.Taking Ubuntu system as an example:

# sudo apt-get install libusb-1.0-0-dev  
# git clone --depth=1 https://github.com/raspberrypi/usbboot
# cd usbboot
# make
# sudo ./rpiboot

If the content shown in the figure below appears, it indicates that EMMC initialization is successful.

2、Run RPi Imager:

3、Press CHOOSE OS and select Use custom image at bottom of the list:

4、After clicking on this item, select the image file (.img.xz), then click CHOOSE STORAGE.

5、Insert the memory card into the card reader. Choose the card reader from this list. Be careful and choose the right device:

6、After choosing the memory card, press the WRITE button. Confirm the operation when you are asked about it:

7、Wait for the process to finish. Get yourself a coffee or do some stretching:

8、Remove the memory card after successful completion:

Setting up Wi-Fi

1、Make filesystem writable using rw command.

#rw
#vim /etc/systemd/network/wlan0.network

2、Create Wi-Fi settings file /etc/systemd/network/wlan0.network with following content:

[Match]
Name=wlan0

[Network]
DHCP=yes
DNSSEC=no

# Use same IP by forcing to use MAC address for clientID
[DHCP]
ClientIdentifier=mac

3、Set network ESSID and password:

# wpa_passphrase MyNetwork 'Password' > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

4、Enable WPA-supplicant service:

#systemctl enable wpa_supplicant@wlan0.service

5、Make filesystem read-only again using ro command.

#ro

6、If you use 'ifconfig' command, can't find wlan0. Do:

#cd /lib/firmware/brcm
#rw
#cp brcmfmac43455-sdio.raspberrypi,4-model-b.txt brcmfmac43455-sdio.raspberrypi,4-compute-module.txt 
#ro
#reboot

Features

>>> PCB front <<< >>> PCB front <<<
drawing drawing

2.1. HDMI IN port with I2S

The product integrates video capture function, and the bridge chip is TC358743. The product supports HDMI video and audio capture. Currently, PiKVM software only supports video capture, not audio capture. For the audio coding method, please refer to the documentation of C780.

2.2. ATX controller interface (power on/off, reboot control, PWR and HDD ACT LEDs)

2-3.png

The user can use the ATX cable provided with the product to connect the product and the motherboard ATX switch of the controlled computer. The length of the ATX cable is 60CM, you can also use the double female Dupont cables.

2-4.png

2.3. USB3.0 port x 2

The USB3.0 interface is provided by a USB 3 host controller (using the Via Labs VLI805), which is connected to the internal PCIe 2.0 x1 host controller of CM4.

2.4. USB-C OTG

This port is doing the emulation of a USB keyboard, mouse, Virtual CD-ROM or USB Flash Drive, USB-Ethernet, USB-Serial port and a lot of other Linux-supported features. This interface cannot provide external power. Control a PC's USB interface, you should plug a USB-C to USB-A cable from the USB-C 'OTG' port on the BliKVM into a USB-A port on the PC you're controlling.

2.5.Real Time Clock (RTC)

The RTC clock chip is DS1307. The chip is connected to the I^2^C interface of CM4, and the wiring definition is shown in the following table. Users need to buy 1220 button batteries locally.

2-5.png
DS1307 CM4
SCL GPIO3(SCL1,I^2^C)
SDA GPIO2(SDA1,I^2^C)

Follow the method below to enable RTC(Use the latest v3-hdmi-rpi4-latest.img,IIC is enabled by default).

  1. Open the startup configuration file of the Raspberry Pi
# sudo nano /boot/config.txt //Raspberry Pi's startup configuration file
  1. Find the corresponding code, modify it as follows, and configure it as DS1307 chip
dtoverlay=i2c-rtc,ds1307
  1. Reboot the system
# sudo reboot
  1. Synchronize time from Raspberry Pi to DS1307
# date  //Display the current time of the Raspberry Pi
# sudo hwclock -w //Write the time of Raspberry Pi to DS1307
# sudo hwclock -r //Read the time of DS1307

2.6.Gigabit Ethernet

A standard 1:1 RJ45 MagJack with added ESD protection.

2.7.Activity LED

This LED duplicates the function of the GREEN LED on the Raspberry Pi 4, Model B. Under Linux this LED will flash to signify eMMC access, while if there is an error during booting this LED will flash error patterns which can be decoded using the look up table on the Raspberry Pi website.

2.8.Micro SD Card socket

The micro SD Card socket is a PUSH-PUSH socket. To release the micro SD Card a gentle push on the micro SD Card will enable it to be removed.

2.9.Power LED

This LED duplicates the function of the RED LED on the Raspberry Pi 4, Model B.

2.10. I2C display connector

The product comes standard with a monochrome OLED display with a resolution of 128x64, and the chip is SSD1306. The user connects the display to the product with the wiring of the display.

2-6.png

The module is connected to CM4 through the I^2^C interface. The wiring definition is shown in the following table. This is a library for the monochrome OLEDs based on SSD1306 drivers.

Display(SSD1306) CM4
GND GND
VCC 3.3V
SCL GPIO3(SCL1,I^2^C)
SDA GPIO2(SDA1,I^2^C)

Follow the method below to enable OLED(Use the latest v3-hdmi-rpi4-latest.img,IIC is enabled by default).

Log in to PiKVM and run these commands:

# rw
# systemctl enable --now kvmd-oled //Enable OLED
# ro

2.11. nRPI_BOOT Jumper

  • G: GND
  • BOOT: nRPI_BOOT

During boot if the nRPI_BOOT pin is low booting from eMMC will be stopped and booting will be transferred to rpi boot which is via USB.
Flashing the OS image,you can refer to this link flashing os image

2.12.USB-C power input

The CM4 requires a good quality USB-C power supply capable of delivering 5V at 3A.Must use USB-C to USB-A cable. If attached downstream USB devices consume less than 500mA, a 5V, 2.5A supply may be used.

2.13. FAN connector 5V

It is recommended to use 5V 0.15A 3010 DC brushless fan.

2.14. CSI-2 date lanes switch

Newer keeps the factory state, ignore this switch. Only flip the switch when the device is powered off, otherwise it may cause permanent damage! The four small switches should be up or down at the same time.

image-20211212000203991

The video encoding function of the Raspberry Pi is implemented by the HDMI-to-CSI bridge chip Toshiba TC358743, which supports up to 4 CSI-2 date lanes. The camera interface of Raspberry Pi 4B only supports 2 CSI-2 date lanes(up to 1080p50fps), Raspberry Pi CM4 can support 4 CSI-2 date lanes(up to 1080p60fps). Currently, PiKVM only uses two CSI-2 channels.

2.15. CM4 Module Connectors

Used to install CM4

3.Mechanical Diagram

image-20211212010344693

4.Metal Shell

2-9.png

The metal shell provides protection for the circuit board, and the equipped 5V DC brushless fan can enhance heat dissipation. SMA antenna hole is reserved on the shell, CM4 can use an external antenna.

2-9.png

5.3D MODLE

In this path: video/, there are some 3D models of videos.