Found an easy way to flash OpenWrt to the Fritzbox 4020/4040/7312/7320/7330/7360

After spending quite some time trying to find a suitable new OpenWrt router I ended up buying the FB 4040 as I could get for around $50. Couldn't find anything with similar specs (2x usb/ac/250mb ram) for the money so I went for it.

Flashing this thing proved to be something that tried my patience to a point I didn't experience in quite some time :sweat_smile:

After the umpteenth time trying to flash I managed to get into the boot loader ftp server but of course the macOS ftp client didn't work properly so I went ahead and compiled netkit-ftp from source and tried with that but after dozens of tries didn't managed to get back into the boot loader.

Long story short; I started to search the web for something that would make flashing easier and I found al little script that does everything. I have flashed the 4040 a few times with it and it went without a hitch even single time. It's called fritz-tools to be used for Gluon but it also works fine with image builder created images. It automatically found the .bin file that I put in the same folder and flashed it.

There are versions for Windows, macOS and Linux. Documentation and downloads here.

Hope this helps other flashing the 4040 without getting the urge to throw the router across the room :joy:

(It might be nice to put this information in the wiki and/or fork this tool or something.)

1 Like

I have added "fritzflash" as new installation method and updated the FB4040 dataentry accordingly.

https://openwrt.org/docs/guide-user/installation/installation_methods/fritzflash

The table will fill as soon as the respective dataentries get updated with this installation method.

3 Likes

Thank you. Usually my timing for these things is pretty good but I couldn't get it right even after many tries. Other than the horrendous flashing this router seems very nice. Faster than I expected, snappy web interface and good performance. A worthy recommendation with this simplified flashing.

Off topic; I wonder if the people at Fritzbox tried to make the most annoying recovery method or something. Usually recovery can be entered by holding a button and then you can take your time flashing over tftp. Or the good old boot wait method, so easy to flash and recover those.

Looks like AVM has changed the timing... about a year ago my first flash succeeded using the "old" method.
I found another thread regarding flashing the FB4040.

But it requires a windows machine.
Did you try this one ?

Cheers,
Thomas

Ohh, that is a nice trick! Didn't find that one yesterday when searching. If I understand the trick it will result in the ftp server still running so you can just login and flash. It's a neat way to triggering some kind of recovery mode. The little script was really painless on macOS, python is installed by default so it was only needed to chuck the script and the firmware bin in the same folder and it did its magic while I had a well deserved cuppa :coffee:

This is my first AVM router so I have no clue about the timings, maybe I have a newer revision or something? I'm not ready to solder on a uart yet but at the bottom of the router it says; 4040 FJ. Not sure if the FJ indicates some batch or revision. From what I recall the script usually got in between 3-7 seconds. It performs pretty good running OpenWrt so far, haven't tested or seen the stock firmware at all. Hoping for decent usb 3 speeds yet but not planning to stream 4k movies from a stick on it so should be ok :smile:

This worked very well on a FritzBox 7330 SL as well! :slight_smile:

1 Like

I tried fritzflash on a 7320 and it worked there as well!