03-Functional_Testing
LCD
Hardware Connection

Display Test
fbinit
echo 8 > /sys/devices/virtual/disp/disp/attr/colorbar 
Touch Test
ts_test Click the "Draw" button to display touch trajectories:

Backlight Control
/usr/bin/lcd_bright_test 2 255 # Max brightness
/usr/bin/lcd_bright_test 2 0 # Min brightness Headphone
tinymix set "Headphone Switch" 1
aplay -Dhw:audiocodec -vv /etc/sample-15s.wav 
Speaker

Play Audio
aplay -Dhw:audiocodec -vv /etc/sample-15s.wav Microphone
Record & Playback
arecord -Dhw:audiocodec -f S24_LE -r 16000 -vvv test.wav
aplay -Dhw:audiocodec -vv test.wav WiFi
Configure WiFi
# Modify WiFi name and password
vi /etc/wpa_supplicant.conf
cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid="wifi_oranth_2.4"
psk="123456789"
key_mgmt=WPA-PSK
}
# Connect to WiFi
wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B
udhcpc -i wlan0 
Bluetooth
hciconfig -a
hciconfig hci0 up
hcitool scan 
RTC
Power-off Time Retention Test
Set system time and sync to RTC:
date -s "2024-11-06 10:30:00" && hwclock -w -f /dev/rtc1 Power off the board, wait, then power it back on.
Verify time consistency:
date && hwclock -f /dev/rtc1 4G Module
Check Connectivity
lsusb # Verify USB module detection
ls /dev/ttyUSB* # Check serial port nodes
pppd call quectel-ppp & # Dial-up
ping www.baidu.com # Test network
# Troubleshooting
ps -ef | grep pppd # Find process ID
kill -9 <PID> # Terminate process
pppd call quectel-ppp & # Redial SD Card
Speed Test Insert a formatted SD card (auto-mounted):
time dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=300 oflag=direct 
USB
Speed Test Insert a formatted USB drive (auto-mounted):
time dd if=/dev/zero of=/dev/sda bs=1M count=300 oflag=direct 
CAN Bus
Loopback Test
Connect CANL-to-CANL and CANH-to-CANH:

Initialize CAN interfaces:
# CAN0
ip link set can0 down
ip link set can0 type can bitrate 500000
ip link set can0 up
# CAN1
ip link set can1 down
ip link set can1 type can bitrate 500000
ip link set can1 up Start testing (CAN0 receive, CAN1 transmit):
candump can0 &
cansend can1 123#DEADBEEF 
Last updated