More cm_cli_tty commands

An area of the forum to discuss router binaries (utilities and applications that run on routers) etc.
Post Reply
paulwebster
Newbie
Newbie
Posts: 4
Joined: Wed Jul 15, 2015 1:21 pm

More cm_cli_tty commands

Post by paulwebster » Thu Jul 16, 2015 6:13 pm

Hello,

I was having problems with a DSL router (Hercules HWGADSL2P-54V2 AnnexA) using stock firmware.
It would not let me change its static IP address or the set that it would give out via DHCP.
I wanted to change from 192.168.1.1 / 192.168.1.2-192.168.1.254 because it was clashing with the remote IP address range in a VPN that I was trying to connect to.

Anyway ... I found a reference here to the same router with a comment saying that it looked like the RouterTech firmware can run on it but it was not conclusive.
So rather than risk it (it is the only router here) I decided to do some digging to see if I could make the changes via command line.

cm_cli_tty is not on the router - so I used RUC to install a copy (a happy side-effect of me checking to see if the router is supported).

After some experimentation and checking the web interface of the stock firmware I found what I needed and it worked.
These commands are not in the 2012 cm_cli.pdf

Their meaning is obvious - and I used them to get around my problem.
lan0:static:settings/ip=192.168.100.1
landhcps0:settings/start=192.168.100.2
landhcps0:settings/end=192.168.100.254

Some others that I did not try:
logic:command/apply - in theory this should make settings live but not save to flash

lan0:settings/type=static
lan0:static:settings/netmask=255.255.255.0

landhcps0:settings/state=1 - Internal DHCP server enabled (1) / disabled (0)
landhcps0:settings/lease=3600 - DHCP lease time in seconds

landhcpfwd0:settings/ip=20.0.0.3 - DHCP Relay from (only used if state below is enabled)
landhcpfwd0:settings/state=0 - Internal server and Relay disabled (0) / enabled (1)

I could probably find some others using the same technique if useful.

Also - the RUC run was stuck at 80%.
Possibly related to the cm_cli_tty being missing.
The version that was copied into /var by RUC did not have a "chmod +x" applied to it so my guess is that attempts to run it by RUC were failing.
I did that by hand to make my changes work.
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: More cm_cli_tty commands

Post by thechief » Fri Jul 17, 2015 12:53 am

Thanks. But the dhcp settings are on p3 of the doc.
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.
paulwebster
Newbie
Newbie
Posts: 4
Joined: Wed Jul 15, 2015 1:21 pm

Re: More cm_cli_tty commands

Post by paulwebster » Fri Jul 17, 2015 3:54 am

My mistake for stating that they are all not in there ... I made a note of the commands that I used but did not record properly which ones I had found in the doc.

The lan0 commands are missing and the "apply" (although I cannot be certain that it had an effect since it might happen automatically when using cm_cli_tty).

Any thoughts about the
chmod +x /var/cm_cli_tty
that I had to run to use the uploaded version?
Could it have been the reason that RUC was stuck at 80% ?
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: More cm_cli_tty commands

Post by thechief » Fri Jul 17, 2015 9:24 am

paulwebster wrote:Any thoughts about the
chmod +x /var/cm_cli_tty
that I had to run to use the uploaded version?
Could it have been the reason that RUC was stuck at 80% ?
I doubt it. The RUC usually gets stuck when it encounters some incompatibility. It is usually a sign that it would not be wise to flash the RouterTech firmware.

Try the Firmware Tool and see if it gets stuck too.
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