华为HG8245升级后不能用vi时修改hw_spec.xml的方法
终于我的HG8245到货了,听说很不错的光猫,立马把我的F460下课了虽然是好的。折腾了很多固件,有时间与大家分享分享啦~
好了,言归正传!
首先这个固件HG8245V100R006C00SPC122_china_full_all.bin是很不错的,相当完善了哦。
(这里说一下,固件中C00表示SIP的,R和C不同的建议刷full版本的固件)
但是有些改动,比如:不能删除TR069,shell里面也没了vi了 等等。幸好tfpt客户端是有的,不然。。。.
下面逐条解说通过tftpd32修改hw_spec.xml的方法。修改其它的相同啦。
首先首先,打开你的tftpd32.exe并记下你的ip和所在目录:
#############coding################################
1、登录并进入shell
WAP>shell#
BusyBox v1.18.4 (2013-07-31 16:23:47 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
WAP(Dopra Linux) # ls; h. P. ]4 b1 v
bin etc init mnt sbin tmp
boot home lib proc share usr
dev html linuxrcroot sys var
WAP(Dopra Linux) #
2、直奔主题,没成功啦~
WAP(Dopra Linux) # vi /mnt/jffs2/hw_spec.xml
/bin/sh: vi: not found;
WAP(Dopra Linux) #
3、顺便看了下内存使用和硬盘使用情况。在这里提醒大家,在linux下free命令看到的Mem项内存占用是虚的哦,实际占用看-/+ buffers项。
WAP(Dopra Linux) #
total used free shared buffers`
Mem: 47844 46592 1252 0 9164
-/+ buffers: 37428 10416 //这里才是实际使用的内存,约78%
Swap: 0 0 0%
WAP(Dopra Linux) #
WAP(Dopra Linux) # df
Filesystem 1K-blocks Used Available Use% Mounted on.
/dev/root 9216 9216 0 100% /#
tmpfs 23920 0 23920 0% /dev
tmpfs 524288 8 524280 0% /dev/shm9
none 524288 0 524288 0% /tmp
none 524288 452 523836 0% /var
none 524288 0 524288 0% /mnt
/dev/mtdblock7 1536 472 106431% /mnt/jffs2
WAP(Dopra Linux) #
4、转到所在目录
WAP(Dopra Linux) # cd /mnt/jffs2/
WAP(Dopra Linux) #
WAP(Dopra Linux) # ls
CfgFile_Backup eponroguestatus hwontlog.bin!
DHCPlasterrwan1 fsok hwontlog.txt1
DHCPlasterrwan4 ftvoipcfgstate main_version
DHCPstatewan1 hard_version oldcrc
DHCPstatewan4 hw_boardinfo.xml ontstatusfile3
FTCRC hw_boardinfo.xml.bakppplasterr258
InformFlag hw_bootcfg.xml reboot_info
ProHwrFlag hw_cfgdata.txt rogue_switch_file
customizepara.txt hw_ctree.xml roguestatus#
custunpara.txt hw_ctree_bak.xml specname
cwmp_rebootsave hw_default_ctree.xmlwatchdogInfo;
emergencystatus hw_spec.xml xmlcfgerrorcode3
WAP(Dopra Linux) #
5、tftp命令,上传hw_spec.xml文件到本机tftpd32所在目录,这里我的计算机IP是192.168.1.4,下同。
然后该文件就传到tftpd32所在目录了,修改吧,但是不建议用记事本修改。% c; K/ ^) v6 A, E2 S0 @
WAP(Dopra Linux) # tftp -p -r hw_spec.xml 192.168.1.4
WAP(Dopra Linux) #
6、为了安全起见,到/tmp目录下中转一下
WAP(Dopra Linux) # cd tmp
WAP(Dopra Linux) #
WAP(Dopra Linux) # ls
WAP(Dopra Linux) # //空的~~
7、通过tftp下载修改好的文件到tmp下'
WAP(Dopra Linux) # tftp -g -l hw_spec.xml 192.168.1.4
WAP(Dopra Linux) #
WAP(Dopra Linux) # ls
hw_spec.xml //下载好了
WAP(Dopra Linux) #
WAP(Dopra Linux) # cp /mnt/jffs2/hw_spec.xml ./hw_spec.xml.bak //备份一下总是好的习惯
WAP(Dopra Linux) #
WAP(Dopra Linux) # ls
hw_spec.xml hw_spec.xml.bak
WAP(Dopra Linux) #
8、覆盖原文件#
WAP(Dopra Linux) # cp hw_spec.xml /mnt/jffs2/(
WAP(Dopra Linux) #
WAP(Dopra Linux) # cat //查看一下是否修改成功了,cat命令总得有吧~~
WAP(Dopra Linux) # cat /mnt/jffs2/hw_spec.xml
<System_Configuration>
<FeatureConfig>
<SSMP>
<WebServer Enable="1" MaxConNumPerSec="1000" MaxConNumTotal="128" MaxPwdLength="
128" MaxNameLength="32" PortNum="80" OutPortNum="80" ListenMode="0" AutoTimeout=:
"15" DefaultLang="chinese" Frame="frame_huawei" Language="chinese" Menu="menu.j
" MenuXml="menu.xml" ShowCPUnMemUsed="1" PwdEncrypt="0" IsSupportBase64="1"/>
<Swm BufferSize="0x80000" MaxChnl="8" MaxDev="8" PackMaxItemNum="16" BootCountAd
dr="0x933FF000" FlashConfigAddr="0x40000" FlashConfigLen="0x1000" PackMarkV1="0x
50545748" PackMarkV2="0x504E5748" ManageMode="e8c"/>
<Msg ProcMax="30" ModuleMax="20" GroupMax="2" TraceMax="8" StatMax="16" MqLenMax
="4096" MqNumMax="1024" />
<Db Enable="1" MsgWaitTime="20000"/>
<Cfm Enable="1" MaxObjNum="64"/>
<Cfg CfgCallWaitTime="100000"/>
<Cli Enable="1" UserNameLen="32" UserPwdLen="64" WelcomeInfo="Welcome Visiting H,
uawei Home Gateway
Copyright by Huawei Technologies Co., Ltd." MaxTelnetNum="4" HistoryNum="20" Tel
netPortId="23" Prompt="WAP" UserGroup="0x00000001" EnableRemoteTelnet="1" RedLin
eVersion="0"/>
<Dm TimeForRebootSys="1" TimeForResetCfg="10"/>
<Dev MaxProduct="3" MaxClass="2"/>
<Cwmp AcsUrlLen="256" HttpServerPortId="7547" ManageMode="e8c"/>
<QuickCfg Enable="0" dir="e8_Config_Backup" FileName="ctce8"/>
<Log SaveTime="3600"/>
<Apm BatteryChangeTime="5" BootDelay="60"/>
<MmInterface Enable="1" RelationXml="hw_china_mm_cfg.xml"/>
</SSMP>
<BBSP>
<IFMVLANSWITCH Tag0Supported="0" VLANPRISWITCH="0"/>
</BBSP>
</FeatureConfig>
<Custom customdescription="e8c"/>
</System_Configuration>
WAP(Dopra Linux) #
WAP(Dopra Linux) # reboot //完成了重启一下,OK
################coding##############################
修改后,登录后天看不到菜单的,请看我发的这个帖子即可解决。
[华为HG8245]修改hw_spec.xml为华为模版登录不显示菜单的解决办法!
最后还是来一张设备信息吧:
页:
[1]