1. 準(zhǔn)備工作
一臺(tái)裝有openwrt的, 帶有無(wú)線網(wǎng)卡的路由器
一臺(tái)cr6606或cr660x路由器
一臺(tái)windows電腦
一根網(wǎng)線
2.openwrt路由器設(shè)置
3.解鎖ssh
3.1 降級(jí)系統(tǒng), 打開(kāi)路由器設(shè)置頁(yè)面, 系統(tǒng)設(shè)置, 手動(dòng)升級(jí)。(如果買回來(lái)沒(méi)升級(jí)過(guò), 可跳過(guò)此步驟)
3.2 降級(jí)完成后, 設(shè)置完成后, 打開(kāi)路由器設(shè)置首頁(yè)
3.3復(fù)制瀏覽器地址欄,得到類似以下地址
http://192.168.31.1/cgi-bin/luci/;stok=3a1dfecafba226ad8fc8a5780652933a/web/home#router
3.4 從地址中取得stok值, 比如我的值為
3a1dfecafba226ad8fc8a5780652933a
3.5 在地址欄輸入以下地址
注意替換自己的stok, wifi名稱, wifi密碼
http://192.168.31.1/cgi-bin/luci/;stok=<stok>/api/misystem/extendwifi_connect?ssid=<ssid>&password=<password>
比如我的情況如下
http://192.168.31.1/cgi-bin/luci/;stok=3a1dfecafba226ad8fc8a5780652933a/api/misystem/extendwifi_connect?ssid=abcd&password=12345678
等待網(wǎng)頁(yè)返回此內(nèi)容
{"msg":"connect succces!","code":0}
3.6 在地址欄輸入以下地址
注意替換自己的stok
http://192.168.31.1/cgi-bin/luci/;stok=<stok>/api/xqsystem/oneclick_get_remote_token?username=xxx&password=xxx&nonce=xxx
比如我的情況如下
http://192.168.31.1/cgi-bin/luci/;stok=3a1dfecafba226ad8fc8a5780652933a/api/xqsystem/oneclick_get_remote_token?username=xxx&password=xxx&nonce=xxx
等待網(wǎng)頁(yè)返回此內(nèi)容
{"token":"; nvram set ssh_en=1; nvram commit; sed -i 's/channel=.*/channel=\u0022debug\u0022/g' /etc/init.d/dropbear; /etc/init.d/dropbear start;","code":0}
3.7 計(jì)算ssh密碼
打開(kāi)路由器管理頁(yè)面, 復(fù)制sn碼, 右下角
打開(kāi)以下頁(yè)面,輸入sn碼,計(jì)算ssh密碼
https://www.oxygen7.cn/miwifi/
復(fù)制密碼
3.8 使用putty工具登錄ssh
4. 刷入pbboot, cr6606需要, 其他版本路由器跳過(guò)
4.1 使用scp工具上傳pb.img文件
注意pb-boot.img存放地址,這個(gè)需要修改為自己的
scp "C:\Users\duan\Downloads\pb-boot.img" root@192.168.31.1:/tmp/
4.2 刷入pb-boot
使用putty登錄ssh后,輸入以下命令
cd /tmp
mtd -r write /tmp/pb-boot.img Bootloader
等待路由器重啟,耐心等待,橙色等常亮?xí)r,拔電源
4.3刷入breed
- 用針插入路由器reset孔,并插電,等待橙色等閃爍,松開(kāi)針,電腦打開(kāi)192.168.1.1
-
選擇breed文件,選擇刷入,并等待
4.4 刷入cr6608 pboot
-
等待上一步完成,并刷新192.168.1.1網(wǎng)頁(yè),在bootloader選擇cr6608的pbboot, 并點(diǎn)擊上傳且刷入
耐心等待, 等待橙色燈常亮