sabato 24 novembre 2012

Buffalo releases a new firmware 1.79

New official firmware from Buffalo dated 21 November 2012

Download (1.79)

Changelog

Any comments are welcome :)

Buffalo WBMR - Build r34318

New release - build r34318

Log OpenWrt:
logs r34168-r34318

Changelog:
Compiled with gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11)
Various bugfixes

Known issues:
You have to edit the /etc/init.d/dsl_control file to make ADSL work.

Mirror:
r34318

mercoledì 21 novembre 2012

Buffalo WBMR-HP-G300H How to recover from bricking


How to recover from bricking by saffo

The router bootloader has a tftp client, which will try to connect to 192.168.11.2 and load a file called firmware.ram.

1. Build ramdisk image. These images have uImage in their name, but you can't take the one which you get a during normal build or download. You have to setup a buildroot environment and configure it to build a ramdisk image (make menuconfig –> Target Images –> ramdisk). 

Here's my (rename the file) firmware.ram

And here is my latest trunk build as a backup r33530 (there is no dsl_control bug which is present in r34168)

2. Install and start a tftp server. For linux there is a package called tftpd-hpa and on MacOS X TftpServer Version 3.4.1 was used. If you use Windows, you can use this free tftp-server tftpd32

3. Copy the firmware.ram into the root directory of your tftp server (e.g. /srv/tftp or /var/lib/tftp or your current directory depending on your software)

4. Setup your interface. It doesn't matter which port of the router you use. Set your IP to 192.168.11.2/24. 

5. Push the AOSS button and power on the router. Keep the AOSS button for about 5 seconds pushed. When the AOSS button is pushed the LED below power will also light up on start. You can verify with wireshark, if everything works as expected. There should be a tftp request from 192.168.11.1 to 192.168.11.2 for a file firmware.ram. Then This file will be transmitted and after that the ip 192.168.11.1 vanishs, because you see your computer asking to whom this ip belongs.

6. Wait. If you have wifi configured in your image you see wifi come up after a while. Another way is to ping 192.168.1.1 or the ip you have configured in your image. You may also do a DHCP request, which will be answered if your router booted fine. My router did not give any signal via LED if it is ready or not. Also during normal operation no LED is on, except for the one in the LAN ports.

7. Flash a working image. Now you have access again, but keep in mind, that this image is not flashed and only runs in ram. Flash a clean image via your preferred way. You can do this with the webinterface or ssh/telnet and sysupgrade.

I suggest you to use Wireshark during the entire process.

Remember to change the IP for your NIC to 192.168.1.XXX or use DHCP! The firmware.ram do not use 192.168.11.0/24

This is what I did once to recover from a brick(I don't really think it really was, but something went wrong). This is NOT entirely written by me but partially edited from the official openwrt wiki Buffalo WBMR OpenWrt Wiki

martedì 20 novembre 2012

Compile a minimal OpenWRT build


I prefer using ArchLinux due to its bleeding edge packages version, but any linux distro will work fine.

pacman -S subversion git python python2 unzip base-devel(in case you don't have it, kinda odd though) - (http://wiki.openwrt.org/doc/howto/bu...gence#examples for other distros)
svn co svn://svn.openwrt.org/openwrt/trunk
cd trunk
./script/feeds update -a
./script/feeds install -a
make package/symlinks
make menuconfig 
Target System ---> Lantiq GPON/XWAY/SVIP
Subtarget ---> AR9
Target Profile ---> WBMR - Buffalo WBMR-HP-G300H
Target Images ---> squashfs (jffs2 if you want)
Advanced  configuration options
    Target Options ---> -Os -pipe -mips32r2 -mtune=34kc -fno-caller-saves
    Toolchain Options ---> GCC compiler Version ---> 4.6.x with Linaro or 4.7.x with Linaro
LuCI
    Collections --->   <*> luci
    Applications ---> <*> luci-app-ddns
                             <*> luci-app-upnp
Kernel Modules 
   Network Devices
    <*>kmod-ltq-dsl-firmware-a-ar9 for Annex A 
    <*>kmod-ltq-dsl-firmware-b-ar9 for Annex B - default - YOU MUST USE ONLY ONE
  Wireless Drivers
    <*>kmod-ath9k
Network    
    <*>hostap-mini
    <*>hostap-utils
Now you can save the configuration.
make ( make -jX - X for each CPU core)
cd bin/lantiq/
scp openwrt-lantiq-ar9-WBMR-squashfs.image root@192.168.1.1:
ssh root@192.168.1.1
mtd -r write openwrt-lantiq-ar9-WBMR-squashfs.image linux


Buffalo WMBR-HP-G300H - Firmware status

First of all, as first post, I am going to do a small brief about the Buffalo WBMR builds (official or not)

The latest original firmware for this router is available here:
Firmware - Changelog - Version 1.78

My latest OpenWrt build is @r34168***:
Trunk@r34168 - SHA1 b610ca69c75bf866b0d10435d43a604dcd339d64 

If you prefer the latest DD-WRT build, you can download it from their public FTP:

This OpenWrt includes:
DDNS
IPv4 (IPv6 is NOT present)
UPNP+NAT-PMP

It is a very minimal build.

***
There is a problem in /etc/init.d/dsl_control file.
It calls /sbin/dsl_cpe_control with "-f /lib/firmware/dsl-fw-${fwannex}.bin" when it should be "/lib/firmware/ltq-dsl-fw-${fwannex}-ar9.bin" but still it doesn't work!
If I edit it to ltq-dsl-fw-a-ar9.bin (annex a) my adsl works.
So be careful after flashing this build...the fix is work in progress.
***