6. Buildroot Application

6.1 HDMI Display

Connect the board and monitor with a HDMI cable, then start up.

HDMI Display

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

_images/buildroot_flash_boot.png

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
_images/buildroot_view_audio_equipment.png
_images/buildroot_record.png
_images/buildroot_hdmi_play_record.png

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
_images/buildroot_16.png

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
Video Player
_images/buildroot_Video_1.png
_images/buildroot_Video_2.png

6.4 SD Card

The SD card is automatically mounted. Compact3566 supports SD Hot-plug.

ls /dev
df -h
ls /mnt/sdcard
_images/buildroot_SD.png
_images/buildroot_SD_1.png

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
_images/Buildroot_USB_1.png

USB3.0 Host

_images/Buildroot_USB_2.png
_images/Buildroot_USB_3.png

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
_images/buildroot_34.png

Execute the command to mount SSD.

mkdir /mnt/ssd
mount -t ext4 /dev/nvme0n1 /mnt/ssd
ls /mnt/ssd
_images/buildroot_35.png

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
search hotspot
configure hotspot
wifi restart and connect
_images/buildroot_wifi_test.png

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
Bluetooth test
_images/BT_2.png

click bluetooth BlueZ 5.62 in phone to pair

_images/BT_3.png

Input yes

connect 38:89:2C:24:FB:64     // connect bluetooth
trust 38:89:2C:24:FB:64       // trust bluetooth
_images/BT_4.png

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
_images/buildroot_18.png
_images/buildroot_19.png

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
_images/buildroot_24.png

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
_images/buildroot_Test_UART3.png

Press Ctrl+C to exit UART3 testing, execute the command to test UART4.

./system/com /dev/ttyS4 115200 8 0 1   //Test UART4
_images/buildroot_Test_UART4.png

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
_images/buildroot_IR.png

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
_images/buildroot_SPI.png

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

_images/buildroot_check_device_number.png
_images/buildroot_preview.png
_images/buildroot_Files_path.png