4040AX no connection to FB

Hi all,

I'll try to connect to FB 4040AX - no chance.

Setup as decribed in OM: cable, 192.168.178.1/2, waiting for FB boot.

Ping:192.168.178.1 - ok
FTP:192.168.178.1: Address family for hostname not supported
Later: Connection refused

I have open 2 terminals during the process, one with pink other with ftp -n -v -p 192.168.178.1

Any idea and support?

Thanks a lot in advanced
Neuro

once OpenWRT is installed, the default is 192.168.1.1

your description is very vague. Are you installing OpenWRT at all? did all steps succeed? Are you still using default OpenWRT config?

1 Like

Sorry, correct.
I'm not able to connect to FB for flashing the image.
I tried to flash via Python script as well without any result to connect the FB.

THX

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.

1 Like

the steps to follow are these:

  1. turn on the PC (tested with Linux Debian)

  2. 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)

  3. 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
  1. Power up the Fritzbox and wait for the installation to complete

view:

ps:
obviously the previously downloaded firmware file (https://downloads.openwrt.org/releases/23.05.0/targets/ipq40xx/generic/openwrt-23.05.0-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin) and script must be in the same directory

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.

The script is shown in the installation instructions, mine just carries out further checks

the underlying reason is that the fritzbox at startup (bootloader) goes into ftp mode only for a short period of time the script is only of help

you see:

Current situation:

OS: LMDE5

  • Interface name(eth0) was changed in the script
  • Script started
  • Interface identified correctly
  • ...wait 1 second - several times
  • Error: ./script.sh: 33: ntftp: not found

Same behaveour as the python script from freifunker.

It seems to be not to reach the FTP or the could by an other IP during the boot period??

Neuro

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.

Thank your for the installation hint...my mistake.
Image and script are in the same directory...

Now the procedure stopps at:

  • 227 entering Paasive Mode
  • 421 Service not available, remote server timed out. Connection closed.
  • comand exit 0

FB 4040 PowerLED flashligt.

  • apologies again for these circumstances -
    Neuro

to summarize you turned on the router:

made a first configuration (and everything works)

turned off the router (and left it off, power cord disconnected)

executed the script (connecting the PC to the router to a LAN port)

turned on the router

but still there are problems
really strange

you can post your script

the commands used, etc

Hmmm, red light INFO flash after restart FB4040...not good...

Bridged?

Restarted 3 times...

Neuro

Procedure:

  1. Checked Country and Time before started
  2. Started the script till
  • 200 Media se to MEDIA_FLASH
  • local: openwrt-...xxx.bin remote: mtd1
  • 227 Entering Passive Mode (192,168,178,1,12,0)
    than
  • 421 Service not available, remote server timed out. Connection closed.
  • comand exit 0

Now I can not reach FB - redlight flashing INFO -

Ok, no feedback at all.

Ein Satz mit X, das war wohl nix.

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 :wink:

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

https://raw.githubusercontent.com/freifunk-darmstadt/fritz-tools/master/fritzflash.py

Little bit off topic: What is 4040AX? Do you have a link to it? I’m confused because I only know 4040, which is WiFi AC

Of course, me too because I didn't find any description until now but in the owner manual they talk about 4040 AX factory reset and in the SSID...

Neuro

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?

2 Likes

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