找到方法了,首先要补全界面包,然后在VI修改,如下,
必须先补全shell,共需修改两个文件
telnet 192.168.1.1 (华为界面IP:192.168.100.1)
root
adminHW (华为界面:admin,输入不显示,区分大小写,直接回车)
su
shell
cd /mnt/jffs2 (cd后有空格)
vi hw_boardinfo (vi后有空格)
按键盘上的 i 开始编辑
obj.id = "0x00000001" ; obj.value = "1";^M
obj.id = "0x00000002" ; obj.value = "XXXXXXXXXXXXXXXX";^M
obj.id = "0x00000003" ; obj.value = "$2[]]V#895'NH\Gv7$=-iSE:RO3u>GeUOtxsU.Xnm($
obj.id = "0x00000004" ; obj.value = "$2ZnGHXkm!4=BWm4-\Gpo$uKQ}#sLk\Ex6uwFVEDlG+
obj.id = "0x00000005" ; obj.value = "$2T9_FA.$T7TJHNYXkI'KThH4AEnjMfXY(A$6cF0v+,
obj.id = "0x00000006" ; obj.value = "$2IiqL#K$->N)y!:3v=OnR{\>#L;0VEZ2F^DKDX~:2$
obj.id = "0x00000007" ; obj.value = "XXXXXXXXXXXXXXXX";^M
obj.id = "0x00000008" ; obj.value = "XXXXXXXXXXXXXXXXXXXX";^M
obj.id = "0x0000000a" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000000b" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000022" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000023" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000024" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000002d" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000002e" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000002f" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000030" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000000c" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000000d" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000000e" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x0000000f" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000010" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000011" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000012" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000013" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000025" ; obj.value = "XX:XX:XX:XX:XX:XX";^M
obj.id = "0x00000016" ; obj.value = "$2K@unEEuB,8UzGG~\Zh%+$uFg,E0;KW2zcz=m_HeDM
obj.id = "0x00000018" ; obj.value = "0";^M
obj.id = "0x00000019" ; obj.value = "01FFFFFFFF011FFF19HWTC5153A09F7B";^M
obj.id = "0x0000001a" ; obj.value = "COMMON";^M 联通
obj.id = "0x0000001b" ; obj.value = "GXCU";^M 广西联通
obj.id = "0x0000001c" ; obj.value = "0";^M
obj.id = "0x0000001d" ; obj.value = "1";^M
obj.id = "0x0000001e" ; obj.value = "1";^M
obj.id = "0x0000001f" ; obj.value = "1";^M
obj.id = "0x00000020" ; obj.value = "";^M
obj.id = "0x00000021" ; obj.value = "0";^M
obj.id = "0x00000031" ; obj.value = "CHOOSE_UNICOM2";^M 联通
obj.id = "0x00000034" ; obj.value = "00:00:00:00:00:0C";^M
obj.id = "0x00000035" ; obj.value = "SMART";^M 联通
obj.id = "0x00000039" ; obj.value = "0x00102001";^M
obj.id = "0x0000003a" ; obj.value = "@CN#Common&";^M
obj.id = "0x0000003c" ; obj.value = "0x00102001";^M
obj.id = "0x0000003d" ; obj.value = "0x00000000";^M
obj.id = "0x0000003e" ; obj.value = "0x00000000";^M
obj.id = "0x0000003f" ; obj.value = "0x00000000";^M
obj.id = "0x00000041" ; obj.value = "";^M
obj.id = "0x00000042" ; obj.value = "0";^M
obj.id = "0x00000043" ; obj.value = "";^M
obj.id = "0x00000046" ; obj.value = "0";^M
obj.id = "0x00000047" ; obj.value = "0";^M
obj.id = "0x00000052" ; obj.value = "$2g6I4Q!0,xQ0t+L>GSyR~t\yu2UxVEKzz7|3P6On(<
obj.id = "0x00000058" ; obj.value = "0";^M
obj.id = "0x00000059" ; obj.value = "1";^M
obj.id = "0x0000005a" ; obj.value = "0";^M
要改的位置
obj.id = "0x0000001a" 联通 COMMON 电信E8C 移动为 CMCC
obj.id = "0x0000001b" 广西联通 GXCU 河南电信 HENCT E8C 北京移动 BJCMCC_RMS 华为COMMON (未注册 移动 CMCC_RMS 联通 UNICOM 电信 CTCOM)
obj.id = "0x00000031" 联通 CHOOSE_UNICOM2 移动 CHOOSE_CMCC_RMS2 电信CHOOSE_XINAN 华为 NOCHOOSE (联通/移动有些后面没2)
obj.id = "0x00000035" 联通 SMART 移动 SMART 电信/华为 无
按 ESC 退出编辑,然后输入 :wq (冒号也要输入),回车保存修改。(如果遇到 :wq 无法保存的,用 :wq! 即可强制保存)
exit
reset
光猫重新启动后完成修改。
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
用同样方法修改 hw_boardinfo.bak 备份文件,修改完成后退出编辑状态、保存修改。
telnet 192.168.1.1 (华为界面IP:192.168.100.1)
root
adminHW (华为界面:admin,输入不显示,区分大小写,直接回车)
su
shell
cd /mnt/jffs2 (cd后有空格)
hw_boardinfo.bak (vi后有空格)