Coder Social home page Coder Social logo

freifunk-darmstadt / fritz-tools Goto Github PK

View Code? Open in Web Editor NEW
28.0 12.0 15.0 3.17 MB

Useful tools for AVM devices

Home Page: https://fritz-tools.readthedocs.io/

License: GNU General Public License v3.0

Python 76.84% Makefile 0.37% C 22.79%
openwrt fritzbox fritzrepeater avm eva

fritz-tools's Introduction

fritz-tools

Documentation

We recommend Freifunk-Communities to link to the following documentation instead of publishing their own Instructions to avoid fragmentation of useful Information. It does not contain Community-specific quirks.

fritz-tools's People

Contributors

blocktrron avatar codedust avatar dark4md avatar eaglerainbow avatar herbetom avatar jaller94 avatar matthias-g avatar maurerle avatar mweinelt avatar ogelpre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fritz-tools's Issues

Little syntax error in the latest release

Line 211 in the latest release is giving me a error.

Maybe this should be "if len(files) == 0", like the python compiler suggests.

But I also saw that the code in the master branch doesn't have this line anymore.

Update releases or edit documentation link

Hi everybody,

the link in the official fritz-tools documentation at
https://fritz-tools.readthedocs.io/de/latest/flashing/windows10.html#download-the-flash-script
points to the releases page of this github repository, which results in the download of an outdated version of the script.

Could you please update the link in the documentation to the latest version
https://raw.githubusercontent.com/freifunk-darmstadt/fritz-tools/master/fritzflash.py
or publish a new release with the latest changes?

Thanks!

NAND-Flash

Hallo zusammen,
da manche Geräte mangels NAND-Flash-Unterstützung immer noch nicht geschrieben werden können, möchte ich auf YourFritz hinweisen, wo die Unterstützung von NAND-Geräten bereits hinreichend gut getestet funktioniert. Dies war als Hilfsprogrammsammlung für Freetz entstanden. Interessante Informationen dazu finden sich auch bei Freetz-NG und im IP Phone Forum, wo die Diskussionen zu obengenannten Projekten für gewöhnlich stattfinden. Für NAND-Geräte einfach die dort verwendeten Programme zu benutzen, um Gluon zu installieren geht zwar, einfach und benutzerfreundlich ist aber was anderes, weswegen es schön wäre, die Funktionalität hier zu integrieren. Wie man es technisch macht, kann man übernehmen und in Python „übersetzen“, anstatt das Rad komplett neu zu erfinden. Da ich Python nicht so wirklich beherrsche, kann ich derzeit nur diese Hinweise liefern, gegebenenfalls noch in obigen Quellen die entsprechenden Informationen heraussuchen, aber das sollte kein großes Problem sein. Für Freetz/-NG gibt es das Skript „push_firmware“, das genau das macht und ich hatte irgendwann mal eine Version für meine 7490 angepaßt, um die hier im Netzwerk flashen zu können – ohne den Zirkus mit IP-Adressen statisch auf 192.168.178.1/24 und Direkt-Verbindung.
Viele Grüße, Christoph

SyntaxWaring at Windows 10, Python 3.8.0

Syntax Warning in first line:

C:\Users\MyName\Downloads\fritzflash.py:211: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(files) is 0:

This program will help you installing Gluon, a widely used Firmware for Freifunk networks, onto your AVM device.
You can always find the most current version of this script at https://www.github.com/freifunk-darmstadt/fritz-tools

It is strongly recommended to only connect your computer to the device you want to flash.
Disable all other connections (Ethernet, WiFi/WLAN)!

Before we start, make sure you have assigned your PC a static IP Address in the Subnet of the device you want to flash.
The following example would be a completely fine option:

IP-Address: 192.168.178.2
Subnet: 255.255.255.0
Gateway: 192.168.178.1
DNS Servers: Leave blank

Once you're done, disconnect power from your AVM device, reconnect the power-supply and press enter.

Windows 10
Python 3.8.0: https://www.python.org/ftp/python/3.8.0/python-3.8.0.exe

My first thought was, that this is because Windows 10 Tutorial is pointing to the Release page (10 month old script):
https://fritz-tools.readthedocs.io/de/latest/flashing/windows10.html#download-the-flash-script =>

if len(files) is 0:

while the Linux tutorial
https://fritz-tools.readthedocs.io/de/latest/flashing/ubuntu_1804.html#download-the-flash-script
is pointing to latest file from master (that statement has moved from line 211 to 255):
https://github.com/freifunk-darmstadt/fritz-tools/blob/master/fritzflash.py#L255

On Ubuntu 19.10 with 3.7.5rc1 i do not get this error on latest file from master. So maybe that syntax check was introduced in a newer python3 version.

Unable to flash FRITZ!WLAN Repeater 450E

I tried following the instructions to flash a Repeater 450e, however, it doesn't work as now connection can be established. The OpenWrt wiki mentions that the device will spawn an FTP server on 192.168.178.1. However, my repeater keeps assing itself the IP 192.168.178.2. Running an nmap on that IP returns open ports for HTTP, HTTPS and DNS, but no FTP.

The repeater's firmware version is 6.x. I tried updating it to 7.x, but the update would never finish.

Add documentation

Considering installing on this Devices might still be pretty complicated for people who are not doing this stuff day in and day out, we should try to provide detailed documentation.

This includes adding separate documentation

  • setting static IPv4 address
  • disabling all other interfaces
  • restoring original IP configuration afterwards

as well as improving instructions fritzflash.sh currently gives while performing it's tasks. My personal wishlist would be

  • adding multi-language support
  • improve error handling (and give detailed information how to fix it)

For the separate Documentation, the whole A-Z process would be great including screenshots. This, naturally, has to be done for every OS separately. On my wishlist would be

  • Windows 10
  • MacOS X
  • Ubuntu

I chose Ubuntu as it is probably the most convenient way for using the script from a live environment (and it's pretty common also).

recommend switch for flashing procedure (Linux)

Hi,

flashing AVM hardware from a Linux computer seems a bit tricky. Discovery may work only if you connect the AVM hardware to a linux computer using a (dumb) switch inbetween.

Maybe a hint in the instructions would be helpful.

Thnaks!

Flash 7362SL returns "ftplib.error_temp: 426 Data connection closed"

I try to flash a FritzBox 7362SL with the fritzflash.py via the following command:
fritzflash.py --image openwrt-lantiq-xrx200-avm_fritz7362sl-squashfs-sysupgrade.bin

The script ends with following return:

We will tell you when your device has finished installing Gluon (this may take a while).
Traceback (most recent call last):
  File "C:\RaspberryPi\Fritz\fritzflash.py", line 329, in <module>
    perform_flash(ip, imagefile)
  File "C:\RaspberryPi\Fritz\fritzflash.py", line 279, in perform_flash
    ftp.upload_image(file)
  File "C:\RaspberryPi\Fritz\fritzflash.py", line 59, in upload_image
    self.storbinary('STOR mtd1', image)
  File "C:\Python37\lib\ftplib.py", line 515, in storbinary
    return self.voidresp()
  File "C:\Python37\lib\ftplib.py", line 251, in voidresp
    resp = self.getresp()
  File "C:\Python37\lib\ftplib.py", line 244, in getresp
    raise error_temp(resp)
ftplib.error_temp: 426 Data connection closed

All at Windows 10

I already flashed multiple 7230 via the "--image' parameter.

Any ideas how to solve it?

UX When flashing unsupported / unknown models

Is:
As disucssed on IRC: Flashing the file for the 7362 SL resulted in error_temp(resp)ftplib.error_temp: 426 Data connection closed, confusing the user. --image was specified on the command line.

Background:

  • The 7362 SL is not supported, thus the installation fails.

Better:

  • A workflow on unsupported hardware could guide unexperienced users to avoid flashing using fritztools, thus providing a safe default.
  • A easy-to-read error error could be shown instead of error_temp(resp)ftplib.error_temp: 426 Data connection closed
  • The exact consquences of --image and -f could be documented at https://fritz-tools.readthedocs.io/en/latest/

Display helpful message on wrong image-combination

The program should display a helpful error-message when attempting to flash the wrong image <-> device combination.

Currently this can only be the case when attempting to flash a FRITZ!BOX 4040, as all other images only have a sysupgrade image generated.

7362 SL -out of range

Hi team,
I am trying to run your fritzflash.py tool.
I get the following error msg.
Starting automatic image-selection! -> Establishing connection to device! --> Try 1 of 10 Traceback (most recent call last): File "/home/user/Downloads/fritzflash.py", line 392, in <module> imagefile = autoload_image(ip) File "/home/user/Downloads/fritzflash.py", line 274, in autoload_image env = ftp.getenv() File "/home/user/Downloads/fritzflash.py", line 49, in getenv fritzenv[l[0]] = l[1] IndexError: list index out of range
What could be the the reason for this error msg ?
Thx, blub4747

Add support for 7412

Boot initramfs via FTP, scp sysupgrade image, connect via SSH and sysupgrade.

Environment:

HWRevision            209
HWSubRevision         1
ProductID             Fritz_Box_HW209
SerialNumber          0000000000000000
annex                 B
autoload              yes
bootloaderVersion     1.2834
bootserport           tty0
cpufrequency          500000000
firstfreeaddress      0x811FB68C
firmware_info         137.06.84
firmware_version      1und1
flashsize             nor_size=0MB sflash_size=0KB nand_size=128MB
maca                  38:10:D5:F8:4C:61
macb                  38:10:D5:F8:4C:62
macwlan               38:10:D5:F8:4C:63
macwlan2              38:10:D5:F8:4C:64
macdsl                38:10:D5:F8:4C:65
memsize               0x08000000
modetty0              38400,n,8,1,hw
modetty1              38400,n,8,1,hw
mtd0                  0x840000,0x3840000
mtd1                  0x440000,0x840000
mtd2                  0x0,0x40000
mtd3                  0x40000,0x440000
mtd4                  0x0,0x200000
my_ipaddress          192.168.178.1
prompt                Eva_AVM
req_fullrate_freq     250000000
sysfrequency          250000000
urlader-version       3834
usb_board_mac         38:10:D5:F8:4C:66
usb_device_id         0x0000
usb_device_name       USB DSL Device
usb_manufacturer_name  AVM
usb_revision_id       0x0000
usb_rndis_mac         38:10:D5:F8:4C:67
wlan_key              06331952540454981479

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.