Fritzbox 4040 Openwrt

Hello everyone,

I have a FritzBox 4040 with OpenWRT 24 behind a FritzBox 7490.

Since I just started using OpenWRT, I made a mistake and can no longer access the Fritzbox 4040 with IPv4. I can access the box via IPv6, but only for one minute.

When the 4040 starts up, all five LEDs briefly flash and the power LED lights up. After approximately one minute, the power LED turns off, and the connection to the 4040 is interrupted.

Does anyone know how to put the box into recovery mode?

After two days of researching online, I would be very grateful for any advice.

I have worked with Debian for many years and am therefore not afraid of the console.

Thank you very much for your help!

https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset#entering_failsafe_mode should help you sort it out.

I never managed to get my FB 4040 into recovery mode, no matter which (combination of) buttons I pressed during power up.
If you have IPv6 connectivity for a limited time, you could ssh into the box and run
firstboot -y && reboot
to go back to openwrt default settings
Next option would simply be to install openwrt as you did in the past.
As a last ressort you could use the AVM recovery tool to go back to stock AVM firmware.

Thank you for your replies, but unfortunately, it's not working.

The router is asking for the root password. When I enter it, I receive the following message: Access denied.

Try to do a reflash?

I used fritz-flash from Freifunk Darkmstadt's fritz-tools a few moons ago to successfully recover a friend's soft-bricked 4040, fwiw.

Hello everyone,

I've tried many things, including Fritz-Flash. Unfortunately, it didn't work.

I think the boot loader has an undefined IP address. AVM must have changed that at some point...

Thank you very much for your help!

In my opinion, if you have a standard Debian you should be able to solve the problem.

  1. Download the correct version for example:

https://downloads.openwrt.org/releases/24.10.2/targets/ipq40xx/generic/openwrt-24.10.2-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin

  1. Install on pc/debian:
dpkg -l | grep tnftp
ii  tnftp                                                       20200705-2                         amd64        enhanced ftp client
  1. Connect your Debian with a network cable to a LAN port on the Fritbox

Edit the script below to match the correct "dev" network interface and the correct "image" image file.

  1. And exec this script (before powering the router with its power supply):
#!/bin/sh

set -e
dev="eth0"
#image="openwrt-19.07.7-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin"
#image="openwrt-23.05.0-rc2-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin"
image="openwrt-24.10.2-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin"

if [ ! -f $image ]; then
    echo "the file $image not exist"
    exit 1
fi

ip link show dev "$dev"
if [ $? -ne 0 ]; then
    echo "The interface $dev not exist"
    exit 1
else

ip link set down "$dev"
ip addr flush dev "$dev"
ip link set up "$dev"
ip addr add 192.168.178.2/24 dev "$dev"

while ! ping -c 1 -w 1 192.168.178.1 > /dev/null 2>&1; do
        ip link set up "$dev"
        echo "wait 1 second"
        sleep 1
done

sleep 1

# The user name is real adam2 and the password is adam2

tnftp -n -v -q 150 -p "192.168.178.1" << EOF
quote USER adam2
quote PASS adam2
binary
quote MEDIA FLSH
put $image mtd1
EOF

echo "command exit $?"

fi
  1. Start the router (power it with its power supply) and wait for it to proceed with the installation

when I did the installation I noticed that the "ftp" package present in debian does not work while the "tnftp" package does

see this line: “(tested with tnftp, -p activates passive mode by default and -q sets a timeout) (tested also with RPi3b and normal ftp, works fine. DG)”


I don't believe (I assume that) :sweat_smile:

I see that there is an updated OEM firmware compared to the version I had installed before switching to Openwrt

at most I have version 07.14 in my archive :grinning:

md5sum *
41bd32684ce93506eb26bac93a0ae2a5  fritz.box_4040-07.14-recover.exe
0b2aeb26d20e4025dafebb928482c6b2  FRITZ.Box_4040-07.14.tar

sha256sum *
56e965000b2a30e24c12d171f7032f32f81d43c75233edde2311645e911c0089  fritz.box_4040-07.14-recover.exe
30e1080954b51a9aaf2fc23db843bc45ae72510fa81f0c66a36bbc2808645bf1  FRITZ.Box_4040-07.14.tar

I also found someone else who created an archive and the checksums match, if that helps.



If you want to solve this problem for future events:

1 Like

I will try it out…

A worm “Thankyou”

It worked! Many thanks to ncompact and everyone else who offered advice. I was able to finish installing it and now I can access the FritzBox again.

I'm glad I didn't have to throw away the hardware.

Thanks again for your help!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.