What's new

amtm amtm Incorrectly Reporting Firmware Update Available

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

visortgw

Very Senior Member
I have the latest amtm update (v4.9 Beta) that @thelonelycoder posted to address the LED Control dynamic time issue installed on my GT-BE98 Pro. When using the u function to check for updates, amtm reports that an update 3006.102.1.0 as opposed to currently installed 3006.102.1 — they are in fact one in the same. I don't know if it is related, but I also see a warning message about using a fallback server. As far a I know, I have all of the latest available third-party script updates installed, including several development versions.

Screenshot 2024-08-16 at 09.07.09.png
 
I have the latest amtm update (v4.9 Beta) that @thelonelycoder posted to address the LED Control dynamic time issue installed on my GT-BE98 Pro. When using the u function to check for updates, amtm reports that an update 3006.102.1.0 as opposed to currently installed 3006.102.1 — they are in fact one in the same. I don't know if it is related, but I also see a warning message about using a fallback server. As far a I know, I have all of the latest available third-party script updates installed, including several development versions.

Leave the BETA by entering beta into amtm. I removed the Beta files.
Then do a force update.
 
Leave the BETA by entering beta into amtm. I removed the Beta files.
Then do a force update.
Tried that, but still shows 4.9 Beta and associated warnings.
 
Close amtm, then run
Code:
rm /jffs/addons/amtm/amtmBranch
Then open amtm and force update.
 
Thanks! That fixed the beta version and the fallback server warning, but the false firmware version available remains.

Screenshot 2024-08-16 at 11.30.00.png
 
That fixed the beta version and the fallback server warning, but the false firmware version available remains.
Whats the output of:
Code:
awmBuildno="$(nvram get buildno)"
awmWSI=$(nvram get webs_state_info)
awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
awmInstalled="$awmBuildno.$(nvram get extendno)"
echo $awmBuildno
echo $awmWSI
echo $awmStable
echo $awmBaseVer
echo $awmInstalled
 
Whats the output of:
Code:
awmBuildno="$(nvram get buildno)"
awmWSI=$(nvram get webs_state_info)
awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
awmInstalled="$awmBuildno.$(nvram get extendno)"
echo $awmBuildno
echo $awmWSI
echo $awmStable
echo $awmBaseVer
echo $awmInstalled
Code:
# echo $awmBuildno
102.1
# echo $awmWSI
3006_102_1_0
# echo $awmStable
102.1.0
# echo $awmBaseVer
102.1
# echo $awmInstalled
102.1.0
 
Using your output, my script works correctly, reporting no newer release available.
Please run this bit of code so I can see where it fails:
Code:
awmBuildno="$(nvram get buildno)"
v_c(){ echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';}
awmWSI=$(nvram get webs_state_info)
awmInstalled="$awmBuildno.$(nvram get extendno)"
if [ "$awmWSI" ]; then
    echo 1
    awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
    awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
    if [ "$(v_c $awmBaseVer)" -gt "$(v_c $awmBuildno)" ]; then
        echo 2
        availRel="release avail.";stcol=${E_BG};awmUpd=1
    elif [ "$awmBaseVer" = "$awmBuildno" ]; then
        echo 3
        if echo "$(nvram get extendno)" | grep -q 'alpha\|beta'; then
            echo 4
            availRel="release avail.";stcol=${E_BG};awmUpd=1
        elif [ "$(v_c $awmStable)" -gt "$(v_c $awmInstalled)" ]; then
            echo 5
            availRel="release avail.";stcol=${E_BG};awmUpd=1
        else
            echo 6
            availRel=firmware;stcol=${GN_BG}
        fi
    else
        echo 7
        availRel=firmware;stcol=${GN_BG}
        [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
        awmStable=$awmInstalled
    fi
else
    echo 8
    availRel=firmware;stcol=${GN_BG}
    [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
    awmStable=$awmInstalled
fi
echo availRel $availRel
echo awmStable $awmStable
 
Last edited:
Using your output, my script works correctly, reporting no newer release available.
Please run this bit of code so I can see where it fails:
Code:
awmBuildno="$(nvram get buildno)"
awmWSI=$(nvram get webs_state_info)
awmInstalled="$awmBuildno.$(nvram get extendno)"
if [ "$awmWSI" ]; then
    echo 1
    awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
    awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
    if [ "$(v_c $awmBaseVer)" -gt "$(v_c $awmBuildno)" ]; then
        echo 2
        availRel="release avail.";stcol=${E_BG};awmUpd=1
    elif [ "$awmBaseVer" = "$awmBuildno" ]; then
        echo 3
        if echo "$(nvram get extendno)" | grep -q 'alpha\|beta'; then
            echo 4
            availRel="release avail.";stcol=${E_BG};awmUpd=1
        elif [ "$(v_c $awmStable)" -gt "$(v_c $awmInstalled)" ]; then
            echo 5
            availRel="release avail.";stcol=${E_BG};awmUpd=1
        else
            echo 6
            availRel=firmware;stcol=${GN_BG}
        fi
    else
        echo 7
        availRel=firmware;stcol=${GN_BG}
        [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
        awmStable=$awmInstalled
    fi
else
    echo 8
    availRel=firmware;stcol=${GN_BG}
    [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
    awmStable=$awmInstalled
fi
echo availRel $availRel
echo awmStable $awmStable
Multiple instances of -sh: v_c: not found in output of code snippet, which most likely cause [: bad number errors.

Code:
# awmBuildno="$(nvram get buildno)"
# awmWSI=$(nvram get webs_state_info)
# awmInstalled="$awmBuildno.$(nvram get extendno)"
# if [ "$awmWSI" ]; then
>     echo 1
>     awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
>     awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
>     if [ "$(v_c $awmBaseVer)" -gt "$(v_c $awmBuildno)" ]; then
>         echo 2
>         availRel="release avail.";stcol=${E_BG};awmUpd=1
>     elif [ "$awmBaseVer" = "$awmBuildno" ]; then
>         echo 3
>         if echo "$(nvram get extendno)" | grep -q 'alpha\|beta'; then
>             echo 4
>             availRel="release avail.";stcol=${E_BG};awmUpd=1
>         elif [ "$(v_c $awmStable)" -gt "$(v_c $awmInstalled)" ]; then
>             echo 5
>             availRel="release avail.";stcol=${E_BG};awmUpd=1
>         else
>             echo 6
>             availRel=firmware;stcol=${GN_BG}
>         fi
>     else
>         echo 7
>         availRel=firmware;stcol=${GN_BG}
>         [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
>         awmStable=$awmInstalled
>     fi
> else
>     echo 8
>     availRel=firmware;stcol=${GN_BG}
>     [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
>     awmStable=$awmInstalled
> fi
1
-sh: v_c: not found
-sh: v_c: not found
[: bad number
3
-sh: v_c: not found
-sh: v_c: not found
[: bad number
6
# echo availRel $availRel
availRel firmware
# echo awmStable $awmStable
awmStable 102.1.0
 
Multiple instances of -sh: v_c: not found in output of code snippet, which most likely cause [: bad number errors.
I edited my post to include the version check code.
 
Code:
# awmBuildno="$(nvram get buildno)"
# v_c(){ echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';}
# awmWSI=$(nvram get webs_state_info)
# awmInstalled="$awmBuildno.$(nvram get extendno)"
# if [ "$awmWSI" ]; then
>     echo 1
>     awmStable=$(echo $awmWSI | sed 's/3004_//;s/3006_//' | sed 's/_/./g')
>     awmBaseVer=$(echo $awmStable | cut -d'.' -f1-2)
>     if [ "$(v_c $awmBaseVer)" -gt "$(v_c $awmBuildno)" ]; then
>         echo 2
>         availRel="release avail.";stcol=${E_BG};awmUpd=1
>     elif [ "$awmBaseVer" = "$awmBuildno" ]; then
>         echo 3
>         if echo "$(nvram get extendno)" | grep -q 'alpha\|beta'; then
>             echo 4
>             availRel="release avail.";stcol=${E_BG};awmUpd=1
>         elif [ "$(v_c $awmStable)" -gt "$(v_c $awmInstalled)" ]; then
>             echo 5
>             availRel="release avail.";stcol=${E_BG};awmUpd=1
>         else
>             echo 6
>             availRel=firmware;stcol=${GN_BG}
>         fi
>     else
>         echo 7
>         availRel=firmware;stcol=${GN_BG}
>         [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
>         awmStable=$awmInstalled
>     fi
> else
>     echo 8
>     availRel=firmware;stcol=${GN_BG}
>     [ "$(echo "$awmInstalled" | grep 'alpha\|beta')" ] && availRel="no release yet"
>     awmStable=$awmInstalled
> fi
1
3
6
# echo availRel $availRel
availRel firmware
# echo awmStable $awmStable
awmStable 102.1.0
 
Which is correct. I see no reason why it says ‚release avail.‘ instead of the correct ‚firmware‘ which is the $availRel variable.
 
I'm confused as well. This was an issue a while ago, but you addressed it once before. Not sure why it's reared its ugly head again.
 
Thank you for your continuous maintenance and improvements. And, by some miracle, this appears to fixed by the v4.9.1 update that you just posted — I couldn't respond there because thread is locked due to age. :eek:
 
Thank you for your continuous maintenance and improvements. And, by some miracle, this appears to fixed by the v4.9.1 update that you just posted — I couldn't respond there because thread is locked due to age. :eek:
Good to know. New amtm thread opened.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top