Netgear r6220 'bricked' - confusion in how to rescue

I am very confused about getting my r6220 back up and running. I have read several posts here and elsewhere, and I'm just lost.

I am using a Linux machine (setup in spoiler):

  • Lubuntu OS
    I have installed:
  • libpcap-dev
  • tcpdump
  • libnl-3-dev
  • tftp-ha
  • ufw (uncomplicated firewall), but rules are permissive on port 69 when I will use tftp-ha

Several years ago I had OpenWRT installed on the r6220. I think I tried to reset it - or something - but the end result now is the following behaviour:

Power on - flash of lights across the board (apart from "1,2,3 and 4"), then power light on steady, single flash on internet and wifi, power light stays on for a few seconds, then off. Cycles back to the start of the sequence.

I think this is a bootloop. nmrpflash does not work (unsurprisingly?).

Reset button for 1-2s (or less) - power light steady, alternating blink from internet and wifi lights. Pattern doesn't change (i.e. its stable).

According to some document somewhere, I used NetworkManager to assign Wired Connection 1 an ip address 192.168.1.10, netmask 255.255.255.0 and gateway 192.169.1.1 so $ ip a:

2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 3c:97:0e:cf:00:ec brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global noprefixroute enp0s25
       valid_lft forever preferred_lft forever

I can ping the device, but nothing else (i.e. can't connect by browser).

My last attempt with nmrpflash:

$ sudo nmrpflash -vvv -i enp0s25 -f openwrt-23.05.3-ramips-mt7621-netgear_r6220-squashfs-factory.img
Adding 10.164.183.253 to interface enp0s25.
Advertising NMRP server on enp0s25 ... \
No response after 60 seconds. Bailing out.

I have tried with many different timings (powering off/on, etc) and no success. What - if any - address should I be assigning to the enp0s25 interface via NetworkManager? Does it make any difference?

Also, does this imply Memory problems? I don't know what this means:

$ nmrpflash -L
wlp3s0           19x.xxx.x.xxx    xx:xx:xx:xx:xx:xx
Segmentation fault (core dumped)

(xxx... = redacted ip4 and ip6 addresses, just to be safe).

I'm guessing that means I have to use tftp. But I am confused with the instructions - for example, what does this mean:

From your TFTP installation guide, find which address the router expects to request an image from - for example, 192.168.1.20...

What guide? How do I do this if i cannot contact the router? What address should I use and what gateway?

Is tftp the right approach? I don't really understand what is happening in the router. I'd really appreciate wisdom from wiser heads before I push on.

I just had to revive my NetGear R7800 with TFTP and use these Netgear instructions:

However I did it from Windows and used tftpd32 and I waited until the power light flashes white for 10 times (it first flashes orange and then white for my router)

you need to place a switch between the r6220 and your PC ethernet port to keep the ethernet link up. The problem you are experiencing is that when you connect the r6220 directly to your PC lan port the router doesn't give it enough time to negotiate a link and bugs out looking for nmrpflash advertisements. By placing a switch between the ethernet port on your PC and the router the PC can maintain a link up state and thereby continually advertise its NMRP service.

2 Likes

That's a shame, but I think you are right. Following the guide that @ecg gave me and these instructions, I get:

tftp> put openwrt-23.05.3-ramips-mt7621-netgear_r6220-squashfs-factory.img
Error code 0: Permission denied
tftp> put openwrt-23.05.3-ramips-mt7621-netgear_r6220-squashfs-factory.img
tftp: sendto: Network is unreachable

Its just cycling through this.

I might as well just get a new router, I think. I can't image using a switch for anything else, and its about as expensive as a second hand r6220...

Thanks for your help.

The router has a serial header which can be used for a hard bricked router:
https://openwrt.org/toh/netgear/r6220

About the necessity of a switch, that is often mentioned.
For me it works without but it could be that windows just keeps the ethernet port open long enough.

Are you sure the router is in tftp mode?

These routers are hard to brick and tftp (or nmrpflash which is kind of tftp) usually works.

1 Like

I have used nmrpflash successfully on this device, many times. Each time by linking directly the PC to the router. The real key is to try to launch with different timings, each model has its own.

1 Like

first download official stock firmware from netgear website and flash using NMRPflash before reflashing with openwrt.

1 Like

I have no idea, but tcpdump isn't showing any traffic at all.

How would I check that ^ from a router in this condition?

That's interesting - why is that?

you said you have done something with your router but don't know what you did. So its best to go back to stock first to make sure your router hardware and boot sector is working correctly. Then follow the instructions on reflashing with openwrt using openwrt factory image. In my opinion this will cut out a lot of guess work.

1 Like

That is the official way described when using nmrpflash. The idea is to restore the device to its original state. That being said, you can flash directly an OpenWrt factory image with nmrpflash.

I now have a switch, and there seems to be some progress. However, it looks like I have some kind of permissions problem:

$ sudo ./nmrpflash -i enp0s25 -f R6220-V1.1.0.114_1.0.1.img
Advertising NMRP server on enp0s25 ... /
Received configuration request from b0:39:56:1a:bc:00.
Sending configuration: 10.164.183.253/24.
Received upload request without filename.
Uploading R6220-V1.1.0.114_1.0.1.img ... sendto: Operation not permitted

I'm not finding much anywhere (Google, github) on this situation. Any ideas?

Use a shorter filename, such as r6220.img. I'm not sure that this will have some effect, but it's worth trying.
One you have flashed, be very patient when receiving the Received keep-alive request message. It needs about 4 min.

EDIT
Just to be sure, have you done this?

You must install your Linux distribution's libpcap and libnl-3 packages (exact names will vary depending on your distribution).

No, same result:

$ sudo ./nmrpflash -i enp0s25 -f R6220.img
Advertising NMRP server on enp0s25 ... -
Received configuration request from b0:39:56:1a:bc:00.
Sending configuration: 10.164.183.253/24.
Received upload request without filename.
Uploading R6220.img ... sendto: Operation not permitted

Yup - its libpcap-dev and libnl-3 on this distro.

That is what is bugging me. I have never seen this message. It may lead to the Operation not permitted message. I have also never used nmrpflash on Linux.
Maybe try this option

-F <filename> Remote filename to use during TFTP upload

EDIT
Other idea : as the command fails, relaunch it immediatly. I have seen this behavior on another device.

Just tried it - I'm not sure I'm presenting the filename correctly. I tried as above and then fully qualified:

$ sudo ./nmrpflash -i enp0s25 -F ~/Downloads/nmrpflash/R6220.img
Usage: nmrpflash [OPTIONS...]

Options (-i, and -f or -c are mandatory):

[and the rest is just hte useage menu for the program]

Just gave this a good 60-90 seconds (i.e. repeatedly launching the command), and there's no budge.

This is the path of the file in your computer. -F option sets a dummy filename use internaly by the router. Just try -F r6220.img. Try to find if a specific filename is needed in some netgear doc (maybe be related to tftp). I have never had to use this option.

Try to to use a computer on Windows. I don't doubt nmrpflash works on Linux, but just in case ...

Was worth trying. Lately I had to debrick an old device. nmrpflash always failed at first launch. By mistake I launched the command a second time and surprisingly it worked.

do not mix uppercase "F". Use lowercase "f" as in:

./nmrpflash -i enp0s25 -f /path-to-firmware/R6220.img

nmrpflash doc

 -f <firmware>   Firmware file
 -F <filename>   Remote filename to use during TFTP upload

-f is for the path of the file on the computer.
-F is to set a file name on the router, if needed.

It may be needed as @antipodean receives a message Received upload request without filename.