4241 admin 3368 S {amtm} /bin/sh /usr/sbin/amtm
4270 admin 4676 S /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://fwupdate.asuswrt-merlin.net/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
I took all the steps mentioned above, including sh -x and looking at the output. It does appear to be in a loop. My ASUS router is direct connected to the Internet through my ISP (I don't use an ISP router at all). amtm hung and I did a ctrl-c to terminate it. I then did a "ping diversion.ch" and got back (captured screen prior to ping & included ping output below):
+ c_url
https://diversion.ch/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://diversion.ch/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
+ [ -s /jffs/addons/amtm/a_fw/amtm.mod.new ]
+ [ -f /jffs/addons/amtm/a_fw/amtm.mod ]
+ rm -f /jffs/addons/amtm/a_fw/amtm.mod.new
+ a_m ! Module amtm.mod download failed
+ [ -z Initializing amtm for first run\n\n Getting from fwupdate.asuswrt-merlin.net\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\n\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch]
+ am= Initializing amtm for first run\n\n Getting from fwupdate.asuswrt-merlin.net\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\n\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\nd
+ f_b_url
+ a_m ! using fallback server diversion.ch\n
+ [ -z Initializing amtm for first run\n\n Getting from fwupdate.asuswrt-merlin.net\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\n\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch]
+ am= Initializing amtm for first run\n\n Getting from fwupdate.asuswrt-merlin.net\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\n\n ! Module amtm.mod download failed\n ! using fallback server diversion.ch\nn
+ amtmURL=
https://diversion.ch/amtm_fw
+ g_m amtm.mod new /jffs/addons/amtm/a_fw
+ [ amtm.mod = amtm.mod ]
+ set -- amtm.mod new /jffs/addons/amtm/a_fw
+ [ /jffs/addons/amtm/a_fw ]
+ [ new = new ]
+ [ -z 1 ]
+ dlLoc=1
+ c_url
https://diversion.ch/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://diversion.ch/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
^C
admin@RT-AC86U-nnnn:/tmp/home/root# ping diversion.ch
PING diversion.ch (80.74.145.140): 56 data bytes
64 bytes from 80.74.145.140: seq=0 ttl=56 time=127.271 ms
64 bytes from 80.74.145.140: seq=1 ttl=56 time=125.888 ms
64 bytes from 80.74.145.140: seq=2 ttl=56 time=125.914 ms
^C
--- diversion.ch ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 125.888/126.357/127.271 ms
running
curl https://diversion.ch/amtm_fw/amtm.mod -o /jffs/addons/amtm/a_fw/amtm.mod.new
outside of amtm script worked without problems
I then got a bit further when running the amtm script but it still hung.
It next hung (looped) on:
/usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8 https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
Running it outside the script at a command line worked but it is hung on this command now:
c_url https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8 https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
Is there anyway to get a first time configuration download of all files so amtm "thinks" first time has been run???
Here is what amtm is doing now:
+ dlLoc=1
+ c_url
https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
+ [ -s /jffs/addons/amtm/diversion.mod.new ]
+ [ -f /jffs/addons/amtm/diversion.mod ]
+ rm -f /jffs/addons/amtm/diversion.mod.new
+ a_m ! Module diversion.mod download failed
+ [ -z \n Getting from fwupdate.asuswrt-merlin.net\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.]
+ am=\n Getting from fwupdate.asuswrt-merlin.net\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mod
+ f_b_url
+ a_m ! using fallback server diversion.ch\n
+ [ -z \n Getting from fwupdate.asuswrt-merlin.net\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.]
+ am=\n Getting from fwupdate.asuswrt-merlin.net\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mod download failed\n ! using fallback server diversion.ch\n\n ! Module diversion.mon
+ amtmURL=
https://diversion.ch/amtm_fw
+ g_m diversion.mod new /jffs/addons/amtm
+ [ diversion.mod = amtm.mod ]
+ [ /jffs/addons/amtm ]
+ [ new = new ]
+ [ -z 1 ]
+ dlLoc=1
+ c_url
https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
So, this doesn't make sense to me (sorry). I have two putty sessions going logged in as adminstrator. In one window, I am running sh -x /usr/sbin/amtm and the other I am using to issue "hung" commands to see if they work outside the script. The last command above:
/usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8 https://diversion.ch/amtm_fw/diversion.mod -o /jffs/addons/amtm/diversion.mod.new
works without any problems in the second window I have open running it on a command line.
Ok, so I'm not sure how/why but AMTM is now working on my router. I took the following actions:
1. cd
2. cp /usr/sbin/amtm ./
3. vi ./amtm (did a chmod 755 ./amtm)
4. changed line to
c_url(){ /usr/sbin/curl -fsNL --retry
3 --connect-timeout
10 -m 8 "$@";}
5. sh -x ./amtm
6. noticed it got me to amtm 3.1.3 menu
7. ctrl-c to terminate
8. amtm (and it comes up with menu / no problems)
9. option e to exit
10. /usr/sbin/amtm (it produced full menu)
As I stated, I have no idea why.
So, it is now having more problems and I think it is related to the CURL command. I am running sh -x /usr/sbin/amtm to see where the hangs are. First, I get "upd err" when I pick option "u". I get the "upd err" on Diversion, Skynet and amtm. I then try to do option "dc" to install disk checker. I see the same failures on the curl command I did when trying to get to the amtm menu. For example:
+ update_amtm
+ urlNOK=
+ c_url
https://fwupdate.asuswrt-merlin.net/amtm_fw/amtm.mod
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://fwupdate.asuswrt-merlin.net/amtm_fw/amtm.mod
+ grep -q ^version=
+ urlNOK=1
+ f_b_url
+ a_m ! using fallback server diversion.ch\n
+ [ -z ]
+ am= ! using fallback server diversion.ch\n
+ amtmURL=
https://diversion.ch/amtm_fw
+ [ 1 ]
+ c_url
https://diversion.ch/amtm_fw/amtm.mod
+ /usr/sbin/curl -fsNL --retry 2 --connect-timeout 3 -m 8
https://diversion.ch/amtm_fw/amtm.mod
+ grep -q ^version=
+ [ 1 = 1 ]
+ updErr=1
+ thisrem= upd err
+ amtmUpd=0
+ [ -z 1 ]
+ corr1=
+ [ 0 = 0 ]
Picked option "u" and got:
amtm 3.1.3 FW by thelonelycoder
RT-AC86U (aarch64) FW-384.15 @ 192.168.1.1
The Asuswrt-Merlin Terminal Menu
1 open Diversion v4.1.9 upd err
2 open Skynet v7.1.0 upd err
ep manage Entware packages no upd
m menu amtm uu force update upd err
_____________________________________________
! using fallback server diversion.ch
Update aborted, could not retrieve version
_____________________________________________
Enter option
This will be my last update on the problem. Will wait for further direction on how I can help resolve this.