I don't own a 4040, so I am only of little help here
An important hint in the past was, to put a switch between PC and Fritzbox, as the time window, during which the Fritz TFTP is listening, is very short and a switch can help to organize a slow layer 2 handshake to the PC ahead of time.
connect the network cable between the PC and the Fritzbox directly without connecting the Fritzbox power supply (so obviously the Fritz Box will still be off)
run this script:
#!/bin/sh
set -e
dev="eth0"
image="openwrt-23.05.0-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin"
ip link show dev "$dev"
if [ $? -ne 0 ]; then
echo "interface $dev not exists"
exit 1
else
if [ ! -f $image ]; then
echo "the file $image not exists"
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
fi
Power up the Fritzbox and wait for the installation to complete
First of all thank you for your feedback, I'll try next time(today and will give feedback) but let me know the root cause why should I follow the script and not the "standard" instruction.
apt search tnftp
apt show tnftp
Package: tnftp
Version: 20200705-2
Priority: optional
Section: net
Maintainer: xiao sheng wen <atzlinux@sina.com>
Installed-Size: 422 kB
Depends: libc6 (>= 2.27), libssl1.1 (>= 1.1.0), libtinfo6 (>= 6)
Conflicts: lukemftp
Replaces: lukemftp
Homepage: http://en.wikipedia.org/wiki/Tnftp
Tags: network::client, protocol::ftp, role::program, uitoolkit::ncurses,
use::downloading, works-with::file
Download Size: 188 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
Description: Improved ftp client
tnftp is what many users affectionately call the ftp client
improved in NetBSD (http://www.netbsd.org).
.
This package is a port of the NetBSD ftp client to other systems.
.
Improvements over the standard ftp client in 4.4BSD include:
* command line editing within ftp;
* command line retrieval of URLs, including handling:
- http proxy ($http_proxy, $ftp_proxy),
- authentication;
* completion of commands and file names based on context;
* dynamic progress bar;
* IPv6 management (from the WIDE project);
* protection of modification time;
* paging of local and remote files and contents list of
directory(lpage, page, pdir);
* management for passive mode with fallback to active mode;
* reconfiguring ftp environment variables with "set option";
* ftp proxy management TIS Firewall Toolkit (gate);
* transfer rate adjustment (-T, rate).
ps: When this device is powered on, a first-time browser based connection (192.168.178.1) is needed to set language, country and first-time login, otherwise the EVA bootloader won't accept a FTP connection! Then on next power-on (or reboot) the EVA bootloader allows FTP connection attempts during a certain time frame.
I assume, the Chip of 4040AX is not the Chip of 4040...
Thx for support and Regards
Neuro
PS:
Recoverd by FRITZ.xx-recover.exe - thnx god
Solution for me:
After recovering the box after the crash, I started to repeat the instructions (see above) several times without any positive result.
Then I switch to the Freifunker Python script and it flashed directly the box. https://fritz-tools.readthedocs.io/de/latest/flashing/ubuntu_1804.html
Got it. Usually the 4040 devices have a two letter suffix which you can also see on the label at the bottom of the device. I have several 4040 with different suffixes (for example KD, GD, NQ, …)
I don’t know what the letters mean but until now I was able to use the same OpenWrt image for all of the devices.
As far as I remember, there is also only one recovery image/tool provided for all the 4040 models.
I read somewhere in this forum that it is to allow different SSIDs. If you check for WiFi networks in a bigger (German) city, you are going to find tons of Fritz!Box SSIDs - now which is yours?