Kitz Forum

Broadband Related => Broadband Hardware => Topic started by: ZTE_SU on December 21, 2016, 08:09:43 PM

Title: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on December 21, 2016, 08:09:43 PM
hello
i have gained super user access to my router through SSH, but i have encountered some problems:
1-all regular commands doesnt print help or anything but i know they are executed.(ex:wan, sys,  doesnt print while sendcmd, adslcmd does print)
2-i am unable to get FTP working.
3-i am unable to change telnet permissions.
4-i dont have enough info about the commands and cant get enough off the the net.

things i want to do:
1-fix those problems.
2-fix security issues.
3-tweak my dsl line for better performance (SNR, data path[FAST instead of interleaved] etc)

Notes:
1-Router Model is ZTE ZXHN H168N.
2-type of connection FTTC/VDSL2

Thanks
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on December 21, 2016, 08:10:21 PM
BusyBox v1.01 (2016.06.24-12:58+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# help

Built-in commands:
-------------------
        . : break cd chdir continue eval exec exit export false hash
        help local pwd read readonly return set shift times trap true
        type ulimit umask unset wait [ ash brctl busybox cat cp date
        df diagput echo free fuser getty hostname ifconfig init insmod
        kill killall linuxrc ln login ls lsmod mkdir mknod mount mv ping
        ping6 ps pwd reboot rm rmdir rmmod setmac sh test tftp top traceroute
        umount wget

#
TestKernLog      echo             monitor_recv     tcci
\[               ethcmd           monitor_send     tce
acd              flashctl         mount            telnetd
adslcmd          free             msntp            test
ash              fuser            multicast_test   testftp
atmcmd           hostname         mv               tftp
boot_flashing    httpd            pc               top
brctl            igmp_proxy       ping             traceroute
busybox          inadyn           ping6            traceroute1
cat              ip               pppd             udpechos
cliagent         ip6tables        ps               umount
cp               iptables         pwd              w
cpeserver        kill             ripngd           wan
cspd             killall          rm               wbctl
date             ledkeytest       rmdir            wget
ddns3            ln               routed           wgets
df               login            sendcmd          wificali
diagput          ls               sendoamlb        wlancmd
dipc             lua              setmac           wput
dnsmasq          memtool          sh               wput_ftp
dropbear         mkdir            sweth_ctl
dtdns            mknod            sys
ebtables         mld_proxy        tc
#
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: burakkucat on December 21, 2016, 09:22:05 PM
Welcome to the Kitz forum.  :)

The ZTE ZXHN H168N is an unfamiliar device, to me. Perhaps other members may know something about it?
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: kitz on December 23, 2016, 01:41:01 PM
I dont know anything about this particular router Im afraid, nor am I a Linux bod   
The Busybox commands are like small apps within the actual shell.
Although some apps may be installed, its up to the manufacturer whether its enabled to work with their hardware and what parameters are available.


>> i am unable to get FTP working.

I dont see the ftp demon (ftpd) installed - no idea what the testftp is :/

>> i am unable to change telnet permissions.

issuing the command telnetd --help should give you the list of options enabled by the manufacturer and any parameters that may be available to change.

>> 3-tweak my dsl line for better performance (SNR, data path[FAST instead of interleaved] etc)

Many of those parameters (eg Interleaved) are controlled at the DSLAM.  You may have some luck with SNR but it depends upon the Service Provider and if they actually allow that param to be tweaked. 

Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on December 28, 2016, 11:41:05 PM
my biggest problem is that commands doesnt print help while it should!
how can i fix this?

thanks
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: burakkucat on December 29, 2016, 03:05:31 PM
my biggest problem is that commands doesnt print help while it should!
how can i fix this?

With embedded systems based on SoC, most of the commands are symbolic links to the busybox binary file.

To attempt to fix the problem that you are experiencing, you would need to check and, if necessary, fix the busybox sources. Once that has been done, the firmware package would have to be recreated. Finally the new firmware image would need to be uploaded to the device.

Overall, that is a very big task and not one that I would like to attempt.
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on January 04, 2017, 02:41:31 AM
ok
new info
i used the ps command before and after opening telnet session and discovered that telnet uses "cliagent" in "/bin/cliagent"

how can i run cliagent correctly and without the telnet restrictions?
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on February 24, 2017, 11:42:09 AM
I managed to find these commands

wan dmt2 set snrmoffset xx xx (snr tweak)
wan dmt2 set path x (0-2 channel profile fast interleaved)
wan adsl reset

wan vdsl2 set target_snrm xx (snr tweak vdsl2)
wan vdsl2 set max_ds_rate xx (something about data rate)
wan vdsl2 set manual_pms on/off (something about channel profile)
wan vdsl2 set inpdelay_pms xx (same ^)
wan vdsl2 set tcm_tx on/off (idk)
wan vdsl2 set tcm_rx on/off (idk)

when i enter these commands they have affects on my router ...
people refer to these as trendchip commands
now i need to get the rest of the commands with enough explaining about what it does.

would anyone give me a full detailed list of xDSL related commands? (you can telnet/ssh your router to get the commands and post here)
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: roseway on February 24, 2017, 11:58:08 AM
The commands depend on the DSL chipset and the modem firmware, so only someone who knows this particular modem would be able to provide that information. We know a lot about Broadcom based modems, but not so much about Trendchip.
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on February 24, 2017, 11:58:53 AM
The commands depend on the DSL chipset and the modem firmware, so only someone who knows this particular modem would be able to provide that information. We know a lot about Broadcom based modems, but not so much about Trendchip.
these commands are the same for tp-link zte zyxel asus and others...

share the commands you know and i will test
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: burakkucat on February 24, 2017, 04:29:07 PM
share the commands you know and i will test

The following is from a ZyXEL VMG1312-B10D . . .

Code: [Select]
$ xdslctl --help
Usage: xdslctl start [--up] <configure command options>
       xdslctl stop
       xdslctl connection [--up] [--down] [--loopback] [--reverb]
           [--medley] [--noretrain] [--L3] [--diagmode] [--L0]
           [--tones <r1-r2,r3-r4,...>] [--normal] [--freezeReverb] [--freezeMedley]
       xdslctl configure/configure1 [--mod <a|d|l|t|2|p|e|m|M3|M5|v>] [--lpair <(i)nner|(o)uter>]
           [--trellis <on|off>] [--snr <snrQ4>] [--bitswap <on|off>] [--sesdrop <on|off>]
           [--sra <on|off>] [--CoMinMgn <on|off>] [--i24k <on|off>] [--phyReXmt <0xBitMap-UsDs>]
           [--Ginp <0xBitMap-UsDs>] [--TpsTc <0xBitMap-AvPvAaPa>] [--monitorTone <on|off>]
           [--profile <0x00 - 0xFF>|<"8a |8b |8c |8d |12a |12b |17a |30a">] [--us0 <on|off>]
           [--dynamicD <on|off>] [--dynamicF <on|off>] [--SOS <on|off>] [--maxDataRate <maxDsDataRateKbps maxUsDataRateKbps maxAggrDataRateKbps>]
           [--forceJ43 <on|off>] [--toggleJ43B43 <on|off>]
       xdslctl bert [--start <#seconds>] [--stop] [--show]
       xdslctl afelb [--time <sec>] [--tones] [--signal <1/2/8>]
       xdslctl qlnmntr [--time <sec>] [--freq <msec>]
       xdslctl inm [--start <INMIATO> <INMIATS><INMCC><INM_INPEQ_MODE><INM_INPEQ_FORMAT>] [--show]
       xdslctl snrclamp [--shape <shapeId>] [--bpshape [bpIndex-bpLevel,]]
       xdslctl nlnm [--show ] [--setThld <Thld_Num_Tones>]
       xdslctl diag [--logstart <nBytes>] [--logpause] [--logstop] [--loguntilbufferfull <nBytes>] [--loguntilretrain <nBytes>] [--dumpBuf <sizeKb>]
       xdslctl ntr [--start [output freq(default is 8000)]] [--stop]
       xdslctl info [--state] [--show] [--stats] [--SNR] [--QLN] [--Hlog] [--Hlin] [--HlinS] [--Bits]
           [--24hrhiststat][--pbParams] [--linediag] [--linediag1] [--reset] [--vendor] [--cfg] [--webstats]
       xdslctl profile [--show] [--save] [--restore]
       xdslctl --version
       xdslctl --help
$
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: j0hn on February 24, 2017, 04:34:54 PM
these commands are the same for tp-link zte zyxel asus and others...

share the commands you know and i will test
No they aren't.
The Asus's use mediatek chipsets and their commands are totally different to Broadcom commands.
Some TP-Links have Lantiq chipsets and all Lantiq commands are totally different to both the mediatek chipsets and Broadcom chipsets.
Most (if not all) Zyxel's use Broadcom chipsets.

The commands you just posted don't match either Broadcom, Lantiq or the Mediatek chipset commands.

According to OpenWRT the ZTE modem to mentioned uses a Broadcom BCM63168 chipset. However those are not Broadcom commands. ZTE must be using some trickery if those commands have any affect on a VDSL2 circuit.
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on February 24, 2017, 05:27:21 PM
I managed to find these commands

wan dmt2 set snrmoffset xx xx (snr tweak)
wan dmt2 set path x (0-2 channel profile fast interleaved)
wan adsl reset

wan vdsl2 set target_snrm xx (snr tweak vdsl2)
wan vdsl2 set max_ds_rate xx (something about data rate)
wan vdsl2 set manual_pms on/off (something about channel profile)
wan vdsl2 set inpdelay_pms xx (same ^)
wan vdsl2 set tcm_tx on/off (idk)
wan vdsl2 set tcm_rx on/off (idk)

when i enter these commands they have affects on my router ...
people refer to these as trendchip commands
now i need to get the rest of the commands with enough explaining about what it does.

would anyone give me a full detailed list of xDSL related commands? (you can telnet/ssh your router to get the commands and post here)

most commands in my post worked.
try to identify its chipset and post full commands
Title: Re: Need help with CLI Commands of ZTE H168N VDSL modem router
Post by: ZTE_SU on February 24, 2017, 05:27:53 PM
The following is from a ZyXEL VMG1312-B10D . . .

Code: [Select]
$ xdslctl --help
Usage: xdslctl start [--up] <configure command options>
       xdslctl stop
       xdslctl connection [--up] [--down] [--loopback] [--reverb]
           [--medley] [--noretrain] [--L3] [--diagmode] [--L0]
           [--tones <r1-r2,r3-r4,...>] [--normal] [--freezeReverb] [--freezeMedley]
       xdslctl configure/configure1 [--mod <a|d|l|t|2|p|e|m|M3|M5|v>] [--lpair <(i)nner|(o)uter>]
           [--trellis <on|off>] [--snr <snrQ4>] [--bitswap <on|off>] [--sesdrop <on|off>]
           [--sra <on|off>] [--CoMinMgn <on|off>] [--i24k <on|off>] [--phyReXmt <0xBitMap-UsDs>]
           [--Ginp <0xBitMap-UsDs>] [--TpsTc <0xBitMap-AvPvAaPa>] [--monitorTone <on|off>]
           [--profile <0x00 - 0xFF>|<"8a |8b |8c |8d |12a |12b |17a |30a">] [--us0 <on|off>]
           [--dynamicD <on|off>] [--dynamicF <on|off>] [--SOS <on|off>] [--maxDataRate <maxDsDataRateKbps maxUsDataRateKbps maxAggrDataRateKbps>]
           [--forceJ43 <on|off>] [--toggleJ43B43 <on|off>]
       xdslctl bert [--start <#seconds>] [--stop] [--show]
       xdslctl afelb [--time <sec>] [--tones] [--signal <1/2/8>]
       xdslctl qlnmntr [--time <sec>] [--freq <msec>]
       xdslctl inm [--start <INMIATO> <INMIATS><INMCC><INM_INPEQ_MODE><INM_INPEQ_FORMAT>] [--show]
       xdslctl snrclamp [--shape <shapeId>] [--bpshape [bpIndex-bpLevel,]]
       xdslctl nlnm [--show ] [--setThld <Thld_Num_Tones>]
       xdslctl diag [--logstart <nBytes>] [--logpause] [--logstop] [--loguntilbufferfull <nBytes>] [--loguntilretrain <nBytes>] [--dumpBuf <sizeKb>]
       xdslctl ntr [--start [output freq(default is 8000)]] [--stop]
       xdslctl info [--state] [--show] [--stats] [--SNR] [--QLN] [--Hlog] [--Hlin] [--HlinS] [--Bits]
           [--24hrhiststat][--pbParams] [--linediag] [--linediag1] [--reset] [--vendor] [--cfg] [--webstats]
       xdslctl profile [--show] [--save] [--restore]
       xdslctl --version
       xdslctl --help
$

Thanks