New OpenWrt Installation on AVM Fritz 7312

Hi All,
I have AVM 7312 with stock firmware, and would like to install open WRT on it. So far,

  1. I am able to connect with Bootloader.
  2. Download the require image.
    However, here onwards I am lost. I am not sure which commands I should issue to flash this firmware.
    I already had a look on generic flashing via FTP page, but not understanding from where I should get empty file or kernal image.

Your help is highly appreciated...

Many thanks.

Installation instructions for FritzBox 7312 (from git-commit)

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT
1 Like

Thanks...
I am getting following error..

ftp> passive
Invalid command.

If I still continue,

ftp> put openwrt-lantiq-xway-avm_fritz7312-initramfs-kernel.bin mtd1
---> PORT 192,168,178,2,247,6
502 Command not implemented
---> STOR mtd1
425 can't open data connection

What about passiv? Seems like a typo...

For the moment, I thought that's it !!!
But unfortunately not so... Still the same...

ftp> passiv
Invalid command.

Thanks for thousand times. That indeed brings one step forward.
Still I am getting error "502 command not implemented" & "425 can't open data connection"

PS D:\AVM\image> ftp -n 192.168.178.1
Connected to 192.168.178.1.
220 ADAM2 FTP Server ready
530 not logged in
ftp> quote USER adam2
331 Password required for adam2
ftp> quote PASS adam2
230 User adam2 successfully logged in
ftp> binary
200 Type set to BINARY
ftp> debug
Debugging On .
ftp> quote PASV
---> PASV
227 Entering Passive Mode (192,168,178,1,12,13)
ftp> quote MEDIA FLSH
---> MEDIA FLSH
200 Media set to MEDIA_FLASH
ftp> put openwrt-lantiq-xway-avm_fritz7312-initramfs-kernel.bin mtd1
---> PORT 192,168,178,2,217,70
502 Command not implemented
---> STOR mtd1
425 can't open data connection
ftp>

So, now tried with Ubuntu. And it went forward for flashing. But after several reboot, it seems device is dead. Its not starting, but I could still enter in bootloader. Did I just bricked my device ???

230 User adam2 successfully logged in
ftp> binary
200 Type set to BINARY
ftp> debug
Debugging on (debug=1).
ftp> passive
Passive mode on.
ftp> quote MEDIA FLSH
---> MEDIA FLSH
200 Media set to MEDIA_FLASH
ftp> put openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
local: openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin remote: mtd1
ftp: setsockopt (ignored): Permission denied
---> PASV
227 Entering Passive Mode (192,168,178,1,12,14)
---> STOR mtd1
150 Opening BINARY data connection
226 Transfer complete
4718865 bytes sent in 14.54 secs (316.8542 kB/s)
ftp> quote REBOOT
---> REBOOT
221 Thank you for using the FTP service on ADAM2
ftp> 

Do I see this correctly:

  • One time (which OS?) passive results in Invalid command
  • another time (Ubuntu) in Passive mode on.
    ?

Below when I was using ftp on windows machine

Below I run ftp on ubuntu (load it on windows via SD card)...

Meanwhile, made some progress. Now, I see "OpenWrt" wifi, and also able to connect it. BUT its not loading webpage of router. And via LAN, its not even getting IP address. I have flashed openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin

Any idea how to move forward...

You have installed a snapshot image.

2 Likes

Device has static 192.168.1.1 and does provide ip with DHCP.

JFTR, for others finding this thread: Windows' own command-line FTP is not capable of passive transfers, this failure is normal. There are some third-party clients that could do it, but it's generally easier to use a unixoid OS' FTP client.

2 Likes

Or using a python script like the one from Gluon:
https://fritz-tools.readthedocs.io/de/latest/index.html

I was able to use this script. But couldnt understand from where to get gluon firmware....

Woww... It is really long journey than I thought. I am really thankful for all of your help. Now I am inside router trying to install Luci. However, it is not automatically connected to internet. I understand that this is because of firewall. I tried to do offline installation as mentioned here. But at link, I am not able to find the packages to download. Is the location changed. I am not networking guy to configure the network via CLI. So I am trying to get GUI installed. And then to move forward. Or if simple CLI commands would also help to make box able to use internet connected on input DSL line.

I also tried to install 19.07 release. And it did. But then after, it seems router is not booting and stays in bootloader. Any idea what is going wrong.

FINALLY... I made through...
It seems install file is not working. But File @ Upgrade URL is getting flashed. Router is loading OperWRT and also could get to webpage... !!!

Thanks again to all for all the help !!!

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