OpenWRT: FRITZ!Box reboot/reconnect script

Because a FRITZ!Box did not work reliably on a DS-Lite connection, I wanted to reboot it automatically. With the current FRITZ!OS 7.29, many scripts and tips from the internet no longer work. This one does.


Prerequisites

This script requires curl and iconv to be installed on the OpenWRT router:

Moreover, login credentials with permissions to reboot the FRITZ!Box router are required.
Since the new FRITZ!OS, the root user is called „fritz1234“, where 1234 is a random number. The password is printed on the bottom of the box as usual.
You can either look up the root username in the system menu or create a new account there.

Disclaimer & Credits

  • TR-064 commands: @nicoh88
  • Session login: @colinardo
  • Wireshark-ing the webinterface: @luani
  • AVM service interface: PDF
This script is not affiliated with or approved by AVM GmbH! Use at your own risk. All rights reserved to their owners.

The script

Final touches

Modify the lines FRITZ_HOST, FRITZ_USER, FRITZ_PASSWORD to match your environment.

Automation

If you want to automate this, you can use e.g. crontab or extend my watchdog script:

Tested with OpenWRT 21.01

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.