6. Debian Application

6.1 Display

EM3566 supports HDMI/LVDS/MIPI display.

Debian_HDMI_Display

Note

The Boardcon factory default HDMI display. If change to LVDS/MIPI LCD, please reflash the corresponding boot.img.

10.1” LVDS LCD: boot_10.1inch_lvds.img

10.1” MIPI LCD: boot_10.1inch_mipi.img

7” LVDS LCD: boot_7inch_lvds.img

HDMI: boot_hdmi.img

reflash_boot

6.2 SD Card

The EM3566 supports SD Hot-plug.

Debian_test_SD _images/image086.png

6.3 USB Host

The USB Host can be used to connect USB mouse, USB keyboard, U-Disk or other USB devices.

Debian_Test_USB

6.4 video Player

Copy video file to SD card/U-disk then insert it to the board. After system boot execute the command to test. Video file path /media/linaro/XXX(device name)/xx.mp4

Test 1920 x 1080

gst-play-1.0 --flags=3 --videosink=xvimagesink /usr/local/test.mp4  //test.mp4 is the video test file of system
Debian_Test_video Debian_Test_video

or

gst-play-1.0 --videosink=xvimagesink XXX  //Video file path ``/media/linaro/XXX(device name)/xx.mp4``
_images/Debian_Test_video.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\["
GST_DEBUG=*mpp*:4 gst-play-1.0 --flags=3 --videosink="kmssink plane-id=70" /XXX
GST_DEBUG=*mpp*:4 gst-play-1.0 --flags=3 --videosink="kmssink plane-id=70" /media/linaro/NEW/4K.mp4 --audiosink="alsasink device=hw:1,0"
_images/image090-0.png Debian_Test_4K

6.5 Ethernet

Connect the Board and router with an Ethernet cable (default DHCP=Yes). User can ping URL/IP at terminal, or open the browser to test Network.

ifconfig
ping www.boardcon.com
Debian_Test_Ethernet ping URL

6.6 Record

The EM3566 supports record Audio from headphone jack. Insert the micphone into the jack on the board, then excute the commands to record and play.

aplay -l                                                    //view sound card devices
arecord -Dhw:1,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav  //record and save as test.wav
aplay test.wav                                              //play test.wav and output via HDMI
aplay -Dhw:1,0 test.wav                                     //output via headphone
_images/record_test1.png _images/record_test2.png _images/record_test3.png _images/record_test4.png

6.7 RTC

busybox date -s “2022-12-06 12:00:00”      //set system date
hwclock -w                   // set the hardware clock to current system time
hwclock

Wait a moment then run hwclock again, it can be seen the time has changed.

Debian_Test_RTC

6.8 WiFi

Connect the WiFi antenna, then 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.

After connected, user can ping URL/IP at terminal.

Debian_Test_WIFI _images/Debian_wifi_password.png
ifconfig
ping www.boardcon.com
Debian_Test_WIFI_2 Debian_Test_WIFI_2

6.9 Bluetooth

Click the Buletooth icon in the top right corner of the UI interface, click Search and select the available device in the list to pair.

_images/image097.png _images/image099.png

or click Applications-Settings-Bluetooth Manager to search and pair Bluetooth devices

_images/Search-BT.png

6.10 RS485

This test method is only for reference.

Step1, connect the RS485 ports of Board A and B with the test line.

CAN connect

Step2, push the file com into board A and board B via ADB

adb root
adb remount
adb push \xx\com /system      //\xx\ is the absolute path to store file
adb shell
chmod 777 /system/com         //Modify com properties

or 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 /media/linaro/B412-0218/com /system
ls
chmod 777 /system/com           //Modify com properties

Step3, after execute command at Serial terminal, input character to test RS485 communication

./system/com /dev/ttyS3 115200 8 0 1
_images/RS485_Debian.png

6.11 UART

The UART loopback test is for reference only.

Step 1, connect the transmit (TX) pin to the receive (RX) pin of UART

Step 2, after executes the command, input character to test UART.

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

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

./system/com /dev/ttyS5 115200 8 0 1   //Test UART5
_images/image100-1.png

6.12 M.2 NVMe SSD

EM3566 only supports ext4 format. Format SSD to ext4 file system on ubuntu system.

eg.

ls /dev/block/                        //view the SSD device name
mke2fs -t ext4 /dev/block/nvme0n1     //format SSD to ext4

Mount SSD and test.

mkdir /mnt/ssd                          //create a Mount Point
mount -t ext4 /dev/nvme0n1 /mnt/ssd     //mount SSD
ls /mnt/ssd
Debian_Test_SSD

6.13 4G

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.

ifconfig eth0 down              //turn off eth0 to avoid DNS conflicts
cd  /etc/ppp/peers
pppd call quectel-ppp &         //realize ppp dialing
ifconfig                        //view network interface status
ping www.boardcon.com           //ping URL/IP to check the connectivity of the detection network
Debian_Test_4G Debian_Test_4G

6.14 GPS

echo -e "AT+QGPS=1\r\n" > /dev/ttyUSB2
cat /dev/ttyUSB1
Debian_Test_GPS

6.15 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
Debian_Test_IR

6.16 ADC

ADC test

Test SARADC_VIN2

cat /sys/devices/platform/fe720000.saradc/iio:device0/in_voltage2_raw
ADC test

Connect SARADC_VIN2 to VDDIO_18, execute command again

cat /sys/devices/platform/fe720000.saradc/iio:device0/in_voltage2_raw
ADC test

Connect SARADC_VIN2 to GND, then execute command

cat /sys/devices/platform/fe720000.saradc/iio:device0/in_voltage2_raw
ADC test

Test SARADC_VIN3

cat /sys/devices/platform/fe720000.saradc/iio:device0/in_voltage3_raw

6.17 Camera(OV13850)

grep ov13850 /sys/class/video4linux/v*/name                 //check camera 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    //record video
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
_images/check_camera_device_number.png _images/preview.png

the files are saved in /tmp

_images/files_path.png