Integrate complete default configuration in firmware

Fritsy

Neuer User
Mitglied seit
3 Nov 2008
Beiträge
21
Punkte für Reaktionen
0
Punkte
0
I have tried to unpack and repack the firmware of my FB 7170 and it works great! (See: http://www.ip-phone-forum.de/showthread.php?t=175974)

But what i would like to do is to integrate my own configuration file in the firmware so i can simply do a 'reset to default' with #991*15901590* to get back to my own default configuration.

In the unpacked firmware there is a file: \original\filesystem\etc\default.Fritz_Box_7170\avme\ar7.cfg
When i edit that file with my settings, repack the firmware and upload the firmware it works.
The problem is that this ar7.cfg file can only contain the setting from my internet connection. Not the VOIP-settings, the Wlan-settings and the content of; BINFILE:fx_cg and BINFILE:fx_conf and BINFILE:fx_lcr and BINFILE:telefon_misc and BINFILE:fonctrl

Where in the unpacked firmware do i write the data of BINFILE:fx_cg and BINFILE:fx_conf and BINFILE:fx_lcr and BINFILE:telefon_misc and BINFILE:fonctrl ?

Hope my question is clear. Thanks in advance.
 
You can find voip.cfg and wlan.cfg additionaly to ar7.cfg also in factory defaults directory, but not fx_conf nor fx_lcr. For this reason "reset" script should be patched (s. /bin/setfactorydefaults).

I think, it should be possible to insert at end of this script few lines of user code for copy of factory defaults.

But I would imlement it a little different to your idea: This small additional script at end of "setfactorydefaults" could search for example for directory "/var/media/ftp/uStor01/personalfactorydefaults" and could copy all config files from this directory to "/var/flash". In this case you need only the USB-Stick on your Box.

Best regards,
 
...

But I would imlement it a little different to your idea: This small additional script at end of "setfactorydefaults" could search for example for directory "/var/media/ftp/uStor01/personalfactorydefaults" and could copy all config files from this directory to "/var/flash". In this case you need only the USB-Stick on your Box.

I also think this is the better way. Not at last for the security of my data: From time to time I put freetz on devices of friends. Okay, either I could check that my default settings are not compiled into that image or use different freetz base folder, but I bet one time you will forget this and compile a firmware for a friend with your settings as default. hermann's way is the securest and easiest way I can think of. Combined with a WebIf/desktop applikation for easy import and export and/or a editor for these default settings this also will make it very user friendly!
 
There is a backup function in Freetz. I think it should be no problem to backup and restore your configuration...

Regards
Oliver
 
It is correct, Oliver. The best way is using the internal backup function of FREETZ. But the initial idea from Fritsy was make it possible to "reset defaults" per shortkeys using telephone. I know, it may be a special case, but you can construct very simple such an example: the user of the box is a person with minimal knowledges in FREETZ backups (housewife) and the "administrator" of FREETZ is not at home...


Best regards,
 
It is not possible to execute custom commands with shortkeys using the telephone except with dtmfbox.

Regards
Oliver
 
No, but as you can see here.
You can set your box to the default configuration by using the telefon code
Code:
#991*15901590*

So if he would integrate his configuration into the image the way he planed, the box would restore with this configuration.
 
I thought he wanted to restore the Freetz Settings as well. I'm not sure if all files are in the firmware. But these in default.$OEM can be restored...

Regards
Oliver
 
At this moment when a user (indeed the "housewife" type) resets the FB to it's default settings, the FB does not log into ADSL any more and has no VOIP settings etc. etc.

This because the FB uses the default configuration that AVM packed in the firmware, an empty default configuration that is.
So when a user has messed up the configuration and resets to default, the FB clears all the settings and the user has to completely reconfigure the FB.

What i want is to replace that empty AVM default configuration with the specific configuration of the user.
So when a user has messed up the configuration and resets to default, the FB is in it's complete original configuration again.

I know now that i can enter the WAN and LAN settings in ar7.cfg, the VOIP settings in voip.cfg and the WAN settings in WAN.cfg.

But where do i enter the data of fx_cg and fx_conf and fx_lcr and telefon_misc and fonctrl?
These files contain the settings of the Fon-ports and the dialplans etc.

It is ok if the firmware contains the complete default configuration for each user. The solution with the USB-stick is too difficult for the users.

Does anyone know how i can edit /bin/setfactorydefaults so that it resets the complete configuration (incl. fx_cg and fx_conf etc.) or does anyone know where i can enter the data of fx_cg and fx_conf and fx_lcr and telefon_misc and fonctrl in the unpacked firmware?

Thanks again!
 
@Fritsy: Why the USB-stick solution is difficult? It is better to support, to configure and to actualise. My proposal was to patch the original AVM "restoredefaults" script an add to this script our FREETZ solution, which can copy full automatically all restored settings from USB stick back to the box, if your "housewife" gives the restore code per telephone. And I am sure, it is possible to write this script so sure, that in case, if no usb stick is found or setting file is missed AVM defaults were loaded (second priority).

Best regards,
 
@Fritsy: Why the USB-stick solution is difficult? It is better to support, to configure and to actualise. My proposal was to patch the original AVM "restoredefaults" script an add to this script our FREETZ solution, which can copy full automatically all restored settings from USB stick back to the box, if your "housewife" gives the restore code per telephone. And I am sure, it is possible to write this script so sure, that in case, if no usb stick is found or setting file is missed AVM defaults were loaded (second priority).

Best regards,



Your solution is very good but not with the default configuration on an usb stick.
It costs money, will for sure get lost and requires extra explanation in this case.
When the complete configuration file is saved within the firmware only a call to #991*15901590* will do.
A custom firmware for each user is no problem at all, it would be perfect.

The only problem is how do i get the restoredefaults script to read my complete configuration (the 'fritzbox.export' file i saved from a working FB) from the FB memory and restore it?

Has anyone already a working solution or can anyone point me in the right direction?

Thanks! :p
 
You can't use the export. You have to get the files directly from your box (/var/flash). And then you have to put them under root/etc/default.... like they are in the original image.

Regards
Oliver
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.