RouterTech Firmware 2.96 Discussion

All about firmwares for routers. Support for RouterTech firmwares is here too.
Post Reply
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Wed Oct 05, 2011 11:19 am

Morozko wrote:I have very bad experience of upgrading my DSL-G604T by your Firmware v.2.96 thru web interface. All preliminary "dances with tamburine" stipulated particularly (and I thing "with love" from your side) in "docs" directory of "routertech-ar7wrd-adam2-firmware-4ports-20110502" were made by me...
Whole process of upgrading I made in Safe mode of my OS. After 20 minutes of waiting since starting upgrade process - nothing happend and even after router rebooting "status" led of my router was not blinking.
After refreshing web page 192.168.1.1 I have got login/password page with yr. logo above, but it was not absolutely possible to pass thru it. Exectly the same situation was with telnet service....
I tried a lot of login/pass combinations: admin/admin, root/admin, user/user, adam2/adam2, root/root...
After that I tried to upgrade my device by your firmware thru repair way - by using at first "rrt_1.0.8", and then "tiupgrade" (with changing firmware name in tiupgrade.scp for the new one) but I was not succeeded in this approach.
So, after a lot of spending time, I have to use repair standard utility "DLinkEU_DSL-G604T_V2.00B01T01.EU.20050930_upgradeB10.exe" and after that I could upgrade my router by web interface to firmware DSL-G604T_V2.01.B01T01RU.20060109, but as a collateral result of my experiments with your firmware I still have your login/pass entering page (but without your logo, thanks god !) right after I pass thru standard login/pass window ! Now I have only one question - how can I remove it FOREVER ???
Clear your browser cache.
Morozko wrote:Thanks in advance, and sorry for the negative post...
Caused entirely by user error and ignorance. If you did indeed read the docs as you claimed to have done, you would have seen clearly that the default login to the web interface is "Admin/Admin" - not any of the combination that you claim to have tried. And, if you did indeed read the docs as you claimed, then you would have seen everything said about the LED configuration files, and would not have been worrying about the "status" LED.

Bottom line - anyone who cannot read or follow instructions should avoid firmware upgrades.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Mon Oct 10, 2011 5:31 pm

Chief,
I cannot seem to get check_ddns.sh to work properly. Before committing it to the boot environment, I manually tested it and the result is always like 'IP is outdated', then it resets the ppp connection.

Just before running the script, I verified that the dynamic wan IP matches the (no-ip) host name using "ipaddr myhost.net". It matches my wan IP per the RT status and my no-ip.com account webpage status. Any ideas why the script does not see the match ? (fyi: The ddns updates at boot are almost always OK.)
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Mon Oct 10, 2011 5:50 pm

It seems that the documentation was not clear enough. The script only supports dyndns.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Mon Oct 10, 2011 11:58 pm

So ipaddr uses dyndns to get the ip for myhostname? (is this presumption correct ?)
If I use "ipaddr hostname" on the command line, it returns the expected IP. ipaddr seems to be what is called in the script. So I still don't understand why the script fails :?

Maybe wan_WAN_info "ip" is no good. It does not work if I type it into the command line (command not found).

This is a snippet of the Routertech check_ddns.sh script:

Code: Select all

compare_host_myip()
{
  MYIP=$(wan_WAN_info "ip")
  [ "$MYIP" = "N/A" ] && {
    echo "noownip"
    return
  }

  HOIP=$($ULB/ipaddr $1)
  [ -z "$HOIP" ] && {
    echo "nohostip"
    return
  }

  [ $MYIP = $HOIP ] && echo "1" || echo "0"
}
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Tue Oct 11, 2011 12:57 pm

What is the output of "showip.sh" ?
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Tue Oct 11, 2011 4:33 pm

It returns my WAN ip (same as status:connection status in GUI).
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Tue Oct 11, 2011 4:44 pm

Then there is nothing wrong with "wan_WAN_info". Look at the contents of showip.sh.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Tue Oct 11, 2011 4:54 pm

I just did that. There seems to be failure with the script's logic.
ipaddr and show_ip.sh returned the same IP.

Code: Select all

/var # ipaddr mypublicip.net
70.56.19.229
/var # showip.sh
70.56.19.229

/var # check_ddns.sh mypublicip.net
root: check_ddns.sh: The dynamic DNS IP is out-of-date. Running command: "/usr/l
ocal/bin/ppp_restore.sh".

/var # root: ppp_disconnect.sh: Disconnecting "connection0:pppoe".

/var # root: ppp_connect.sh: Connecting "connection0:pppoe".
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Tue Oct 11, 2011 5:10 pm

There is nothing wrong with the logic. The problem may lie in the outputs. To debug it, copy check_ddns.sh to the /var directory, open it with "edit", add " -x" to the end of the first line, save it and quit the editor, and then run "/var/check_ddns.sh". You will see where the problem happens.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Tue Oct 11, 2011 6:01 pm

Thanks Chief. I captured a log file using the -x option placed in the script. Appearantly the script is ignoring the hostname on the command line and using the hostname entered into the DDNS setup (live config). So I changed the command to use the syntax as shown below but I cannot get the script to accept the command line options as per the example printed out, so it aborts. Any idea why?

Code: Select all

/var # check_ddns.sh --host=myhostIP.net --cmd=/usr/local/bin/showip.sh

Syntax = check_ddns.sh [options]
Options:
  --host=<your dynamic DNS hostname>            [default=get details from the li
ve config]
  --cmd=<what to run if DDNS not up-to-date>    [default=reset the ppp connectio
n]

Example: check_ddns.sh --host=mydnsentry.homedns.org --cmd=/nvram/myscript.sh
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Tue Oct 11, 2011 7:24 pm

Yes, I can see the problem now:

Code: Select all

[ $(is_parameter "-h") -eq 1 ] && syntax
It should be changed to

Code: Select all

[ $(is_parameter "--help") -eq 1 ] && syntax
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Tue Oct 11, 2011 10:38 pm

I made that edit. Here is the result:

Code: Select all

/var # /nvram/check_ddns.sh --help
/nvram/check_ddns.sh: line 42: syntax[: not found
root: check_ddns.sh: OK
[ fyi, I think there is a lone } (right bracket) 3 lines before the one we edited. ]

Without the --help option, I always get: root: check_ddns.sh: OK as below:

Code: Select all

/var # /nvram/check_ddns.sh nonexistentHost.net reboot.sh
root: check_ddns.sh: OK
I can see I will have to learn how to read & write scripts to get my modem customized. Thanks for your help.
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Tue Oct 11, 2011 10:58 pm

Your syntax is wrong. Where is the "--host" or "--cmd" ? Without the necessary switches, all parameters passed at the command line are simply ignored.

I think you need to show the content of line 42. There is no orphan "}" anywhere.
hiteck wrote:I can see I will have to learn how to read & write scripts to get my modem customized
It always helps, because the firmware, being a fully-fledged linux OS, is almost as customisable as your ability to write your own scripts. But if the problem is a bug in our code, then we will always try to fix it in the next release. In this case, I have already fixed the script to change "-h" to "--help". I can't see any other bug in the script.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
hiteck
Regular
Regular
Posts: 47
Joined: Wed Dec 02, 2009 7:45 am
Location: N. America

Re: RouterTech Firmware 2.96 Discussion

Post by hiteck » Wed Oct 12, 2011 2:15 am

Silly EDIT program got me :oops:

The script works if I use the options syntax. But if the options are invalid as in my last post, the script still returns OK :cry: . And that is not the correct result, as the correct hostname is not even stored in the router by me. My DDNS settings point to all.DNSoMatic.com, then they update no-ip.com . This is why I must specify the hostname on the command line for the script.

No big deal though as I got it working with your correction. Thanks.
Any fool can make things complicated. It takes a genius to make things simple. - Einstein Jobs
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: RouterTech Firmware 2.96 Discussion

Post by thechief » Wed Oct 12, 2011 2:26 pm

hiteck wrote:Silly EDIT program got me :oops:
No worries, it happens to us all. ;)
hiteck wrote:The script works if I use the options syntax. But if the options are invalid as in my last post, the script still returns OK :cry:
Because they are ignored, in favour of the internal information.
hiteck wrote:And that is not the correct result, as the correct hostname is not even stored in the router by me.
Doesn't have to be.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply