6. Buildroot Application
6.1 HDMI Display
Connect the board and monitor with a HDMI cable, then start up.
Note
The Boardcon factory default HDMI display. If change to LVDS please reflash boot.img.
10.1” LVDS LCD: boot-10.1inch_lvds.img
7” LVDS LCD: boot-7inch_lvds.img
HDMI: boot-hdmi.img
6.2 Audio
aplay -l //view audio equipment
arecord -D hw:1,0 -f cd test.wav //recording. priority: headset > MIC
aplay -D plughw:0,0 test.wav //play record file through HDMI
aplay -D plughw:1,0 test.wav //play record file through earphone
6.3 Video Player
Copy video file to SD card or U-disk then insert it to the board.
Test 1920x1080 (1080P)
gst-play-1.0 --videosink=xvimagesink //XXX is file path
Test 4K (max-fps to 50fps)
export GST_MPP_VIDEODEC_DEFAULT_ARM_AFBC=1 //set AFBC
cat /sys/kernel/debug/dri/0/state | grep "plane\[" //view the plane id (select Cluster0-win0)
GST_DEBUG=*mpp*:4 gst-play-1.0 --flags=3 --videosink="kmssink plane-id=70" /XXX //play video. XXX is the file path
GST_DEBUG=*mpp*:4 gst-play-1.0 --flags=3 --videosink="kmssink plane-id=70" /mnt/sdcard/4K.mp4 --audiosink="alsasink device=hw:1,0" //Specify audio channel output
6.4 SD Card
The SD card is automatically mounted. Compact3566 supports SD Hot-plug.
ls /dev
df -h
ls /mnt/sdcard
6.5 USB Host
Compact3566 features 3x USB2.0 Host(USB OTG can be used for Host). The USB Host can be used to connect USB mouse, USB keyboard, U-Disk or other USB devices.
ls /dev
df -h
USB3.0 Host
6.6 M.2 SATA
Format SSD to ext4 file system on ubuntu system
ls /dev //view the SSD device name
mke2fs -t ext4 /dev/block/nvme0n1 //format ssd to ext4 file system on ubuntu OS
Execute the command to mount SSD.
mkdir /mnt/ssd
mount -t ext4 /dev/nvme0n1 /mnt/ssd
ls /mnt/ssd
6.7 WiFi
Connect the WiFi antenna, execute the command to search for wireless hotspots.
iwlist wlan0 scan //search hotspot
vi /data/cfg/wpa_supplicant.conf //configure hotspot
ifconfig wlan0 down
killall wpa_supplicant
ifconfig wlan0 up
wpa_supplicant -B -i wlan0 -c /data/cfg/wpa_supplicant.conf //connect to the hotspot
ifconfig //view the network status
ping -I wlan0 www.boardcon.com //ping URL to test network
6.8 Bluetooth
Execute the command to open Bluetooth.
hciconfig hci0 up
hciconfig -a
hciconfig hci0 iscan // Allow Bluetooth to be searched
hcitool scan
bluetoothctl // Allow Bluetooth to be pairable
click bluetooth BlueZ 5.62 in phone to pair
Input yes
connect 38:89:2C:24:FB:64 // connect bluetooth
trust 38:89:2C:24:FB:64 // trust bluetooth
6.9 Ethernet
Connect the Board and router with an Ethernet cable (default DHCP=Yes). User can ping URL/IP at terminal.
eg.
ifconfig
ping www.boardcon.com
6.10 RTC
Execute the command hwclock at CRT terminal.
date -s "2023-09-08 12:00:00" //set system time
hwclock -w //synchronize system time and RTC time
hwclock
6.11 UART
The UART loopback test is for reference only.
copy com
to SD card and then insert it to the card slot. Powered on, after the system boot, execute the command to copy com
from SD card to the board.
cp /mnt/sdcard/com /system
chmod 777 /system/com // Modify com file properties
connect the transmit (TX) pin to the receive (RX) pin of UART. After executes the command, input character to test UART.
./system/com /dev/ttyS3 115200 8 0 1 //Test UART3
Press Ctrl+C to exit UART3 testing, execute the command to test UART4.
./system/com /dev/ttyS4 115200 8 0 1 //Test UART4
The method for testing UART5(ttyS5) and UART9(ttyS9) is similar.
6.12 IR
Connect IR receiver to the IR connector. Operate the IR controller and view the received data after execute the command..
echo 1 > /sys/module/rockchip_pwm_remotectl/parameters/code_print
6.13 SPI
Execute the following command after short-circuit SPI0_MOSI_M0 and SPI0_MISO_M0 of SPI0, you can see the change of SPI0 data.
spidev0.0_test
6.14 Camera(OV13850)
grep ov13850 /sys/class/video4linux/v*/name //check device number
grep "" /sys/class/video4linux/v*/name | grep mainpath
gst-launch-1.0 v4l2src device=/dev/video8 ! video/x-raw,format=NV16,width=1280,height=800, framerate=30/1 ! kmssink //preview
gst-launch-1.0 v4l2src device=/dev/video8 num-buffers=100 ! video/x-raw,format=NV12,width=1920,height=1088,framerate=30/1 ! videoconvert ! mpph264enc ! h264parse ! mp4mux ! filesink location=/tmp/h264.mp4 //Video recording
gst-launch-1.0 -v v4l2src device=/dev/video8 num-buffers=10 ! video/x-raw,format=NV12,width=1280,height=800 ! mppjpegenc ! multifilesink location=/tmp/test%05d.jpg //take a picture
Files storage path is /tmp