Compare commits
No commits in common. "bpi-r4" and "bpi-r4pro" have entirely different histories.
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"idf.pythonInstallPath": "C:\\Users\\Qubot\\.espressif\\tools\\idf-python\\3.11.2\\python.exe"
|
||||
}
|
||||
186
26pin-script/26pin-script.sh
Normal file
186
26pin-script/26pin-script.sh
Normal file
@ -0,0 +1,186 @@
|
||||
#/bin/bash
|
||||
|
||||
PIN26_PIN03=18
|
||||
PIN26_PIN05=17
|
||||
PIN26_PIN07=62
|
||||
PIN26_PIN11=81
|
||||
PIN26_PIN13=80
|
||||
PIN26_PIN15=50
|
||||
PIN26_PIN19=30
|
||||
PIN26_PIN21=29
|
||||
PIN26_PIN23=31
|
||||
|
||||
PIN26_PIN08=59 ## invalid ##
|
||||
PIN26_PIN10=58 ## invalid ##
|
||||
PIN26_PIN12=51
|
||||
PIN26_PIN16=61 ## invalid ##
|
||||
PIN26_PIN18=60 ## invalid ##
|
||||
PIN26_PIN22=53
|
||||
PIN26_PIN24=28
|
||||
PIN26_PIN26=52
|
||||
|
||||
RET=0
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "#########################################################################"
|
||||
echo "########################## 26PIN Testing Start ##########################"
|
||||
|
||||
source `pwd`/mt_gpio.sh
|
||||
|
||||
#############################################################################
|
||||
if [ ! -f /sys/class/gpio/gpio530/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN03} #Enable PIN26_PIN03 512 + 18 = 530
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio529/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN05} #Enable PIN26_PIN05 512 + 17 = 529
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio574/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN07} #Enable PIN26_PIN07 512 + 62 = 574
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio593/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN11} #Enable PIN26_PIN11 512 + 81 = 593
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio592/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN13} #Enable PIN26_PIN13 512 + 80 = 592
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio562/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN15} #Enable PIN26_PIN15 512 + 50 = 562
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio542/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN19} #Enable PIN26_PIN19 512 + 30 = 542
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio541/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN21} #Enable PIN26_PIN21 512 + 29 = 541
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio543/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN23} #Enable PIN26_PIN23 512 + 31 = 543
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
if [ ! -f /sys/class/gpio/gpio563/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN12} #Enable PIN26_PIN12 512 + 51 = 563
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio565/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN22} #Enable PIN26_PIN22 512 + 53 = 565
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio540/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN24} #Enable PIN26_PIN24 512 + 28 = 540
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio564/direction ]; then
|
||||
mt_gpio_export ${PIN26_PIN26} #Enable PIN26_PIN26 512 + 52 = 564
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
mt_gpio_dir ${PIN26_PIN03} out
|
||||
mt_gpio_dir ${PIN26_PIN05} out
|
||||
mt_gpio_dir ${PIN26_PIN07} out
|
||||
mt_gpio_dir ${PIN26_PIN11} out
|
||||
mt_gpio_dir ${PIN26_PIN13} out
|
||||
mt_gpio_dir ${PIN26_PIN15} out
|
||||
mt_gpio_dir ${PIN26_PIN19} out
|
||||
mt_gpio_dir ${PIN26_PIN21} out
|
||||
mt_gpio_dir ${PIN26_PIN23} out
|
||||
|
||||
mt_gpio_dir ${PIN26_PIN12} out
|
||||
mt_gpio_dir ${PIN26_PIN22} out
|
||||
mt_gpio_dir ${PIN26_PIN24} out
|
||||
mt_gpio_dir ${PIN26_PIN26} out
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "### All 26PIN LED turn on about 10s ###"
|
||||
mt_gpio_out ${PIN26_PIN03} 1
|
||||
mt_gpio_out ${PIN26_PIN05} 1
|
||||
mt_gpio_out ${PIN26_PIN07} 1
|
||||
mt_gpio_out ${PIN26_PIN11} 1
|
||||
mt_gpio_out ${PIN26_PIN13} 1
|
||||
mt_gpio_out ${PIN26_PIN15} 1
|
||||
mt_gpio_out ${PIN26_PIN19} 1
|
||||
mt_gpio_out ${PIN26_PIN21} 1
|
||||
mt_gpio_out ${PIN26_PIN23} 1
|
||||
|
||||
mt_gpio_out ${PIN26_PIN12} 1
|
||||
mt_gpio_out ${PIN26_PIN22} 1
|
||||
mt_gpio_out ${PIN26_PIN24} 1
|
||||
mt_gpio_out ${PIN26_PIN26} 1
|
||||
sleep 10
|
||||
|
||||
echo "### All 26PIN LED turn off about 5s ###"
|
||||
mt_gpio_out ${PIN26_PIN03} 0
|
||||
mt_gpio_out ${PIN26_PIN05} 0
|
||||
mt_gpio_out ${PIN26_PIN07} 0
|
||||
mt_gpio_out ${PIN26_PIN11} 0
|
||||
mt_gpio_out ${PIN26_PIN13} 0
|
||||
mt_gpio_out ${PIN26_PIN15} 0
|
||||
mt_gpio_out ${PIN26_PIN19} 0
|
||||
mt_gpio_out ${PIN26_PIN21} 0
|
||||
mt_gpio_out ${PIN26_PIN23} 0
|
||||
|
||||
mt_gpio_out ${PIN26_PIN12} 0
|
||||
mt_gpio_out ${PIN26_PIN22} 0
|
||||
mt_gpio_out ${PIN26_PIN24} 0
|
||||
mt_gpio_out ${PIN26_PIN26} 0
|
||||
sleep 5
|
||||
|
||||
echo "### All 26PIN lED turn on ###"
|
||||
mt_gpio_out ${PIN26_PIN03} 1
|
||||
mt_gpio_out ${PIN26_PIN05} 1
|
||||
mt_gpio_out ${PIN26_PIN07} 1
|
||||
mt_gpio_out ${PIN26_PIN11} 1
|
||||
mt_gpio_out ${PIN26_PIN13} 1
|
||||
mt_gpio_out ${PIN26_PIN15} 1
|
||||
mt_gpio_out ${PIN26_PIN19} 1
|
||||
mt_gpio_out ${PIN26_PIN21} 1
|
||||
mt_gpio_out ${PIN26_PIN23} 1
|
||||
|
||||
mt_gpio_out ${PIN26_PIN12} 1
|
||||
mt_gpio_out ${PIN26_PIN22} 1
|
||||
mt_gpio_out ${PIN26_PIN24} 1
|
||||
mt_gpio_out ${PIN26_PIN26} 1
|
||||
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please confirm if All 26PIN LED can work fine, enter y or n. "y" is good, "n" is for bad. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ${keypress} == 'y' ]; then
|
||||
echo " "
|
||||
echo " "
|
||||
echo "### All 26PIN LED can work fine, All 26PIN LED feature is good ### "
|
||||
break
|
||||
fi
|
||||
|
||||
if [ ${keypress} == 'n' ]; then
|
||||
RET=1
|
||||
echo " "
|
||||
echo " "
|
||||
echo "Error Notice: All 26PIN LED can not work fine, All 26PIN LED feature is bad"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
@ -1,265 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
### GPIO 18 - LED high, light on ###
|
||||
### GPIO 17 - LED high, light on ###
|
||||
### GPIO 62 - LED high, light on ###
|
||||
|
||||
### GPIO 81 - LED high, light on ###
|
||||
### GPIO 80 - LED high, light on ###
|
||||
### GPIO 50 - LED high, light on ###
|
||||
|
||||
### GPIO 30 - LED high, light on ###
|
||||
### GPIO 29 - LED high, light on ###
|
||||
### GPIO 31 - LED high, light on ###
|
||||
|
||||
### GPIO 59 - LED high, light on ###
|
||||
### GPIO 58 - LED high, light on ###
|
||||
### GPIO 51 - LED high, light on ###
|
||||
|
||||
### GPIO 61 - LED high, light on ###
|
||||
### GPIO 60 - LED high, light on ###
|
||||
|
||||
### GPIO 53 - LED high, light on ###
|
||||
### GPIO 28 - LED high, light on ###
|
||||
### GPIO 52 - LED high, light on ###
|
||||
|
||||
|
||||
RET=0
|
||||
EXP_GPIO18=18
|
||||
EXP_GPIO17=17
|
||||
EXP_GPIO62=62
|
||||
|
||||
EXP_GPIO81=81
|
||||
EXP_GPIO80=80
|
||||
EXP_GPIO50=50
|
||||
|
||||
EXP_GPIO30=30
|
||||
EXP_GPIO29=29
|
||||
EXP_GPIO31=31
|
||||
|
||||
EXP_GPIO59=59
|
||||
EXP_GPIO58=58
|
||||
EXP_GPIO51=51
|
||||
|
||||
EXP_GPIO61=61
|
||||
EXP_GPIO60=60
|
||||
|
||||
EXP_GPIO53=53
|
||||
EXP_GPIO28=28
|
||||
EXP_GPIO52=52
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
source `pwd`/mt_gpio.sh
|
||||
|
||||
####################################################################################################
|
||||
if [ ! -f /sys/class/gpio/gpio446/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO18} ### EXP_GPIO18 428 + 18 = 446
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio445/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO17} ### EXP_GPIO17 428 + 17 = 445
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio490/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO62} ### EXP_GPIO62 428 + 62 = 490
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio509/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO81} ### EXP_GPIO81 428 + 81 = 509
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio508/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO80} ### EXP_GPIO80 428 + 80 = 508
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio478/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO50} ### EXP_GPIO50 428 + 50 = 478
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio458/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO30} ### EXP_GPIO30 428 + 30 = 458
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio457/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO29} ### EXP_GPIO29 428 + 29 = 457
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio459/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO31} ### EXP_GPIO31 428 + 31 = 459
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio487/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO59} ### EXP_GPIO59 428 + 59 = 487
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio486/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO58} ### EXP_GPIO58 428 + 58 = 486
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio479/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO51} ### EXP_GPIO51 428 + 51 = 479
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio489/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO61} ### EXP_GPIO61 428 + 61 = 489
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio488/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO60} ### EXP_GPIO60 428 + 60 = 488
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio481/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO53} ### EXP_GPIO53 428 + 53 = 481
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio456/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO28} ### EXP_GPIO28 428 + 28 = 456
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio480/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO52} ### EXP_GPIO52 428 + 52 = 480
|
||||
fi
|
||||
|
||||
|
||||
####################################################################################################
|
||||
mt_gpio_dir ${EXP_GPIO18} out
|
||||
mt_gpio_dir ${EXP_GPIO17} out
|
||||
mt_gpio_dir ${EXP_GPIO62} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO81} out
|
||||
mt_gpio_dir ${EXP_GPIO80} out
|
||||
mt_gpio_dir ${EXP_GPIO50} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO30} out
|
||||
mt_gpio_dir ${EXP_GPIO29} out
|
||||
mt_gpio_dir ${EXP_GPIO31} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO59} out
|
||||
mt_gpio_dir ${EXP_GPIO58} out
|
||||
mt_gpio_dir ${EXP_GPIO51} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO61} out
|
||||
mt_gpio_dir ${EXP_GPIO60} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO53} out
|
||||
mt_gpio_dir ${EXP_GPIO28} out
|
||||
mt_gpio_dir ${EXP_GPIO52} out
|
||||
|
||||
|
||||
####################################################################################################
|
||||
echo "########################## 26PIN GPIO Expand Board Testing Start ##########################"
|
||||
|
||||
echo "### 26PIN Expand Board's all LED turn on about 10s ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
mt_gpio_out ${EXP_GPIO17} 1
|
||||
mt_gpio_out ${EXP_GPIO62} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 1
|
||||
mt_gpio_out ${EXP_GPIO80} 1
|
||||
mt_gpio_out ${EXP_GPIO50} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 1
|
||||
mt_gpio_out ${EXP_GPIO29} 1
|
||||
mt_gpio_out ${EXP_GPIO31} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 1
|
||||
mt_gpio_out ${EXP_GPIO58} 1
|
||||
mt_gpio_out ${EXP_GPIO51} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 1
|
||||
mt_gpio_out ${EXP_GPIO60} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 1
|
||||
mt_gpio_out ${EXP_GPIO28} 1
|
||||
mt_gpio_out ${EXP_GPIO52} 1
|
||||
|
||||
sleep 10
|
||||
echo "### 26PIN Expand Board's all LED turn off about 5s ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 0
|
||||
mt_gpio_out ${EXP_GPIO17} 0
|
||||
mt_gpio_out ${EXP_GPIO62} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 0
|
||||
mt_gpio_out ${EXP_GPIO80} 0
|
||||
mt_gpio_out ${EXP_GPIO50} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 0
|
||||
mt_gpio_out ${EXP_GPIO29} 0
|
||||
mt_gpio_out ${EXP_GPIO31} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 0
|
||||
mt_gpio_out ${EXP_GPIO58} 0
|
||||
mt_gpio_out ${EXP_GPIO51} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 0
|
||||
mt_gpio_out ${EXP_GPIO60} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 0
|
||||
mt_gpio_out ${EXP_GPIO28} 0
|
||||
mt_gpio_out ${EXP_GPIO52} 0
|
||||
|
||||
sleep 5
|
||||
echo "### 26PIN Expand Board's all LED turn on ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
mt_gpio_out ${EXP_GPIO17} 1
|
||||
mt_gpio_out ${EXP_GPIO62} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 1
|
||||
mt_gpio_out ${EXP_GPIO80} 1
|
||||
mt_gpio_out ${EXP_GPIO50} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 1
|
||||
mt_gpio_out ${EXP_GPIO29} 1
|
||||
mt_gpio_out ${EXP_GPIO31} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 1
|
||||
mt_gpio_out ${EXP_GPIO58} 1
|
||||
mt_gpio_out ${EXP_GPIO51} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 1
|
||||
mt_gpio_out ${EXP_GPIO60} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 1
|
||||
mt_gpio_out ${EXP_GPIO28} 1
|
||||
mt_gpio_out ${EXP_GPIO52} 1
|
||||
|
||||
|
||||
sleep 2
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please confirm if Expand Board's LED can work fine, enter y or n. "y" is good, "n" is for bad. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ${keypress} == 'y' ]; then
|
||||
echo " "
|
||||
echo " "
|
||||
echo "### Expand Board's LED can work fine, 26PIN GPIO feature is good ### "
|
||||
break
|
||||
fi
|
||||
|
||||
if [ ${keypress} == 'n' ]; then
|
||||
RET=1
|
||||
echo " "
|
||||
echo " "
|
||||
echo "Error Notice: Expand Board'sLED can not work fine, 26PIN GPIO feature is bad"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
BIN
R4Pro产测增加功能.docx
Normal file
BIN
R4Pro产测增加功能.docx
Normal file
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
#/bin/bash
|
||||
|
||||
### This tool is for BPI-R4 function test in manufacturer ###
|
||||
### This tool is for BPI-R4PRO 8X function test in manufacturer ###
|
||||
RET=0
|
||||
PREFIX=`pwd`/
|
||||
DEUBGFILE=/var/run/r4-ft-script.log
|
||||
DEUBGFILE=/var/run/r4pro-8x-ft-script.log
|
||||
|
||||
AUTOMATIC_CASE_NUM=0
|
||||
MANUAL_CASE_NUM=0
|
||||
@ -15,7 +15,7 @@ echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
echo "######################## BPI-R4 Function Testing Start ########################"
|
||||
echo "####################### BPI-R4PRO-8X Function Testing Start ########################"
|
||||
### Sets QUIT variable so script will finish. ###
|
||||
quit()
|
||||
{
|
||||
@ -78,8 +78,8 @@ run_script()
|
||||
step_automatic_func()
|
||||
{
|
||||
TITLE="Automatic Test Cases"
|
||||
AUTOMATIC_CASE_NUM=9
|
||||
CASE_NUM=9
|
||||
AUTOMATIC_CASE_NUM=10
|
||||
CASE_NUM=10
|
||||
|
||||
TEXT_1="Memory_Test_Case"
|
||||
FUNC_1="memory-script"
|
||||
@ -93,11 +93,11 @@ step_automatic_func()
|
||||
TEXT_4="miniPCIeUSB_Test_Case"
|
||||
FUNC_4="minipcieusb-script"
|
||||
|
||||
TEXT_5="NVME_Test_Case"
|
||||
FUNC_5="nvme-script"
|
||||
TEXT_5="NAND_Test_Case"
|
||||
FUNC_5="nand-script"
|
||||
|
||||
TEXT_6="NAND_Test_sase"
|
||||
FUNC_6="nand-script"
|
||||
TEXT_6="NVME_Test_Case"
|
||||
FUNC_6="nvme-script"
|
||||
|
||||
TEXT_7="EMMC_Test_sase"
|
||||
FUNC_7="emmc-script"
|
||||
@ -107,14 +107,17 @@ step_automatic_func()
|
||||
|
||||
TEXT_9="EEPROM_Test_sase"
|
||||
FUNC_9="eeprom-script"
|
||||
|
||||
TEXT_10="USIM_Test_sase"
|
||||
FUNC_10="usim-script"
|
||||
}
|
||||
|
||||
### Options for manual test cases ###
|
||||
step_manual_func()
|
||||
{
|
||||
TITLE="Manual Test Cases"
|
||||
MANUAL_CASE_NUM=10
|
||||
CASE_NUM=10
|
||||
MANUAL_CASE_NUM=9
|
||||
CASE_NUM=9
|
||||
|
||||
TEXT_1="FAN_Test_Case"
|
||||
FUNC_1="fan-script"
|
||||
@ -125,26 +128,23 @@ step_manual_func()
|
||||
TEXT_3="KEY_Test_Case"
|
||||
FUNC_3="key-script"
|
||||
|
||||
TEXT_4="USB30_Test_Case"
|
||||
FUNC_4="usb30-script"
|
||||
TEXT_4="USB20_Test_Case"
|
||||
FUNC_4="usb20-script"
|
||||
|
||||
TEXT_5="USB20_Test_Case"
|
||||
FUNC_5="usb20-script"
|
||||
TEXT_5="USB30_Test_Case"
|
||||
FUNC_5="usb30-script"
|
||||
|
||||
TEXT_6="Ethernet_Test_Case"
|
||||
FUNC_6="ethernet-script"
|
||||
|
||||
TEXT_7="26PINGPIO_Test_Case"
|
||||
FUNC_7="26pingpio-script"
|
||||
TEXT_7="M2KeyB_USB2_Test_Case"
|
||||
FUNC_7="m2keybusb2-script"
|
||||
|
||||
TEXT_8="M2KeyB_PCIE_Test_Case"
|
||||
FUNC_8="m2keybpcie-script"
|
||||
TEXT_8="M2KeyB_USB3_Test_Case"
|
||||
FUNC_8="m2keybusb3-script"
|
||||
|
||||
TEXT_9="M2KeyB_USB2_Test_Case"
|
||||
FUNC_9="m2keybusb2-script"
|
||||
|
||||
TEXT_10="M2KeyB_USB3_Test_Case"
|
||||
FUNC_10="m2keybusb3-script"
|
||||
TEXT_9="26PIN_Test_Case"
|
||||
FUNC_9="26pin-script"
|
||||
}
|
||||
|
||||
STEPS_1="step_automatic_func"
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
#/bin/bash
|
||||
|
||||
SYS_FILE=/sys/devices/platform/11005000.i2c/i2c-1
|
||||
SYS_FILE=/sys/bus/i2c/devices
|
||||
RET=0
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "###################### BPI-R4 EEPROM 0x57 Testing Start ############################"
|
||||
echo "################### BPI-R4PRO EEPROM 0x57 Testing Start ###########################"
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-2/2-0057/eeprom ]; then
|
||||
echo "### BPI-R4 eeprom 0x57 can't work fine ###"
|
||||
if [ ! -f ${SYS_FILE}/i2c-3/3-0057/eeprom ]; then
|
||||
echo "### BPI-R4PRO eeprom 0x57 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 eeprom 0x57 can work fine ###"
|
||||
echo "### BPI-R4PROe eeprom 0x57 can work fine ###"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
|
||||
@ -9,7 +9,7 @@ echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
echo "########################## EMMC Deivce Testing Start ##########################"
|
||||
echo "########################## EMMC Deivce Testing Start #################################"
|
||||
|
||||
dd if=/dev/mmcblk0boot0 of=/tmp/.emmc_test.img bs=1M count=1
|
||||
if [ $? == 0 ]; then
|
||||
|
||||
@ -23,7 +23,7 @@ echo "########################## Network ethernet Testing Start ################
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please confirm if all 1G and 10G RJ45 cable insert one right position, then enter any key to continue. ###" keypress
|
||||
read -t20 -s -n1 -p "### Please confirm if all 1G, 2.5G 10G RJ45 cable insert one right position, then enter any key to continue. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
echo " "
|
||||
break
|
||||
@ -33,68 +33,88 @@ done
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 10G SFP+ WAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth2
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 10G SFP+ WAN DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 10G SFP+ WAN DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 10G SFP+ LAN Testing ####"
|
||||
echo "### Ethernet 10G WAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth1
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 10G SFP+ LAN DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 10G WAN DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 10G SFP+ LAN DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 10G WAN DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 0 Testing ####"
|
||||
udhcpc -t 5 -n -i lan0
|
||||
echo "### Ethernet 10G LAN ETH6 Testing ####"
|
||||
udhcpc -t 5 -n -i mxl_lan5
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 0 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 10G LAN ETH6 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 0 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 10G LAN ETH6 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 1 Testing ####"
|
||||
udhcpc -t 5 -n -i lan1
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH1 Testing ####"
|
||||
udhcpc -t 5 -n -i mxl_lan0
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 1 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH1 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 1 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 2.5G RJ45 LAN ETH1 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 2 Testing ####"
|
||||
udhcpc -t 5 -n -i lan2
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH2 Testing ####"
|
||||
udhcpc -t 5 -n -i mxl_lan1
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 2 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 2.%G RJ45 LAN ETH2 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 2 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 2.5G RJ45 LAN ETH2 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 3 Testing ####"
|
||||
udhcpc -t 5 -n -i lan3
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH3 Testing ####"
|
||||
udhcpc -t 5 -n -i mxl_lan2
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 3 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH3 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 2.5G RJ45 LAN ETH3 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH4 Testing ####"
|
||||
udhcpc -t 5 -n -i mxl_lan3
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 2.5G RJ45 LAN ETH4 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 3 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 2.5G RJ45 LAN ETH4 DHCP can not got ip address failure"
|
||||
fi
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN0 ETH5 Testing ####"
|
||||
udhcpc -t 5 -n -i lan0
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN ETH5 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN ETH5 DHCP can not got ip address failure"
|
||||
fi
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G FPC LAN3 Testing ####"
|
||||
udhcpc -t 5 -n -i lan3
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G FPC LAN3 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G FPC LAN3 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
|
||||
@ -7,26 +7,18 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## FAN PWM Testing Start ##########################"
|
||||
echo "######################## BPI-R4PRO FAN PWM Testing Start ########################"
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export 2> /dev/null
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period 2> /dev/null
|
||||
echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity 2> /dev/null
|
||||
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable 2> /dev/null
|
||||
sleep 1
|
||||
|
||||
echo "### Turn off the FAN about 5s by PWM0 ###"
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo "### Speed down the FAN slow about 5s by PWM0 ###"
|
||||
echo 0 > /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 2> /dev/null
|
||||
sleep 5
|
||||
|
||||
echo "### Turn on the FAN about 10s by PWM0 ###"
|
||||
#echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo 0 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo "### Speed up the FAN fast about 10s by PWM0 ###"
|
||||
echo 255 > /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 2> /dev/null
|
||||
sleep 10
|
||||
|
||||
echo "### Turn off the FAN completely ###"
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo "### Speed down the FAN slow by PWM0 completely ###"
|
||||
echo 0 > /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 2> /dev/null
|
||||
|
||||
while true
|
||||
do
|
||||
@ -51,8 +43,6 @@ do
|
||||
echo " "
|
||||
done
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/unexport 2> /dev/null
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
RET=0
|
||||
KEY_GPIO_WPS=14
|
||||
KEY_GPIO_RST=13
|
||||
|
||||
sleep 2
|
||||
|
||||
@ -14,14 +15,18 @@ source `pwd`/mt_gpio.sh
|
||||
|
||||
echo "########################## KEY Testing Start ##########################"
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio442/direction ]; then
|
||||
mt_gpio_export ${KEY_GPIO_WPS} #Enable WPS 428 + 14 = 442
|
||||
if [ ! -f /sys/class/gpio/gpio526/direction ]; then
|
||||
mt_gpio_export ${KEY_GPIO_WPS} #Enable WPS 512 + 14 = 526
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio525/direction ]; then
|
||||
mt_gpio_export ${KEY_GPIO_RST} #Enable RESET 512 + 13 = 525
|
||||
fi
|
||||
|
||||
mt_gpio_dir ${KEY_GPIO_WPS} in
|
||||
mt_gpio_dir ${KEY_GPIO_RST} in
|
||||
|
||||
echo -n "Please Press one Key about WPS Key of GPIO_WPS GPIO14 about 20s ......"
|
||||
|
||||
echo -n "Please Press one Key about WPS Key of GPIO_WPS GPIO0 about 20s ......"
|
||||
i=0
|
||||
while true; do
|
||||
mt_gpio_in ${KEY_GPIO_WPS}
|
||||
@ -41,6 +46,26 @@ while true; do
|
||||
fi
|
||||
done
|
||||
|
||||
echo -n "Please Press one Key about RESET Key of GPIO_RST GPIO13 about 20s ......"
|
||||
i=0
|
||||
while true; do
|
||||
mt_gpio_in ${KEY_GPIO_RST}
|
||||
if [ $? == 0 ]; then
|
||||
echo "### GPIO_RST GPIO13 Key is in low level, Key is available ###"
|
||||
break
|
||||
else
|
||||
echo "waiting 1 second......"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
let i=i+1
|
||||
if [ $i -ge 20 ]; then
|
||||
echo " ### 20s Wait time is over, it can not detect the key ###"
|
||||
RET=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -7,22 +7,22 @@ sleep 2
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## LED Testing Start ##########################"
|
||||
echo "#######################################################################"
|
||||
echo "######################## LED Testing Start ##########################"
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED turn on about 10s ###"
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
echo "### RED,BLUE LED turn on about 10s ###"
|
||||
echo 1 > /sys/class/leds/red:/brightness
|
||||
echo 1 > /sys/class/leds/blue:/brightness
|
||||
sleep 10
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED turn off about 5s ###"
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
echo "### RED,BLUE LED turn off about 5s ###"
|
||||
echo 0 > /sys/class/leds/red:/brightness
|
||||
echo 0 > /sys/class/leds/blue:/brightness
|
||||
sleep 5
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED1 turn on ###"
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
echo "### RED,BLUE LED turn on ###"
|
||||
echo 1 > /sys/class/leds/red:/brightness
|
||||
echo 1 > /sys/class/leds/blue:/brightness
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "#################### M.2 KeyB PCIe SATA card Module Testing Start ##################"
|
||||
echo " "
|
||||
|
||||
result=`lspci | grep "SATA controller: JMicron Technology Corp. JMB58x AHCI SATA controller" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one M.2 KeyB PCIe SATA card Module from M.2 KeyB slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one M.2 KeyB PCIe SATA card Module from M.2 KeyB slots"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -11,10 +11,10 @@ echo "##########################################################################
|
||||
echo "########################### M.2 KeyB USB2.0 Testing Start ##########################"
|
||||
|
||||
result=`lsusb | grep "2c7c:0125" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one EM05 4G Module from M.2 KeyB slots ###"
|
||||
if [ ${result} -eq 3 ]; then
|
||||
echo "### Find three EM05 4G Modules from three M.2 KeyB slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one EM05 4G Module from M.2 KeyB slots"
|
||||
echo "Error Notice: Can not Find three EM05 4G Modules from three M.2 KeyB slots"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -8,13 +8,13 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################### M.2 KeyB USB3.0 Testing Start ##########################"
|
||||
echo "###################### Three M.2 KeyB USB3.0 Slots Testing Start #####################"
|
||||
|
||||
result=`lsusb | grep "2c7c:0900" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one RM500U-CN 5G Module from M.2 KeyB slots ###"
|
||||
if [ ${result} -eq 3 ]; then
|
||||
echo "### Find three RM500U-CN 5G Modules from three M.2 KeyB slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one RM500U-CN 5G Module from M.2 KeyB slots"
|
||||
echo "Error Notice: Can not Find three RM500U-CN 5G Modules from three M.2 KeyB slots"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
echo 0 > /sys/class/leds/red:/brightness
|
||||
echo 0 > /sys/class/leds/blue:/brightness
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
echo 1 > /sys/class/leds/red:/brightness
|
||||
echo 1 > /sys/class/leds/blue:/brightness
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -8,7 +8,7 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "######################### minipcie 4G Module Testing Start #########################"
|
||||
echo "####################### Two minipcie 4G Modules Testing Start #######################"
|
||||
|
||||
result=`lsusb | grep "2c7c:0125" | wc -l`
|
||||
if [ ${result} -eq 2 ]; then
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#/bin/bash
|
||||
|
||||
SYS_FILE=/sys/devices/platform/11005000.i2c/i2c-1
|
||||
SYS_FILE=/sys/devices/platform/soc/11005000.i2c/i2c-2
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
@ -9,7 +9,7 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "######################## minipcie wifi7 card Module Testing Start ##################"
|
||||
echo "######################## minipcie wifi7 be14 card Module Testing Start ##################"
|
||||
echo " "
|
||||
|
||||
result=`lspci | grep "Device 7990" | wc -l`
|
||||
@ -28,18 +28,12 @@ else
|
||||
RET=1
|
||||
fi
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-5/5-0051/eeprom ]; then
|
||||
echo "### BPI-R4 wifi7 eeprom 0x51 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 wifi7 eeprom 0x51 can work fine ###"
|
||||
fi
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-5/5-0052/eeprom ]; then
|
||||
echo "### BPI-R4 wifi7 eeprom 0x52 can't work fine ###"
|
||||
if [ ! -f ${SYS_FILE}/i2c-6/6-0051/eeprom ]; then
|
||||
echo "### BPI-R4PRO 8X wifi7 BE14 eeprom 0x51 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 wifi7 eeprom 0x52 can work fine ###"
|
||||
echo "### BPI-R4PRO 8X wifi7 BE14 eeprom 0x51 can work fine ###"
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -10,7 +10,7 @@ echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## SPIM NAND Deivce Testing Start ##########################"
|
||||
|
||||
dd if=/dev/mtdblock2 of=/tmp/.nand_test.img
|
||||
dd if=/dev/mtdblock1 of=/tmp/.nand_test.img
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Access the SPIM NAND Device Successfully ###"
|
||||
else
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -8,14 +8,22 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## NVMe SSD M.2 KeyM Testing Start # ##########################"
|
||||
echo "####################### Two NVMe SSD M.2 KeyM Testing Start ##########################"
|
||||
|
||||
result=`fdisk -l /dev/nvme0n1 | grep "bytes" | grep "sectors" | wc -l`
|
||||
if [ ${result} -gt 0 ]; then
|
||||
echo "### NVMe SSD M.2 KeyM can be detected successfully. ###"
|
||||
echo "### NVMe SSD M.2 KeyM-A can be detected successfully. ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: NVMe SSD M.2 KeyM can not be detected, failure."
|
||||
echo "Error Notice: NVMe SSD M.2 KeyM-A can not be detected, failure."
|
||||
fi
|
||||
|
||||
result=`fdisk -l /dev/nvme1n1 | grep "bytes" | grep "sectors" | wc -l`
|
||||
if [ ${result} -gt 0 ]; then
|
||||
echo "### NVMe SSD M.2 KeyM-B can be detected successfully. ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: NVMe SSD M.2 KeyM-B can not be detected, failure."
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
|
||||
@ -8,19 +8,19 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "############################### MT7988a RTC Testing Start ##########################"
|
||||
echo "########################## BPI-R4-PRO 8X RTC Testing Start ###########################"
|
||||
|
||||
date -s 2028-08-08
|
||||
hwclock -w
|
||||
date -s 2021-01-01
|
||||
line=`hwclock -r | grep "2028-08-08" | wc -l`
|
||||
line=`hwclock -r | grep "2028" | grep "Aug 8" | wc -l`
|
||||
if [ $line -eq 1 ]; then
|
||||
echo " "
|
||||
echo "### MT7988a RTC can work fine ### "
|
||||
echo "### BPI-R4-PRO 8X RTC can work fine ### "
|
||||
echo " "
|
||||
else
|
||||
echo " "
|
||||
echo "Error Notice: MT7988a RTC can not work fine."
|
||||
echo "Error Notice: BPI-R4-PRO 8X RTC can not work fine."
|
||||
echo " "
|
||||
RET=1
|
||||
fi
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+512 ### gpio base 512 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
92
usim-script/usim-script.sh
Normal file
92
usim-script/usim-script.sh
Normal file
@ -0,0 +1,92 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
SLOT1_TTYUSB2_FILE=/dev/ttyUSB2
|
||||
SLOT2_TTYUSB7_FILE=/dev/ttyUSB7
|
||||
SLOT3_TTYUSB12_FILE=/dev/ttyUSB12
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "###################### Three RM500U-CN USIM Slots Testing Start #####################"
|
||||
set +m > /dev/null
|
||||
rm -rf /tmp/ft_data
|
||||
echo " "
|
||||
|
||||
if [ -c ${SLOT1_TTYUSB2_FILE} ]; then
|
||||
echo "### Find RM500U-CN 5G Modules ttyUSB2 AT Moden Serial ###"
|
||||
rm -rf /tmp/ft_data
|
||||
cat ${SLOT1_TTYUSB2_FILE} > /tmp/ft_data 2&
|
||||
echo -e "AT+CPIN?\r" > ${SLOT1_TTYUSB2_FILE}
|
||||
sleep 2
|
||||
killall cat > /dev/null
|
||||
result=`cat /tmp/ft_data | grep "+CPIN: READY" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### Error Notice: RM500U-CN 5G Modules ttyUSB2 USIM is not present ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### RM500U-CN 5G Modules ttyUSB2 USIM is present ###"
|
||||
fi
|
||||
else
|
||||
echo "### Error Notice: Can not Find RM500U-CN 5G Modules ttyUSB2 AT Moden Serial ###"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
||||
if [ -c ${SLOT2_TTYUSB7_FILE} ]; then
|
||||
echo "### Find RM500U-CN 5G Modules ttyUSB7 AT Moden Serial ###"
|
||||
rm -rf /tmp/ft_data
|
||||
cat ${SLOT2_TTYUSB7_FILE} > /tmp/ft_data 2&
|
||||
echo -e "AT+CPIN?\r" > ${SLOT2_TTYUSB7_FILE}
|
||||
sleep 2
|
||||
killall cat > /dev/null
|
||||
result=`cat /tmp/ft_data | grep "+CPIN: READY" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### Error Notice: RM500U-CN 5G Modules ttyUSB7 USIM is not present ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### RM500U-CN 5G Modules ttyUSB7 USIM is present ###"
|
||||
fi
|
||||
else
|
||||
echo "### Error Notice: Can not Find RM500U-CN 5G Modules ttyUSB7 AT Moden Serial ###"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
||||
if [ -c ${SLOT3_TTYUSB12_FILE} ]; then
|
||||
echo "### Find RM500U-CN 5G Modules ttyUSB12 AT Moden Serial ###"
|
||||
rm -rf /tmp/ft_data
|
||||
cat ${SLOT3_TTYUSB12_FILE} > /tmp/ft_data 2&
|
||||
echo -e "AT+CPIN?\r" > ${SLOT3_TTYUSB12_FILE}
|
||||
sleep 2
|
||||
killall cat > /dev/null
|
||||
result=`cat /tmp/ft_data | grep "+CPIN: READY" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### Error Notice: RM500U-CN 5G Modules ttyUSB12 USIM is not present ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### RM500U-CN 5G Modules ttyUSB12 USIM is present ###"
|
||||
fi
|
||||
else
|
||||
echo "### Error Notice: Can not Find RM500U-CN 5G Modules ttyUSB12 AT Moden Serial ###"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
echo " "
|
||||
set -m 2> /dev/null
|
||||
rm -rf /tmp/ft_data
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -5,22 +5,21 @@ RET=0
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "####################### MT7988a Chip 2.4G, 5G, 6G AP Testing Start #######################"
|
||||
echo "###############################################################################################"
|
||||
echo "#################### BPI-R4PRO 8X BE14 Chip 2.4G, 5G, 6G AP Testing Start #####################"
|
||||
|
||||
ifconfig ra0 up > /dev/null
|
||||
ifconfig ra1 up > /dev/null
|
||||
ifconfig rai0 up > /dev/null
|
||||
ifconfig rax0 up > /dev/null
|
||||
ifconfig phy0.0-ap0 up > /dev/null
|
||||
ifconfig phy0.1-ap0 up > /dev/null
|
||||
ifconfig phy0.2-ap0 up > /dev/null
|
||||
|
||||
sleep 5
|
||||
|
||||
result=`ifconfig -a | grep ra0 | wc -l`
|
||||
result=`ifconfig -a | grep phy0.0-ap0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 2.4G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist ra0 rate | grep "Current Bit Rate" | wc -l`
|
||||
result=`iwinfo phy0.0-ap0 info | grep 2.412 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 2.4G AP can't work fine ###"
|
||||
RET=1
|
||||
@ -29,12 +28,12 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
result=`ifconfig -a | grep rai0 | wc -l`
|
||||
result=`ifconfig -a | grep phy0.1-ap0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 5G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist rai0 rate | grep "Current Bit Rate" | wc -l`
|
||||
result=`iwinfo phy0.1-ap0 info | grep 5.180 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 5G AP can't work fine ###"
|
||||
RET=1
|
||||
@ -43,12 +42,12 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
result=`ifconfig -a | grep rax0 | wc -l`
|
||||
result=`ifconfig -a | grep phy0.2-ap0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 6G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist rax0 rate | grep "Current Bit Rate" | wc -l`
|
||||
result=`iwinfo phy0.2-ap0 info | grep 6.135 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 6G AP can't work fine ###"
|
||||
RET=1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user