“MYZR-A40I-EK204 Linux-3.10.65 Test Manual”的版本间的差异

来自明远智睿的wiki
跳转至: 导航搜索
(创建页面,内容为“### Network inferface test   【Test Instructions】: The development board is used to send ICMP messages to the PC for testing<br>   【Interface ID】:1...”)
 
(没有差异)

2022年4月11日 (一) 14:51的最新版本

Network inferface test

  【Test Instructions】: The development board is used to send ICMP messages to the PC for testing
  【Interface ID】:10M/100M Ethernet-1
  【System interface】:eth0
Test operation
  Configure the computer's wired network card IP to 192.168.137.99.
  Connect this network port of the development board to the computer network port with a network cable.
  Configure the development board network port:

=====> input command:
ifconfig eth0 192.168.137.81

  Test network port:

=====> input command:
ping 192.168.137.99 -c 2 -w 4 
=====> output information:
PING 192.168.137.99 (192.168.137.99) 56(84) bytes of data.
64 bytes from 192.168.137.99: icmp_seq=1 ttl=128 time=0.570 ms
64 bytes from 192.168.137.99: icmp_seq=2 ttl=128 time=0.365 ms

--- 192.168.137.99 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.365/0.467/0.570/0.104 ms

Test Results
  “0% packet loss”indicates that the test passed

USB inferface test

  【Test Instructions】:Use the method of plugging and unplugging the USB storage device (USB disk) for testing
  【Interface ID】:USB HOST
  【System interface】:/sys/bus/usb/
Test method
  Insert the USB device into the bottom plate USB interface, the system will output similar information:

root@TinaLinux:/# [  795.551264] ehci_irq: highspeed device connect
[  795.910089] usb 1-1: new high-speed USB device number 4 using sunxi-ehci
[  796.081676] usb-storage 1-1:1.0: USB Mass Storage device detected
[  796.110678] scsi1 : usb-storage 1-1:1.0
[  797.111474] scsi 1:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[  797.140157] sd 1:0:0:0: [sda] 60604416 512-byte logical blocks: (31.0 GB/28.8 GiB)
[  797.156371] sd 1:0:0:0: [sda] Write Protect is off
[  797.161892] sd 1:0:0:0: [sda] Mode Sense: 45 00 00 00
[  797.169966] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  797.251578]  sda: sda1
[  797.260467] CPU1: Booted secondary processor
[  797.271003] sd 1:0:0:0: [sda] Attached SCSI removable disk
[  797.489583]  sda: sda1
[  797.622161] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  797.860430] CPU2: Booted secondary processor
[  797.974464] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

  Pull the USB device from the bottom plate, the system will output similar information:

[  810.557018] ehci_irq: highspeed device disconnect
[  810.562361] usb 1-1: USB disconnect, device number 4
[  810.670680] udevd[2861]: inotify_add_watch(6, /dev/sda, 10) failed: No such file or directory

Test Results
  When the USB storage device is plugged in and out, the system output is similar to the above information, which indicates normal.

TF Interface test

  【Test Instructions】:Test by inserting and identifying the TF card
  【Interface ID】:SD3
  【System interface】:/sys/bus/mmc/

Test method
  Insert TF card into SD3 interface:

=====> output information:
root@TinaLinux:/# [   80.560114] sunxi-mmc sdc0: sdc set ios: clk 0Hz bm PP pm UP vdd 22 width 1 timing LEGACY(SDR12) dt B
[   80.590139] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[   80.620937] sunxi-mmc sdc0: smc 1 p0 err, cmd 52, RTO !!
[   80.627845] sunxi-mmc sdc0: smc 1 p0 err, cmd 52, RTO !!
[   80.634740] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[   80.653529] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[   80.670770] sunxi-mmc sdc0: smc 1 p0 err, cmd 5, RTO !!
[   80.677415] sunxi-mmc sdc0: smc 1 p0 err, cmd 5, RTO !!
[   80.687485] sunxi-mmc sdc0: smc 1 p0 err, cmd 5, RTO !!
[   80.694393] sunxi-mmc sdc0: smc 1 p0 err, cmd 5, RTO !!
[   80.702493] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 15 width 1 timing LEGACY(SDR12) dt B
[   80.714629] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 15 width 1 timing LEGACY(SDR12) dt B
[   80.733353] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 15 width 1 timing LEGACY(SDR12) dt B
[   80.750809] CPU1: Booted secondary processor
[   80.943958] mmc1: host does not support reading read-only switch. assuming write-enable.
[   80.958125] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 15 width 1 timing SD-HS(SDR25) dt B
[   80.970520] sunxi-mmc sdc0: sdc set ios: clk 50000000Hz bm PP pm ON vdd 15 width 1 timing SD-HS(SDR25) dt B
[   80.982111] sunxi-mmc sdc0: sdc set ios: clk 50000000Hz bm PP pm ON vdd 15 width 4 timing SD-HS(SDR25) dt B
[   80.993313] mmc1: new high speed SDHC card at address aaaa
[   80.999904] mmcblk1: mmc1:aaaa SC16G 14.8 GiB 
[   81.013518]  mmcblk1:
[   81.016702] sndhdmi sndhdmi: ASoC: CPU DAI (null) not registered
[   81.023541] sndhdmi sndhdmi: snd_soc_register_card() failed: -517
[   81.030614] platform sndhdmi: Driver sndhdmi requests probe deferral
[   81.103148] FAT-fs (mmcblk1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Eject TF card:

=====> output information:
root@TinaLinux:/# [  147.600144] sunxi-mmc sdc0: smc 1 p0 err, cmd 13, RTO !!
[  147.606083] sunxi-mmc sdc0: smc 1 p0 err, cmd 13, RTO !!
[  147.612251] sunxi-mmc sdc0: smc 1 p0 err, cmd 13, RTO !!
[  147.618180] sunxi-mmc sdc0: smc 1 p0 err, cmd 13, RTO !!
[  147.624573] mmc1: card aaaa removed
[  147.637669] sunxi-mmc sdc0: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B

When the TF storage device is plugged or unplugged, the system outputs similar information as above, which means it is normal.

Standard GPIO test

  【Test Instructions】:Control the output level of GPIO
  【Interface ID】:GPIO/SD2
  【System interface】:/sys/class/gpio/

GPIO output low level test
  How to configure P26:2 as output low level:

=====> Input command:
OUT_IO_OUT_NUM=270
echo ${OUT_IO_OUT_NUM} > /sys/class/gpio/export    
echo "out" > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/direction  
echo 0 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value 

  Test pin P26:2 with a multimeter, if the voltage is 0V, it means OK
GPIO output high level test
  How to configure P26:2 as output high level:

=====> Input command:
OUT_IO_OUT_NUM=270
echo ${OUT_IO_OUT_NUM} > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/direction  
echo 1 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value

  Test pin P26:2 with a multimeter, if the voltage is 3.3V, it means OK
other
  Command to control GPIO output low level:

=====> Input command:
echo 0 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value   

  Command to control GPIO output high level:

=====> Input command:
echo 1 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value 

GPIO-LED Test

  【Test Instructions】:Control LED
  【Interface ID】:LED
  【System interface】:/sys/class/leds/led*
Test operation

​ Control LED off:

echo 1 > /sys/class/leds/led1/brightness
echo 1 > /sys/class/leds/led2/brightness
echo 1 > /sys/class/leds/led3/brightness

​ Control LED on:

echo 0 > /sys/class/leds/led1/brightness
echo 0 > /sys/class/leds/led2/brightness
echo 0 > /sys/class/leds/led3/brightness

GPIO-KEY Test

  【Test Instructions】:Testing with evtest
  【Interface ID】:KEY4, KEY4, KEY3, KEY2, KEY1
  【System interface】:/dev/input/event0
Test operation
  Run evtest to prepare the test

=====> Input command:
evtest 

=====> output information:
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:  sunxi-keyboard
/dev/input/event1:  sunxi-ir
/dev/input/event2:  axp22-powerkey
Select the device event number [0-2]: 

​ Select the serial number corresponding to sunxi-keyboard

=====> Input command:
0

=====> output information:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "sunxi-keyboard"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 28 (KEY_ENTER)
    Event code 102 (KEY_HOME)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 139 (KEY_MENU)
Properties:
Testing ... (interrupt to exit)

​ Press the button on the development board

Event: time 1262304222.998060, type 1 (EV_KEY), code 102 (KEY_HOME), value 1
Event: time 1262304222.998060, -------------- SYN_REPORT ------------
Event: time 1262304223.162092, type 1 (EV_KEY), code 102 (KEY_HOME), value 0
Event: time 1262304223.162092, -------------- SYN_REPORT ------------
Event: time 1262304223.533178, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
Event: time 1262304223.533178, -------------- SYN_REPORT ------------
Event: time 1262304223.697226, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1262304223.697226, -------------- SYN_REPORT ------------
Event: time 1262304224.622976, type 1 (EV_KEY), code 139 (KEY_MENU), value 1
Event: time 1262304224.622976, -------------- SYN_REPORT ------------
Event: time 1262304224.923742, type 1 (EV_KEY), code 139 (KEY_MENU), value 0
Event: time 1262304224.923742, -------------- SYN_REPORT ------------
Event: time 1262304225.818243, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1262304225.818243, -------------- SYN_REPORT ------------
Event: time 1262304226.083851, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1262304226.083851, -------------- SYN_REPORT ------------
Event: time 1262304227.911909, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1262304227.911909, -------------- SYN_REPORT ------------
Event: time 1262304228.165801, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1262304228.165801, -------------- SYN_REPORT ------------

Test results
  When a key is pressed, evtest will output corresponding information.

Serial port test(RS232)

  【Test Instructions】:The serial port is used to test by itself.
  【Interface ID】:UART
  【System interface】:/dev/ttyS4
Test operation
  Short-circuit the sending and receiving pins of serial port 4 (TX and RX pins of RS232)
  Execute the test command:

=====> Input command:
serial_test /dev/ttyS4 "www.myzr.com.cn"

=====> output information:
Starting send data...finish
Starting receive data:
ASCII: 0x77      Character: w 
ASCII: 0x77      Character: w 
ASCII: 0x77      Character: w 
ASCII: 0x2e      Character: . 
ASCII: 0x6d      Character: m 
ASCII: 0x79      Character: y 
ASCII: 0x7a      Character: z 
ASCII: 0x72      Character: r 
ASCII: 0x2e      Character: . 
ASCII: 0x63      Character: c 
ASCII: 0x6f      Character: o 
ASCII: 0x6d      Character: m 
ASCII: 0x2e      Character: . 
ASCII: 0x63      Character: c 
ASCII: 0x6e      Character: n 
ASCII: 0x0   Character: 

Serial test(RS485)

  【Test Instructions】:The serial port is used to test by itself.
  【Interface ID】:UART
  【System interface】:/dev/ttyS5/7
Test operation
  Short-circuit the transmit pin of serial port 5 and the receive pin of serial port 7 (TX pin of 485-1 and RX pin of 485-2)

​  ​Short-circuit the transmit pin of serial port 7 and the receive pin of serial port 5 (TX pin of 485-2 and RX pin of 485-1)

  Execute the test command:

=====> Input command:
cat /dev/ttyS5 &
echo www.myzr.com.cn > /dev/ttyS7
=====> output information:
www.myzr.com.cn

=====> Input command:
killall cat
cat /dev/ttyS7 &
echo www.myzr.com.cn > /dev/ttyS5
=====> output information:
www.myzr.com.cn

RTC Test

  【Test Instructions】:Read and set the time, check whether the time is correct after power off and restart
  【Interface ID】:无
  【System interface】:/sys/class/rtc/
Test operation

  1. Power off and restart the device, check the current system time and hardware time:

=====> Input command: 
date

=====> output information:
Fri Jan  1 08:00:29 CST 2010

  2. View the current RTC chip clock:

=====> Input command: 
hwclock 

=====> output information:
Fri Jan  1 00:00:41 2010  0.000000 seconds

  3. Set the system clock and synchronize to the RTC chip

=====> Input command: 
date -s "2021-05-14 12:34:56" 

=====> output information:
Fri May 14 12:34:59 CST 2021

  4. Write the system clock to the hardware clock

=====> Input command:
hwclock -w  

Test results

  1. Power off and restart the evaluation board to check the current system clock and hardware clock

=====> Input command:
date

=====> output information:
Fri May 14 12:35:34 2021  0.000000 seconds

  2. Check the current RTC chip clock

=====> Input command:
hwclock  

=====> output information:
Fri May 14 12:35:37 2021  0.000000 seconds

  You can see that the time we get is basically the same as the set time.

Audio playback test

  【Test introduction】:Verify the evaluation board's audio playback capabilities by playing an audio file.

Test operation
  Plug the headset into the audio port of the development board.   Execute the test command:

=====> Input command:
aplay /test/test.wav 
=====> output information:
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono

Test results
  After executing the above test command, you will hear the audio output from the audio device

Audio recording test

  【Test introduction】:Verify the evaluation board's audio recording capability by recording and playing the recorded file.
  【Interface ID】:MIC

Test operation

​ Execute test command:

=====> Input command:
arecord -d 5 -f S16_LE -t wav foobar.wav
=====> output information:
Recording WAVE 'foobar.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

​ Play recording:

=====> Input command:
aplay foobar.wav

=====> output information:
Playing WAVE 'foobar.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

Test results
  After executing the above test command you will hear the recording playing.

Display test

  【Test Instructions】:Execute the display program.
  【Interface ID】:lvds/lcd/dsi
  【System interface】:fb0

Test operation

  1. Connect the display after power off
  2. Execute the command
df_andi

WIFI Test

  【Test Instructions】:Use RTL8723du as wireless network card to connect to WIFI AP.
  【Interface ID】:WIFI、WIFI_ANT
  【System interface】:wlan0

Test operation

  1. Make sure that there is a WIFI module attached to the "WIFI" mark, otherwise there is no need to test.
  2. Connect the WIFI antenna to the interface identified by "WIFI_ANT".
=====> Input command:
wifi_connect_ap_test MYZR-WIFI myzr2012

MYZR-WIFI is the WIFI name, myzr2012 is the password

Connection test

=====> Input command:
ping -I wlan0 www.baidu.com -c 2 -w 4

=====> output information:
PING www.baidu.com (163.177.151.109): 56 data bytes
64 bytes from 163.177.151.109: seq=0 ttl=56 time=9.776 ms
64 bytes from 163.177.151.109: seq=1 ttl=56 time=9.620 ms

--- www.baidu.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 9.620/9.698/9.776 ms

Test results
  "0% packet loss" means that the WIFI connection is normal.

Bluetooth test

  【Test description】: After scanning the Bluetooth device, send the L2CAP response request and receive the answer.
  【System equipment】:hci0

  1. Make sure that there is a WIFI module attached to the "WIFI" mark, otherwise there is no need to test.
  2. Connect the WIFI antenna to the interface identified by "WIFI_ANT".

Configuring the Bluetooth System Interface

=====> Input command:
hciconfig hci0 up
hciconfig hci0 piscan
hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 74:EE:2A:45:64:EC  ACL MTU: 1021:8  SCO MTU: 255:12
    UP RUNNING PSCAN ISCAN 
    RX bytes:1403 acl:0 sco:0 events:59 errors:0
    TX bytes:786 acl:0 sco:0 commands:59 errors:0
    Features: 0xff 0xff 0xff 0xfa 0xdb 0xbd 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF PARK 
    Link mode: SLAVE ACCEPT 
    Name: 'RTK_BT_4.1'
    Class: 0x000000
    Service Class[   54.305172] rtk_btcoex: BTCOEX hci_rev 0x82a8
es: Unspecified
    Device Class: [   54.311358] rtk_btcoex: BTCOEX lmp_subver 0x2df4
Miscellaneous, 
    HCI Version: 4.1 (0x7)  Revision: 0x82a8
    LMP Version: 4.1 (0x7)  Subversion: 0x2df4
    Manufacturer: Realtek Semiconductor Corporation (93)

  1. Check the board Bluetooth device information

=====> Input command:

   hcitool dev

=====> output information:

   Devices:
   hci0    74:EE:2A:45:64:EC

 5. Scan for External Bluetooth Devices

=====> Input command:

   hcitool scan

=====> output information:

   Scanning ...
   ......
   7C:2A:DB:08:EF:70    Redmi K30 Pro
    1. Send L2CAP packet test

=====> Input command:

   l2ping  7C:2A:DB:08:EF:70 -c 2

=====> output information:

Ping: 7C:2A:DB:08:EF:70 from 74:EE:2A:45:64:EC (data size 44) ...
44 bytes from 7C:2A:DB:08:EF:70 id 0 time 7.89ms
44 bytes from 7C:2A:DB:08:EF:70 id 1 time 24.88ms
44 bytes from 7C:2A:DB:08:EF:70 id 2 time 9.80ms
^C3 sent, 3 received, 0% loss

Test results
  "0% packet loss" means the bluetooth connection is normal

EC20 module test

  【Test description】:After the 4G connection is successful, the development board sends an ICMP message to the external network to verify that the connection is normal.
  【System equipment】:usb0

Test operation

  1. Power off the development board, connect the 4G module, connect the antenna and insert the SIM card to start the evaluation board.
  2. Use the command to connect to the network:

=====> Input command:

   /etc/quectel-CM

Connection test:

=====> Input command:

   ping www.baidu.com -c 2 -w 4

=====> output information:

   PING www.a.shifen.com (183.232.231.172) from 10.77.19.81 ppp0: 56(84) bytes of data.
   64 bytes from 183.232.231.172: icmp_seq=1 ttl=56 time=197 ms
   --- www.a.shifen.com ping statistics ---
   1 packets transmitted, 1 received, 0% packet loss, time 0ms
   rtt min/avg/max/mdev = 197.497/197.497/197.497/0.000 ms

Test results  
"0% packet loss" means that the WIFI connection is normal.