6. Debian Application
6.1 Display
EM3568 supports HDMI/LVDS dual-display.
If want to make the touch screen available when run the HDMI and LVDS simultaneously, please bind the TP to LVDS as follow.
apt-get update
apt-get install xinput //install xinput
xrandr //list monitors
xinput //view the input device ID
xinput map-to-output [ID] [display name] //bind TP
If only HDMI display is required, user can turn off the LVDS.
echo off > /sys/class/drm/card0-LVDS-1/status
6.2 Audio I/O
cat /proc/asound/cards //view sound card
arecord -Dhw:0,0 -f cd record.wav //record via headset
aplay -Dhw:0,0 record.wav //output via headset or speaker.(Priority: Headphones > Speaker)
aplay -Dhw:1,0 record.wav //output via HDMI
6.3 USB Host
After insert the U-Disk, the device icon will be formed on the desktop.
Two ways to mount the device:
#1 double-click the device icon on the desktop.
#2 double-click the Home icon to enter the main directory, then click Devices to mount.
6.4 SD Card
The mounting method of SD card is similar to the U-disk.
6.5 Ethernet
ifconfig
ping -I eth0 www.boardcon.com //test eth0
ping -I eth1 www.boardcon.com //test eth1
6.6 ADB
Install the ADB driver to the PC before test, then connect PC and board with Micro USB cable.
Open the cmd.exe
on PC, then execute the command to enable ADB.
adb shell
6.7 4G&GPS
Step 1, Insert 4G module to PCIe slot (4G model: EC20/EC25).
Step 2, Connect antenna and insert SIM card.
Step 3, Execute follow command to connect 4G network after power on.
pppd call quectel-ppp & //realize ppp dialing
ifconfig //view network interface status
ping -I ppp0 www.boardcon.com //ping URL/IP to check the connectivity of the detection network
echo -e "AT+QGPS=1\r\n" > /dev/ttyUSB2 //test GPS
cat /dev/ttyUSB1
6.8 SATA
EM3568 debian11 OS only supports etx4 format, please format the SATA device to ext4 before test.
ls /dev/ //view the device name
mke2fs -t ext4 /dev/sda //format SATA to ext4
Mount SATA and test.
mkdir /mnt/sata //create a Mount Point
mount /dev/sda /mnt/sata //mount SATA
ls /mnt/sata //view the contents of the sata
df -h //view the space size of the mounted disk
6.9 Camera(OV13850)
The EM3568 Debian11 OS is configured with two cameras (ov13850) by default. If you need to preview the cameras normally, please connect both cameras.
pidof rkaiq_3A_server //check whether there are threads in rkaiq_3A_server
rkaiq_3A_server has started.
If there are no threads, execute the command to start rkaiq_3A_server.
/etc/init.d/rkaiq_3A.sh start
view the device channel.
grep "" /sys/class/video4linux/v*/name | grep mainpath
grep "" /sys/class/video4linux/v*/name | grep selfpath
Preview camera
gst-launch-1.0 v4l2src device=/dev/video8 ! video/x-raw,format=NV16,width=1280,height=800, framerate=30/1 ! kmssink
gst-launch-1.0 v4l2src device=/dev/video17 ! video/x-raw,format=NV16,width=1280,height=800, framerate=30/1 ! kmssink
Record video
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
Take photo
gst-launch-1.0 -v v4l2src device=/dev/video17 num-buffers=10 ! video/x-raw,format=NV12,width=1280,height=800 ! mppjpegenc ! multifilesink location=/tmp/test%05d.jpg
6.10 WiFi&Bluetooth
Click the network icon in the top right corner of the UI interface, select the SSID from the list of available networks and enter the password.
ifconfig //view the network status
ping -I wlxb66dc25a7822 www.boardcon.com //ping URL to test wifi
Click the Buletooth icon in the top right corner of the UI interface, select Devices
The Bluetooth device name is hidden by default. Set the Bluetooth device name to be visible according to the following settings.
Click Search and select the available device in the list to pair.
6.11 SPI
Short circuit MISO_M1 and MOSI_M1 of SPI
spidev0.0_test //test SPI0
spidev2.0_test //test SPI2
6.12 UART
Short circuit RX and TX of UART, execute the command and input characters to test.
com /dev/ttyS4 115200 8 0 1 //test UART4. **Ctrl+C** to exit the test.
com /dev/ttyS3 115200 8 0 1 //test UART3
com /dev/ttyS5 115200 8 0 1 //test UART5
6.13 RS485
Connect the RS485 ports of Board A and B with the test line.
com /dev/ttyS0 115200 8 0 1
6.14 CAN
Connect the CAN ports of board A and board B.
execute the following commands on the serial terminal of board A and board B.
ip link set can0 down
ip link set can0 type can bitrate 1000000 dbitrate 3000000 fd on
ip link set can0 up
Set one development board as receiver.
candump can0 // set to receiver
The other board send characters as transmitter.
cansend can0 123#DEADBEEF // CAN0 send characters 0xDE 0xAD 0xBE 0xEF
6.15 Keys
Recovery: long press to enter loader mode.
Power: short press to sleep/wake up, long press to shutdown/startup.
Reset: restart the board.
6.16 RTC
The external lithium battery is used to ensure the RTC is still able to work after power off.
busybox date -s “2023-07-21 15:36:00” //set system date
hwclock -w // set the hardware clock to current system time
hwclock
6.17 video playback
6.17.1 Built-in playback
The script instruction directory is in /rockchip-test/video, just run it.
6.17.2 Browser playback
Select the video file to be played, right-click the menu and select Open With Other Application…
Locate the Chromium Browser in the list and open it.
You can click the speaker icon in the upper right corner of the desktop to select the audio output channel.
user can also start the browser with a command to play.
chromium /media/linaro/144460C44460AA66/video/4KP30/4K30P-BLACKPINK-DDU-DU_DDU-DU.mp4
6.17.3 gst-play-1.0 playback
If some video chromium browser can’t play normally, user can use gst-play-1.0 to play.
cat /sys/kernel/debug/dri/0/state | grep "plane\[" // Select the display for playback
export GST_MPP_VIDEODEC_DEFAULT_ARM_AFBC=1 // Be sure to open AFBC
GST_DEBUG=*mpp*:4 gst-play-1.0 --flags=3 --videosink="kmssink plane-id=129" /media/linaro/144460C44460AA66/video/H265_HEVC/I.O.I-Dream.Girl.2160p.UHDTV.H265.ts --audiosink="alsasink device=hw:1,0" // Select sound card 4, audio output via HDMI