Hello
I would like to flash my FritzBox 4020 with openwrt.
ftp -n 192.168.178.1
ftp> quote USER adam2
ftp> quote PASS adam2
ftp> binary
ftp> debug
ftp> quote MEDIA FLSH
ftp> put openwrt-sysupgrade.bin mtd1
But when I do the last command the console say:
ftp> openwrt-19.07.7-ath79-generic-avm_fritz4020-squashfs-sysupgrade.bin mtd1
---> PORT 192,168,178,20,243,164
502 Command not implemented
---> STOR mtd1
425 can't open data connection
What can I do?
Looking at https://openwrt.org/toh/avm/fritz.box.4020 it appears there's an extra command which might be useful: passive
the command passive doesnt work
You're not specifying OS used, but passive mode isn't supported by the ftp
client in win10, you'll need something else.
Where is passive mode supported
I have kali linux
Is your computer on the same subnet (192.168.178.x) ?
If not, are both ports 20 and 21 permitted through any intermediate devices?
linux ftp (at least the one that comes with Fedora) supports passive, but passive also requires firewall ports to be opened, or temp shut down.
ftp> help passive
passive enter passive transfer mode
ftp> passive
Passive mode off.
ftp> passive
Passive mode on.
ftp>
modified the subject, this issue has nothing to do with openwrt.
tmomas
March 9, 2021, 4:12pm
9
What happens when you try to install OpenWrt via fritzflash ?
Its says: No Immage found! Use --image
But how can I use --image
do you have the files specified in the code, and are they named accordingly ?
"219": {
"gluon": [
"avm-fritz-box-4020-sysupgrade.bin"
],
"openwrt": [
"fritz4020-squashfs-sysupgrade.bin",
"avm_fritz4020-squashfs-sysupgrade.bin"
]
#! /usr/bin/env python3
import argparse
import ipaddress
import os
import socket
import time
from ftplib import FTP
AUTODISCOVER_TIMEOUT = 1
FTP_TIMEOUT = 2
FTP_MAX_RETRY = 10
class FritzFTP(FTP):
class ConnectionTimeout(Exception):
pass
def __init__(self, ip, username='adam2', password='adam2', timeout=1, max_retry=0, retry_cb=None):
i = 1
while i <= max_retry:
This file has been truncated. show original
(if running Windows, to be able to use parameters, you probably have to execute the .py from a cmd prompt)
if everything else fails, RTFM (or in this case, the source code)
1 Like
tmomas
March 10, 2021, 10:47am
14
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
system
Closed
March 20, 2021, 10:48am
15
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.