Updated cal file locations and fixed cal file errors during startup

This commit is contained in:
sgmcclellan
2018-11-08 12:13:19 -08:00
parent 87e21bb346
commit 6d5c82a01b
7 changed files with 74 additions and 64 deletions

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#!/bin/sh
CALIBRATION_FOLDER_DEFAULT="/tmp"
CALIBRATION_FOLDER_DEFAULT="/mnt/app/cal"
usage()
{

View File

@@ -1,6 +1,6 @@
#!/bin/sh
CALIBRATION_FOLDER_DEFAULT="/tmp"
CALIBRATION_FOLDER_DEFAULT="/mnt/app/cal"
usage()
{

View File

@@ -158,6 +158,9 @@ fi
TX_FREQ=$(echo ${TX_FREQ} | cut -d "." -f 1)
################# Get Band #####################
TX_BAND=$(bb-gettxband ${TX_FREQ} 2> /dev/null)
#################### Check RX Frequency #######################
if [ -z $RX_FREQ ] ; then
if [ -z $ULEARFCN ] ; then
@@ -266,6 +269,11 @@ if [ $? -ne 0 ] ; then
exit 1
fi
if [ ${TX_BAND} -ne 3 ] ; then
echo "FE parameters do not need to be set - Exiting"
exit 0
fi
################# Set FE FB Attenuation #######################
CAL_FE_FB_ATT_TX1=$(cal-getfefbatt ${TX_BW} 1 ${TX_FREQ} ${TX_POWER} 2> /dev/null)
if [ $? -ne 0 ] ; then

View File

@@ -30,12 +30,13 @@ case $HW_REVISION in
;;
X )
echo "Benetel"
oncpu 0 /usr/bin/cn_rfdriver << eof > /dev/null
w
27
20
q
oncpu 0 /usr/bin/cn_rfdriver << eof > /dev/null
w
27
20
q
eof
sleep 5
exit 0
;;
* )

View File

@@ -73,7 +73,7 @@ SYSCFG_FILE_NAME=system.conf
SYSCFG_DIR=
SYSCFG_DIR_DEFAULT=/tmp
CALFILES_DIR=
CALFILES_DIR_DEFAULT=/tmp
CALFILES_DIR_DEFAULT=/mnt/app/cal
TX_POWER=
TX_BW=

View File

@@ -5,7 +5,7 @@ SYSCFG_DIR=
SYSCFG_DIR_DEFAULT=/tmp
CALFILES_DIR=
CALFILES_DIR_DEFAULT=/tmp
CALFILES_DIR_DEFAULT=/mnt/app/cal
TX_POWER=
TX_BW=
@@ -175,59 +175,60 @@ if [ $? -ne 0 ] ; then
exit 1
fi
if [ ${TX_BAND} -eq 3 ] ; then
################# Set FE FB Attenuation #######################
CAL_FE_FB_ATT_TX1=$(cal-getfefbatt ${TX_BW} 1 ${TX_FREQ} ${TX_POWER} $CALFILES_DIR 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Get FE FB Attenuation TX1: $CAL_BB_ATT_TX1"
exit 1
fi
CAL_FE_FB_ATT_TX2=$(cal-getfefbatt ${TX_BW} 2 ${TX_FREQ} ${TX_POWER} $CALFILES_DIR 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Get FE FB Attenuation TX2: $CAL_BB_ATT_TX1"
exit 1
fi
fe-setfbatt 1 ${CAL_FE_FB_ATT_TX1} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE FB Attenuation TX1"
exit 1
fi
fe-setfbatt 2 ${CAL_FE_FB_ATT_TX2} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE FB Attenuation TX2"
exit 1
fi
################# Set FE TX Attenuation #######################
CAL_FE_TX_ATT_TX1=$(cal-getfetxatt -b ${TX_BW} -a 1 -f ${TX_FREQ} -p ${TX_POWER} -c $CALFILES_DIR -t 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX1: $CAL_BB_ATT_TX1"
exit 1
fi
CAL_FE_TX_ATT_TX2=$(cal-getfetxatt -b ${TX_BW} -a 2 -f ${TX_FREQ} -p ${TX_POWER} -c $CALFILES_DIR -t 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX2: $CAL_BB_ATT_TX1"
exit 1
fi
fe-settxatt 1 ${CAL_FE_TX_ATT_TX1} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX1"
exit 1
fi
fe-settxatt 2 ${CAL_FE_TX_ATT_TX2} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX2"
exit 1
fi
#################### Reset RFPAL ##############################
fe-resetrfpal
if [ ${TX_BAND} -ne 3 ] ; then
echo "FE parameters do not need to be set - Exiting"
exit 0
fi
################# Set FE FB Attenuation #######################
CAL_FE_FB_ATT_TX1=$(cal-getfefbatt ${TX_BW} 1 ${TX_FREQ} ${TX_POWER} $CALFILES_DIR 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Get FE FB Attenuation TX1: $CAL_BB_ATT_TX1"
exit 1
fi
CAL_FE_FB_ATT_TX2=$(cal-getfefbatt ${TX_BW} 2 ${TX_FREQ} ${TX_POWER} $CALFILES_DIR 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Get FE FB Attenuation TX2: $CAL_BB_ATT_TX1"
exit 1
fi
fe-setfbatt 1 ${CAL_FE_FB_ATT_TX1} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE FB Attenuation TX1"
exit 1
fi
fe-setfbatt 2 ${CAL_FE_FB_ATT_TX2} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE FB Attenuation TX2"
exit 1
fi
################# Set FE TX Attenuation #######################
CAL_FE_TX_ATT_TX1=$(cal-getfetxatt -b ${TX_BW} -a 1 -f ${TX_FREQ} -p ${TX_POWER} -c $CALFILES_DIR -t 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX1: $CAL_BB_ATT_TX1"
exit 1
fi
CAL_FE_TX_ATT_TX2=$(cal-getfetxatt -b ${TX_BW} -a 2 -f ${TX_FREQ} -p ${TX_POWER} -c $CALFILES_DIR -t 2> /dev/null)
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX2: $CAL_BB_ATT_TX1"
exit 1
fi
fe-settxatt 1 ${CAL_FE_TX_ATT_TX1} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX1"
exit 1
fi
fe-settxatt 2 ${CAL_FE_TX_ATT_TX2} 2> /dev/null
if [ $? -ne 0 ] ; then
echo "$0 - Error Set FE TX Attenuation TX2"
exit 1
fi
#################### Reset RFPAL ##############################
fe-resetrfpal