6.19.2012

wr-740 change firmware to openwrt + luci webUI

之前介紹過了使用RS232的方式更新firmware後,想到我還沒有介紹過如何從剛買回來時就直接改機為openwrt,這邊來說明一下
其實我一開始也是參考這篇文章:http://www.mobile01.com/topicdetail.php?f=110&t=2226398
 因為一開始也不知道怎麼改…非常感謝有人熱心放上網路

一、一開始就先進到這邊準備升級吧

 二、下載openwrt的firmware (其實是OS image啦)
參考這邊下載:http://wiki.openwrt.org/toh/tp-link/tl-wr740n
或是直接由這個連結下載:http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v1-squashfs-factory.bin
但是請注意一下,這是給V1.x和V2.x升級用的喔
我的是V2.4版,所以使用openwrt-ar71xx-generic-tl-wr740n-v1-squashfs-factory
如果是其它版本的,請到下面的連結去找你的版本,裡面也有V3.x和V4.x的
http://downloads.openwrt.org/snapshots/trunk/ar71xx/

三、下載下來後,就由(一)的畫面選擇你的檔案,並按軟體升級,然後靜靜等待,剛更新完的時候是沒有網頁的,也許有人問要怎麼知道已經完成了
我是看它上面的燈號,韌體升級完後,會自動開機,等到WAN或是LAN的燈號開始閃應該就是完成了
另外: 其它的文章都說要先把原廠的設定值改回出廠設定,但依我觀查RS-232的結果,應該是不需要這個動作的,因為在網頁更新時,可以從RS-232上看到的畫面如下,這表示他只是利用html傳檔的方式,放到它的/tmp下(這是ram),然後再把資料寫到flash中,是不是原廠設定應該沒關係


四、.更新完後,把電腦的IP設為192.168.1.2,再以telnet連線進去,不需要帳密
若看到下面的畫面就代表你成功了!!!!

五、再用「passwd」指令設定root的password(這是指向busybox的指令,表示busybox就有這個功能,不清楚busybox沒關係,這不是重點)
設完後telnet會關閉,然後sshd會啟動(因sshd一定要有密碼)
(其實sshd已經啟動了,只是因為沒有root的密碼,所以你也無法登入-->這是由comport更新firmware時看出來的)

六、因為沒有網頁的介面,所以我們來安裝個介面吧,這邊我裝過幾個版本,我還是覺得luci比較好用,所以這邊就以此為例

七、用sshd連線完成後,先下指令(這邊我是使用putty連線的)
opkg update
先取得目前的opkg的清單

八、安裝所有的LuCI套件,非https版本
opkg install luci
或是安裝LuCI套件,且支援HTTPS 的版本
opkg install luci-ssl

九、啟動uhttpd,並讓它在以後每次開機都會執行(剛安裝完並不會馬上啟動)
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
接著用 http://192.168.1.1  連到網頁

十、網頁的登入介面如下,使用的是你在ssh登入的帳密


十一、目前使用起來還蠻多功能的,但…沒有原廠的直覺…(我的感覺啦,原廠的比較簡單)
不過基本功能,連圖表統計功能都有了,感覺還蠻棒的!!
另外還可以新增wifi button的功能,超方便的!!-->就是為了它,我才刷的!!

最後補充一下,下面是我安裝 luci時產生的訊息,不管有沒有用,就先貼出來再說了
以下為安裝過程中的訊息:
root@OpenWrt:~# opkg install luci
Installing luci (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci_trunk+svn8187-1_ar71xx.ipk.
Installing uhttpd (30) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/uhttpd_30_ar71xx.ipk.
Installing luci-mod-admin-full (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-mod-admin-full_trunk+svn8187-1_ar71xx.ipk.
Installing luci-mod-admin-core (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-mod-admin-core_trunk+svn8187-1_ar71xx.ipk.
Installing luci-lib-web (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-web_trunk+svn8187-1_ar71xx.ipk.
Installing luci-lib-core (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-core_trunk+svn8187-1_ar71xx.ipk.
Installing lua (5.1.4-8) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/lua_5.1.4-8_ar71xx.ipk.
Installing liblua (5.1.4-8) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/liblua_5.1.4-8_ar71xx.ipk.
Installing libuci-lua (2011-11-14.1-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libuci-lua_2011-11-14.1-1_ar71xx.ipk.
Installing luci-lib-sys (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-sys_trunk+svn8187-1_ar71xx.ipk.
Installing luci-lib-nixio (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-nixio_trunk+svn8187-1_ar71xx.ipk.
Installing luci-sgi-cgi (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-sgi-cgi_trunk+svn8187-1_ar71xx.ipk.
Installing luci-lib-lmo (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-lmo_trunk+svn8187-1_ar71xx.ipk.
Installing luci-proto-core (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-proto-core_trunk+svn8187-1_ar71xx.ipk.
Installing luci-i18n-english (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-i18n-english_trunk+svn8187-1_ar71xx.ipk.
Installing luci-lib-ipkg (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-ipkg_trunk+svn8187-1_ar71xx.ipk.
Installing luci-theme-openwrt (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-theme-openwrt_trunk+svn8187-1_ar71xx.ipk.
Installing luci-theme-base (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-theme-base_trunk+svn8187-1_ar71xx.ipk.
Installing luci-app-firewall (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-app-firewall_trunk+svn8187-1_ar71xx.ipk.
Installing luci-proto-ppp (trunk+svn8187-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-proto-ppp_trunk+svn8187-1_ar71xx.ipk.
Installing libiwinfo-lua (23) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libiwinfo-lua_23_ar71xx.ipk.
Installing libiwinfo (23) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libiwinfo_23_ar71xx.ipk.
Configuring luci-lib-sys.
Configuring liblua.
Configuring libuci-lua.
Configuring lua.
Configuring luci-lib-core.
Configuring luci-lib-nixio.
Configuring luci-sgi-cgi.
Configuring luci-lib-lmo.
Configuring luci-lib-web.
Configuring luci-proto-core.
Configuring luci-i18n-english.
Configuring luci-mod-admin-core.
Configuring libiwinfo.
Configuring libiwinfo-lua.
Configuring luci-theme-base.
Configuring luci-theme-openwrt.
Configuring luci-app-firewall.
Configuring luci-lib-ipkg.
Configuring luci-proto-ppp.
Configuring luci-mod-admin-full.
Configuring uhttpd.
Configuring luci.
root@OpenWrt:~#

沒有留言: