Showing posts with label buffalo. Show all posts
Showing posts with label buffalo. Show all posts

2021-01-30

不小心, 又把 WZR-HP-G300N 刷壞了

原本是 OpenWRT, 不小心直接刷 DD-WRT, 導致無法開機 

bootloader 沒壞

使用刷 WZR-HP-G450H 的方式救回 

https://digi9.net/221/openwrt-fix-loi-firmware-router-buffalo-wzr-hp-g450h/#.XDI5XIxR3tQ

2017-02-20

WHR-G300N (v1)

主要参考文件 :
Flash from Buffalo stock firmware to DD-WRT
Refer WHR-G300N on DD-WRT WIKI

------------------------------------------------------------
主機板訊息: WRTR-237GN_V02; 190-k05-7700R

------------------------------------------------------------
Wireless MAC (SSID): 00-24-a5-3d-9f-e8
LAN MAC : 00-1d-73-11-11-12
WAN MAC : 00-1d-73-11-11-13

------------------------------------------------------------
原廠 firmware 換成 DD-WRT 的過程:

1) 設定網路 IP : 192.168.11.2, NETMASK : 255.255.255.0, gateway : 192.168.11.1
2) 使用 "arp -a", 確認 192.168.11.1 有出現, ping 192.168.11.1 也正常回應
3) power off router
3) dos command> tftp -i 192.168.11.1 PUT firmware.tftp, 並立即 power on router. 通常 router 只等你幾秒的時間

------------------------------------------------------------
DD-WRT 啟動上有些困難, 原因還不是很清楚, 暫時解法如下:

使用 "arp -a", 確認 192.168.1.1 有出現
若無 (192.168.1.1 cannot link with 00-1d-73-11-11-12),
1) ipconfig /flushdns
2) ipconfig /release
3) ipconfig /renew
4) "route print" 找出 INTERFACE ID
5) netsh interface ipv4 add neighbors %INTERFACE% %ROUTERIP% %ROUTERMAC%

事後, netsh interface ipv4 delete neighbors %INTERFACE%

LED display/Reset Button 不太正常, 暫時不理會

------------------------------------------------------------
如何進入 U-BOOT command mode,
USB 轉 TTL+putty, speed : 57600, 啟動後立即按 "4", 而不是一般所說的 Ctl+C

不穩定, 不是每次都可進入? 應該是焊接工夫有問題

------------------------------------------------------------
Serial port pin layout:
pin 1 : 3.3V (square pad)
pin 2 : Tx
pin 3 : Rx
pin 4 : GND

------------------------------------------------------------
(未測過)
You can install the original encrypted buffalo firmware by decrypting it first. To do so follow these steps (on linux, will probably work on other systems too):

Decrypt original Buffalo firmware:
1) get the files buffalo-enc.c buffalo-lib.c buffalo-lib.h from firmware-mod-kit
2) Compile: gcc -o buffalo-enc buffalo.c buffalo-enc.c
3) Get the encrypted, original firmware from the buffalo website
4) Open the file in a binary editor and remove the first few bytes to just before "the second start(?)" section
./buffalo-enc -d -i infile.enc -o firmware.bin
5) follow the procedure on [Guide] Recovering a bricked Buffalo Airstation N450 Router (WZR-HP-G450H)

2017-02-15

WZR-HP-G300NH2 migrate from OpenWRT to Buffalo factory firmware

參考文件
1: WZR-HP-G450H and TFTP original firmware

----------------------------------------------------------------------
Steps:

1. Download the openwrt source files and look for buffalo-enc.c, buffalo-lib.c, and buffalo-lib.h.

2. Open buffalo-enc.c and add the line to the top:

#include "buffalo-lib.c"

3. Use whatever C/C++ compiler you want, but I used gcc:

gcc -o buffalo-enc.prog buffalo-enc.c

4. Now you have the decryption program, but you'll need to strip off the first "start" section of the firmware using a hex editor. I used wxhexedit 0.22 (0.21 has a bug that disallows saving truncated files). You must highlight and delete the first 208 bytes of the firmware file up to the second "start" word in the file.

5. After saving this, run buffalo-enc.prog -d -i wzrhpg450h-pro-v24sp2-20025.enc -o decrypted.bin

6. This will produce feedback text in your terminal indicating the decryption was successful.

7. You may now use the Openwrt (or any firmware flash gui running from your router) and it won't complain of an invalid firmware image.

2017-02-10

WZR-HP-G300N2 + OpenWRT

IPV6 : Network>WAN 設定好就啟動了(當然, 必需先向中華電信申請使用 IPV6)

---------------------------------------------------
NNDS :

主要參考文件
1. DDNS client (openwrt ddns howto)
2. openwrt on GITHUB
3. Configuring your dynDNS Client

必須先安裝軟件及準備工作,
opkg update
opkg install wget
opkg install ddns-scripts luci-app-ddns-scripts
opkg install ddns-scripts_no-ip_com (若使用 no-ip.com 的服務)
mkdir -p -m0755 /etc/ssl/certs
wget  --no-check-certificate -O /etc/ssl/certs/ca-certificates.crt http://curl.haxx.se/ca/cacert.pem

1. NO-IP.com : IPV4 ... OK; IPV6 ... 試不出來

2. deSEC.io : IPV4 ... 沒試; IPV6 ... OK
DDNS Service provider [IPV6] ... [-custom-]
update url = https://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&myipv6=[IP]
先在 chrome browser 上, 執行一遍 "https://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&myipv6=[IP]"
並確認 /usr/bin/nslookup [DOMAIN], 正確執行無誤. 否則執行 /usr/lib/ddns/dynamic_dns_updater.sh xxx (xxx=configuration_name) 會有錯誤產生.
Use HTTP Secure : enabled
Path to CA-Certificate : /etc/ssl/certs/ca-certificates.crt

3. mydns.jp : IPV4 ... 沒試; IPV6 ... OK
DDNS Service provider [IPV6] ... mydns.jp
先在 chrome browser 上, 執行一遍 "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]"
並確認 /usr/bin/nslookup [DOMAIN], 正確執行無誤. 否則執行 /usr/lib/ddns/dynamic_dns_updater.sh xxx (xxx=configuration_name) 會有錯誤產生.
-------------------------------------------------