OpenWrt Forum Archive

Topic: wzr-hp-ag300h progress

The content of this topic has been archived between 25 Aug 2016 and 5 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

For xabisoh struggling to upgrade...

If you have multiple network interfaces in your windows server, try

arp -a

at a command prompt.

It shows what arp entrys are assigned to which network interface.

My laptop has a wired, wireless and VPN interface.  When I was using the arp - S command, it was assigning this rule to the first interface, which in my case was wrong.  I disabled the wireless and VPN connections, ran the arp -S command again and then checked it using arp -a

NOTE - I had to use a switch in-between the Buffalo and my laptop to make it work.

regards

Paul Adams

padams wrote:

If you have multiple network interfaces in your windows server

I only have one interface, and arp shows the assignment to the correct area.

ichilton wrote:

I had the same problem - tried everything and couldn't get it to flash until I tried putting a switch inline and it worked first time.

I was able to borrow a switch today; unfortunately it did not resolve the timeout problem.

I have exhausted all the suggestions and info I have found. I am still within the return window, but I would like to take this action only as a last resort.

I am unsure how to proceed from here.

(Last edited by xabisoh on 4 Jul 2011, 20:50)

Sorry - don't know what else to suggest - other then is any kind of firewall turned off?  Mine did not want to upgrade directly connected or via a switch.  I was starting to think it was never going to work.  I tried a different switch - worked on the first try.



I have a question for the gurus - how do I enable the 5Ghz radio?  I've got LuCi running, I cannot see the 5Ghz radio anywhere.  Cannot see a reference to it in the /etc/config files either.

I'm running version 27340 - so I believe it should be working.

Do I need to find the second radio's MAC address and enable it in the network or wireless config files?  Can someone tell me how to trace the MAC asddress?

Thank you

Paul Adams


Update - there is a sticker on the back of the router with the last 6 digits of the MAC address.  The 5Ghz radio is a one number increment from the 2.4Ghz radio.

However - I fixed my problem by installing the lastest build of OpenWRT.  The 5Ghz radio was detected right away and a config placed in the /etc/config/wireless file.

(Last edited by padams on 5 Jul 2011, 23:03)

Hi,

Mine is the WZR-HP-G300NH so I don't think I have that, but i'd be interested to know in case I can get hold of a cheap AG300H at some point.

Thanks,

Ian

@xabisoh:  "thinking aloud" about other variables you could eliminate:

- Use another machine/OS (some Linux LiveCD/USB perhaps), in case something about the particular Ethernet driver in windows is delaying TFTP.
- Use another ethernet cable?  (bad cable "tolerated" under normal operation with higher protocol retransmits, but not over UDP-based TFTP).

Both pretty long shots, I know, but I'm pretty much out of ideas too.

Tried again last night with a different machine (a laptop running win 7) and a different switch I borrowed from work; still no luck.

I am starting to wonder if I am just doing something wrong in the process that is not immediately apparent.

What I believe are the correct steps, using a fresh host machine:

*) Plug host machine into switch; switch into ag300h (neither using the uplink port)
*) let dchp renew
*) arp -d 192.168.11.1
*) arp -s 192.168.11.1 02-aa-bb-cc-dd-20  (sometimes this fails with access denied). An alternative to force it is to use netsh interface ipv4 add neighbors "Local Area Connection" "192.168.11.1" "02-aa-bb-cc-dd-20"
*) Control Panel -> Networking -> Adapters; change ip to 192.168.11.2/255.255.255.0
*) unplug router from wall, then replug (I do not need to do a soft reboot do I?)
*) tftp -i 192.168.11.1 put <file>

Am I missing anything?

Will try a live cd tonight.

xabisoh wrote:

Tried again last night with a different machine (a laptop running win 7) and a different switch I borrowed from work; still no luck.

I am starting to wonder if I am just doing something wrong in the process that is not immediately apparent.

What I believe are the correct steps, using a fresh host machine:

*) Plug host machine into switch; switch into ag300h (neither using the uplink port)
*) let dchp renew

WHAT??????? dhcp renew????????
The host machine needs to have the host ip set manually to 192.168.11.2.  DO NOT USE DHCP!!  Also make sure that on the router, you are plugged into the port right next to the wan port.

Please see step 5; the first steps was to coerce arp to work.

xabisoh wrote:

Please see step 5; the first steps was to coerce arp to work.

Make it step 1, before the arp commands.

well, regardless, I cannot fathom the order is my problem. at the end, the machine has a static ip and is routing to the correct mac address.

Not sure what the Windows ethernet driver/stack does, but on Linux if I change an interface from dhcp to static, probably because that involves bringing it down then back up, that flushes the ARP cache, including the static entries, for addresses on the network the interface was on.  If Windows behaves the same way, you're probably losing the static ARP entry too.

So I'd make two changes:

- Make setting the host to a static IP to be the first step.
- Start TFTP, then power on the ag300h.

Another thing:  You implied that the borrowed switch has an uplink port.  Is it in fact a router and, if so, what network is its LAN using?  Even if it's 192.168.11.0/24 (the same as the ag300h's bootloader/TFTP state) and even serving DHCP that "should" be OK, but to be safe I'd prefer it to be something else.

Finally:  does the -i option make the Windows TFTP client work in binary mode?  What is its default timeout?

dimitris wrote:

that flushes the ARP cache

Windows seems to keep the arp entries (they are listed with -a). With my paranoia, I have overwritten the arp entry to point to the ag300h's lan mac and ping the router as a quick test to make sure it is still reachable, then flip it back to the uboot mac. This all sounds ass-backwards, i know, but windows just loves tossing access denied errors out when attempting to overwrite a gateway address.

Start TFTP, then power on the ag300h

Thanks for confirming when the transfer should begin.

You implied that the borrowed switch has an uplink port.

This really is a basic switch; consider the implication as an error on my part.

does the -i option make the Windows TFTP client work in binary mode?  What is its default timeout?

Yeah, -i forces binary. The timeout seems to be about 1 minute or so. I do not believe there are timeout options with the built-in win client.



Will try using a linux cd tonight when i get off work.

(Last edited by xabisoh on 6 Jul 2011, 18:35)

xabisoh wrote:

With my paranoia, I have overwritten the arp entry to point to the ag300h's lan mac and ping the router as a quick test to make sure it is still reachable, then flip it back to the uboot mac.

xabisoh:
I believe we are all trying to help.  These Buffalo routers are the quirkiest that I have ever come across to tftp, especially from windows.  For that reason, I use Fedora.   That said, if you are trying to ping the router then switch back to the uboot mac, the you are probably way too late.  The tftp window is 4 sec (tftp_wait in the uboot_env).  The wzr-hp-ag300h router does not respond to pings until AFTER the tftp window (that is why some scripts that ping the router with 0 wait time until the command does not return an error does not work with the newer Buffalo routers).  You have to be willing to try the different sequence even if it doesn't make any sense.  Hell, Windows networking doesn't make any sense.  Good luck!!

KingJL wrote:

if you are trying to ping the router then switch back to the uboot mac, the you are probably way too late.

When i mentioned about doing the ping, that is done before trying to reboot & push, just to verify I did not mess something up somewhere.

I think I may be a little too verbose in my explanations smile

I believe we are all trying to help.

I really do appreciate the suggestions being made, thanks for the effort!

I created idiot notes for myself - step by step


The following steps are used to load an OpenWrt firmware using TFTP on a Buffalo WZR-HP-AG300H from a Windows PC:

1) Connect computer to the router via switch, not directly.  The network port times out on Windows otherwise.
2) Set computer network card to an IP address in the 192.168.11.x range (e.g. 192.168.11.2).  The router will be 192.168.11.1.  Set gateway and DNS to 192.168.11.1
3) Add static arp entry for router from a command prompt using = arp -s 192.168.11.1 02-aa-bb-cc-dd-20
NOTE: check using arp -a what rules are bound to what network interfaces.  You may need to disable the other network interfaces for now.
4) Start TFTP transfer attempt from a command prompt using = tftp -i 192.168.11.1 PUT openwrt-ar71xx-generic-wzr-hp-g300nh-squashfs-tftp.bin
5) Quickly power on router
6) TFTP transfer completes - it's fast, like 20 seconds.

If it fails, unplug power from router, run the command again on the windows machine, plug the router in again.  I do this 3 or so times and eventually it works.

7) Delete static arp entry for router from command prompt using = arp -d 192.168.11.1
10) After the TFTP upload completes, the router will reboot and you should be able to telnet in, change the password, and continue with configuration. Since the router will be running OpenWrt, the IP address for the router will be 192.168.1.1, so don't forget to set the computer's IP address to 192.168.1.xx or re-enable DHCP.

Note: If TFTP timeouts are received, ensure that all firewalls are disabled AND make sure you are connected to the router via a switch.  If it still times out, try another switch.

Paul

@xabisoh: hopefully this might help.

I am running win7 and I had the same problems getting a firmware flashed with tftp. I found that 'arp' wasn't the command to use on win7 (even tho it still exists). Instead I used 'netsh' to clear the arp cache and setup the static route. From what I can tell win 2008 server should use netsh.

I posted this over at the dd-wrt forum, but I guess it would be more appropriate over here.

setup was [win7 box]---cat5e---[netgear WGR614 10/100]---cat5e---[wzr-hp-ag300h]
The netgear WGR614 was used to keep an active network connection to the win7 box and to force 100Mbps connection. The cat5e was plugged into the LAN port 4 (port closest to the WAN port) on the wzr-hp-ag300h.
Note: I tried this using a gigabit switch instead of the WGR614 connection and it failed to work. Anyone have success using 1Gbps connection?

I disabled all other network interfaces, turned off windows firewall, and set my nic to a static IP of 192.168.11.2

Opened cmd as an administrator (right click, select "run as administrator") and flushed the arp cache using

netsh interface ipv4 delete arpcache

You will need to replace "Local Area Connection" in the next step with whatever you named your network connection. You can obtain this by running

netsh interface show interface

made the win7 box static ip of 192.168.11.2 and added a static route using

netsh interface ipv4 add neighbors "Local Area Connection" "192.168.11.1" "02-aa-bb-cc-dd-20"

You have to use 02-aa-bb-cc-dd-20 for the MAC address since this is what the tftpd listens on when it boots up. This MAC address only applies to the wzr-hp-ag300h as KingJL had mentioned in an earlier post.

setup the tftp command

tftp -i 192.168.11.1 PUT openwrt-ar71xx-wzr-hp-ag300h-squashfs-tftp.bin

unplugged the router, waited 30sec, plugged it back in and executed the tftp command. once the link came active on the netgear switch tftp started its transfer, and resulted in

Transfer successful: 2752544 bytes in 3 second(s), 917514 bytes/s

red diag light started blinking faster then went out. flushed the arp cache, changed the win7 box to 192.168.1.2 static ip, and opened a Telnet session to 192.168.1.1. Success! busybox popped up.

(Last edited by salvo2002 on 8 Jul 2011, 21:14)

Just wanted to chime in and say that using a linux live cd worked for me. Thank you everyone for the suggestions!

My steps:
* Download the latest desktop distro of ubuntu
* Download pendrivelinux usb installer
* install the distro on the thumb drive making sure to use the persistence feature
* boot into ubuntu
* open the software library thing and search on tftp and install it
* open a new terminal window
* sudo passwd root -> set new pwd
* su -> pwd
* ifconfig eth0:1 192.168.11.2
* ping 192.168.11.1 <- see if reachable
* arp -s 192.168.11.1 02:aa:bb:cc:dd:20
* unplug router
* tftp -m binary 192.168.11.1 -c put <file>
* plug in router
* if you see the diag light rapidly flashing after a few seconds you are in business

thanks all

(Last edited by xabisoh on 7 Jul 2011, 02:18)

nice! what was your physical connection setup? did you use 1Gbps?

I have ubuntu installed on my server and would be much easier to use to flash the router if you were able to use 1Gbps connection. Location wise, my win7 box is not near my router and I am running gigabit everywhere. I wouldn't have to disconnect anything, as I had to above. Although I guess it would be possible to throw my nic in 100Mbps mode.

(Last edited by salvo2002 on 7 Jul 2011, 02:37)

salvo2002 wrote:

did you use 1Gbps?

The switch is rather old and only goes up to 100 hmm

xabisoh wrote:

Just wanted to chime in and say that using a linux live cd worked for me. Thank you everyone for the suggestions!

My steps:
* Download the latest desktop distro of ubuntu
* Download pendrivelinux usb installer
* install the distro on the thumb drive making sure to use the persistence feature
* boot into ubuntu
* open the software library thing and search on tftp and install it
* open a new terminal window
* sudo passwd root -> set new pwd
* su -> pwd
* ifconfig eth0:1 192.168.11.2
* ping 192.168.11.1 <- see if reachable
* arp -s 192.168.11.1 02:aa:bb:cc:dd:20
* unplug router
* tftp -m binary 192.168.11.1 -c put <file>
* plug in router
* if you see the diag light rapidly flashing after a few seconds you are in business

thanks all

I'm using an Ubuntu 11.04 to install open-wrt firmware to wzr-hp-ag300h when I ran this command

- tftp -m binary 192.168.11.1 -c put openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-tftp.bin

it shown "usage: tftp host-name [port]"

The command can't be ran sucessfully. Does my ubuntu has issue? What ubuntu did you use?

Thank you very much!

(Last edited by catcatz on 16 Jul 2011, 16:00)

catcatz wrote:

it shown "usage: tftp host-name [port]"

The command can't be ran sucessfully. Does my ubuntu has issue? What ubuntu did you use?

Thank you very much!

Uninstall package tftp and install tftp-hpa, tftp from package tftp is too basic and doesn't support extra command line arguments.

sudo apt-get remove tftp
sudo apt-get install tftp-hpa

If you're having problems recognizing your usb device please see https://dev.openwrt.org/ticket/9684
I am experiencing exactly this behavior unfortunately, looks like usb hardware on this router is not supported by openwrt.

(Last edited by vadim on 17 Jul 2011, 19:22)

@Vadim

Thank you for your advise.

Finally, I successfully flash the openwrt to the router.
I found that it runs much faster and stable than dd-wrt.

Now, I interest to make a custom build openwrt firmware
I checked the wiki page, downloaded the trunk version source code and followed the steps to compile the firmware.
Finally, I compiled many packages and firmwares in the bin directory. I believe that I should use
openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-sysupgrade.bin to upgrade the router.
However, I don't have enough to confidence to do it.

I want to know that if this custom build firmware has problem, can I use the arp + tftp method to debrick the router?
The first thing is when I select the compile option in the menuconfig, I found many options. What options are important that will not make the router brick?

Thank you very much!

I have found that the newer Buffalo routers are very sensitive to the TFTP process and ended up using Ubuntu 10.10 within VirtualBox to do any of the TFTP flashing. There are instructions online for this and I have recently flashed OpenWRT onto 4 WZR-HP-G300NH's (Backfire 10.03.1-RC5) and 2 WZR-HP-AG300H's (Trunk) without any issues.

Backfire: http://downloads.openwrt.org/backfire/1 … s-tftp.bin
Trunk: http://downloads.openwrt.org/snapshots/ … s-tftp.bin

Here are the steps which I have used:

1. boot with ubunto live cd,
2. sudo apt-get update
3. sudo apt-get install tftp-hpa

4. sudo /etc/init.d/networking stop
5. sudo ifconfig eth0 192.168.11.2
6. sudo ifconfig eth0 netmask 255.255.255.0

7. sudo arp -s 192.168.11.1 [MAC Address without :'s, use 02AABBCCDD20 for the WZR-HP-AG300H]

8. tftp 192.168.11.1
9. tftp>binary
10. tftp>rexmt 1
11. tftp>timeout 60
12. tftp>connect 192.168.11.1
13. tftp>put openwrt-10.03.1-rc5-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin

14. connect your router and power on (as quickly as possible)

Using the Backfire 10.03.1-RC5 I had no issues using LuCI out of the box, but with the Trunk editions, LuCI and SSH are NOT enabled out of the box. You will need to connect the router's WAN port to the internet and then do the following using a telnet session (or if you have already set the password using PASSWD on a telnet session, you will have to use SSH as telnet will be disabled).

LuCI installation Do:

1) opkg update

then for LuCI without HTTPS support

2) opkg install luci

and for LuCI with HTTPS support

3) opkg install luci-ssl

then continue with

4) /etc/init.d/uhttpd enable
5) /etc/init.d/uhttpd start
6) netstat -a
7) iptables -I INPUT -j ACCEPT -i eth0.1 -p tcp --dport 80
8) iptables -I INPUT -j ACCEPT -i eth0.1 -p tcp --dport 443

You should now be able to connect with a webbrowser.

Sorry, posts 51 to 50 are missing from our archive.