[HowTo] Flash-Script für 7490

Durch diesen Thread angeregt habe ich die Variablen firmware_version auf avme und firmware_info auf 113.06.83 gesetzt und die recover.exe nochmal laufen lassen.
Ich kann nicht mal im entferntesten nachvollziehen, was dich bewogen haben könnte, die Box auf eine internationale Version umzustellen. In dem verlinkten Uralt-Thread geht es noch nicht einmal um eine Fritzbox 7490. Ein Recover war hier auch gar nicht nötig. Es gibt, wie vorher schon erwähnt, bei den NAND-Boxen eh fast keinen Grund mehr für ein Recover.
 
Zuletzt bearbeitet:
Kann es sein, daß Du Dein Freetz-Image mit der internationalen Version der Firmware hast erstellen lassen? Zumindest liest sich das so, wenn die Box bei "firmware_version avme" dann tatsächlich startet. Dann wäre aber auch klar, wo die eigentliche Ursache für den Fehler lag ... das funktioniert dann eben auf der "deutschen" Version der Box nicht, solange man das Environment nicht ändert.

Spannend wird das dann aber erst bei der 7560/7580 ... wenn da das Branding nicht mehr ohne weiteres zu ändern ist und es irgendwann mal unterschiedliche nationale und internationale Versionen geben sollte (ist ja derzeit nicht der Fall), dann ist da ein Wechsel mit originaler Firmware nicht mehr so einfach möglich (mal identische Hardware für international und "deutsch" unterstellt).
 
Ich kann nicht mal im entferntesten nachvollziehen, was dich bewogen haben könnte, die Box auf eine internationale Version umzustellen. In dem verlinkten Uralt-Thread geht es noch nicht einmal um eine Fritzbox 7490. Ein Recover war hier auch gar nicht nötig. Es gibt, wie vorher schon erwähnt, bei den NAND-Boxen eh fast keinen Grund mehr für ein Recover.
Genau genommen habe ich nicht "setenv avme" sondern "avm" eingegeben. Mit getenv ist danach aber "avme" herausgekommen.
Den Uralt-Thread hab ich gefunden, als ich die o. g. Fehlermeldung gegoogelt habe.
Mag sein, dass es "fast" keinen Grund mehr für ein Recover gibt, aber ich habe mir nichts anders zu helfen gewusst, und habe einfach mal probiert.

Kann es sein, daß Du Dein Freetz-Image mit der internationalen Version der Firmware hast erstellen lassen? Zumindest liest sich das so, wenn die Box bei "firmware_version avme" dann tatsächlich startet.
Um ehrlich zu sein, wüsste ich gar nicht, wie ich das anstellen sollte.
Ich hab in "make menuconfig" meine Box und die FW-Version ausgewählt, das wars dann auch schon.

Dann wäre aber auch klar, wo die eigentliche Ursache für den Fehler lag ... das funktioniert dann eben auf der "deutschen" Version der Box nicht, solange man das Environment nicht ändert.
...
So langsam schwant mir was. Die Box hatte mein Bruder neu gekauft über ebay.
Angeblich ein Rückläufer (Zurücktritt). Laut Zähler war die Box aber schon ca. 14 Tage lang gelaufen.
Beim ersten (kurzen) Starten war mir eine Sprachauswahl aufgefallen (englisch, deutsch, französisch, usw.), ich hab mir aber nichts weiter dabei gedacht.

Kann das "eigentlich" Problem evtl. damit zusammenhängen, dass es eben keine deutsche Version der Box ist?
(Kann ich das irgendwie herausfinden?)
Edit: Ja, kann ich; steht nämlich hinten drauf.

Habt Ihr eine Empfehlung für mich, worauf ich jetzt evtl. achten muss bzw. welche Möglichkeiten ich jetzt für die Zukunft habe?
Ich will eigentlich am liebsten ganz normal deutsche freetz-FW Versionen aufspielen können.

Danke und Gruß
maceis
 
Zuletzt bearbeitet:
Hallo Freunde,
ich versuche dieses HowTo zu verstehen, aber wenn ich dieses Script starte :
7490install.sh:
Code:
#!/bin/sh
VR="./var"
VT="$VR/tmp"
KI="$VT/kernel.image"
FI="$VT/filesystem.image"
IP="192.168.178.1"
for ARG in $@
do
 if [ -f "$ARG" ]
 then
  FIMG="$ARG"
 else
  IP="$ARG"
 fi
done
if [ -f "$FIMG" ]
then
 tar xvf "$FIMG"
 if [ -d "$VT" ]
 then
  for IMG in "$KI" "$FI"
  do
   if [ -f "$IMG" ]
   then
    dd iflag=count_bytes bs=256 if="$IMG" of="$IMG.tmp" count=$(( `stat --printf=%s "$IMG"`-8 ))
   fi
  done
  cat "$KI.tmp" "$FI.tmp" > "$FIMG.eva"
  rm -rfv "$VR"
  eva-login.sh "$IP"
  eva_to_memory "$FIMG.eva" "$IP"
 fi
fi
Bekomme ich immer folgende Fehlermeldung:

root@ASUS-Notebook:/IPPF# sh 7490install.sh
7490install.sh: 8: 7490install.sh: Syntax error: word unexpected (expecting "do")

Könntet ihr mir sagen wo ich meinen Denkfehler mache ?

Getestet mit Kali-Linux auf einem Netbook und Freetz-Linux als VM
Beide als root angemeldet.


Ich hab jetzt ein kalilinux mit root und ftp installiert, aber es kommt immer folgender Fehler :
Code:
root@ASUS-Notebook:/IPPF# sh 7490install.sh
7490install.sh: 8: 7490install.sh: Syntax error: word unexpected (expecting "do")
Ich begreife es nicht.
 
@gismotro:
Mit meinen Skripten (die hast Du sogar in Deinem Freetz-Trunk, wenn der ein halbwegs aktuelles CS verwendet) könnte ich Dir ggf. helfen ... für anderes fühle ich mich nicht zuständig (ich verstehe auch nicht so richtig, warum gerade Du das nun "ausgräbst", denn eigentlich solltest Du ja die Entwicklungen im Freetz-Trunk so halbwegs verfolgt haben und damit wissen, daß es da seit Ende Sept. 2016 diverse Änderungen zu diesem Thema gab).

Wenn ich den letzten Fragestellern hier geantwortet habe, lag das u.a. auch daran, daß die ja gar nicht mehr mit den Skripten aus #1 arbeiteten ... das Erstellen eines passenden Images ist seit längerer Zeit bereits im Freetz-Trunk enthalten - das steht auch in diesem Thread. Wenn Du tatsächlich ein TAR-File als Eingabe haben solltest, nimm "image2ram" - was bei der anderen Variante schiefgehen kann (wg. ggf. nicht unterstützter Flags beim "dd"-Kommando), kannst Du in den Beiträgen seit dem 22.04.2017 nachlesen und (quasi als Prognose meinerseits) in #2.

Ansonsten würde ich bei diesem Fehlerbild am ehesten darauf tippen, daß Du beim Kopieren aus dem IPPF irgendwelche falschen Zeilenenden für Shell-Skripte mitgenommen hast ... das ist/bleibt aber auch der einzige "Tipp" (bzw. meine einzige Äußerung zum Thema), wenn es um die Dateien aus #1 geht.
 
Lösungsvorschlag:
Bei Freetz-Images >= rev. 14049 folgende Befehlssequenzen verwenden:
Code:
# eva_discover INTERFACE=<interface> FROM=<ip_der_freetz_vm> TO=<fb_bootloader_ip> BLIP=1 WAIT=120 HOLD=0
# eva_switch_system <interface> <fb_bootloader_ip>
# eva_to_memory freetz.image.in-memory <fb_bootloader_ip>

Bei Non-Freetz-Images:
Code:
# image2ram < fb7490.image > fb7490.image.in-memory
# eva_discover INTERFACE=<interface> FROM=<ip_der_freetz_vm> TO=<fb_bootloader_ip> BLIP=1 WAIT=120 HOLD=0
# eva_switch_system <interface> <fb_bootloader_ip>
# eva_to_memory fb7490.image.in-memory <fb_bootloader_ip>

Quelle:
http://www.ip-phone-forum.de/showthread.php?t=287879&p=2220283&viewfull=1#post2220283
http://www.ip-phone-forum.de/showthread.php?t=287879&p=2220370&viewfull=1#post2220370
 
Zuletzt bearbeitet:
Vorsicht ... "eva_switch_system" enthält in Zeile 196 ein "REBOOT"-Kommando, was man hier in ein "QUIT" umwandeln müßte, damit die Reihenfolge so stimmt. Ansonsten startet nach der (ohnehin optionalen, aber das aktuelle System schützenden) Umschaltung die Box neu und es wäre eher noch ein zweiter "eva_discovery"-Aufruf notwendig bzw. sinnvoll.
 
Danke für die Hinweise

Gesendet von meinem SM-G930F mit Tapatalk
 
Hello guys,

Apologies to write in English. My written German is not very good.
I have read the thread but unfortunately, I cannot understand all what is written. I hope that you can help me :)

I have a 7362 SL updated to FRITZ!OS: 06.83
It was a beautiful 06.30 with freetz from 1und1, but I forgot to say that it should not autoupdate, so I got it updated.

I had to connect a serial port to access the evo. I did not know that if one changes the network, the evo IP is always on the XXX.XXX.XXX.001, so I could not find it.

Anyhow ... my question is:

Can I use the 7490install.sh with my 7362 SL ?

I am not sure if "eva_to_memory" can be used with the 7362.

Many thanks in advance and THANKS A LOT FOR ALL THIS WORK !

Regards

i$
 
Use a default shell (/bin/sh), which is NOT "dash" or change the SheBang of the scripts according to your system. The scripts use some statements, which aren't POSIX compatible - simply have a look on https://github.com/PeterPawn/YourFritz/tree/master/eva_tools and read, what I wrote as a comment for these scripts.
 
Use a default shell (/bin/sh), which is NOT "dash" or change the SheBang of the scripts according to your system. The scripts use some statements, which aren't POSIX compatible - simply have a look on https://github.com/PeterPawn/YourFritz/tree/master/eva_tools and read, what I wrote as a comment for these scripts.

Hi Peter,

I had to modify two things:

1.- the shell at the beginning of the script. I am using bash "#!/bin/bash"
2.- netcat uses the option "-d" (do not read STDIN), which is not available on my system. I have removed it.

It executes but the script stops in a "read command".
I attach the execution (bash -x). If you find a second, you may be able to help me. I do not know what is the FD 8 !

Thanks

Code:
root@x230:~/YourFritz-master/eva_tools# bash -x ./eva_to_memory /usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory 192.168.178.1
+ printf '\n'
+ read -u 0
+ filename=/usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory
+ box_ip=192.168.178.1
+ limit_memory=1
+ box_port=21
+ box_user=adam2
+ box_pass=adam2
+ passive_ftp=P@SW
+ '[' 0 -eq 0 ']'
+ TMP=/tmp
++ date +%s
+ tmpdir=/tmp/tmp_1508357760_10072
+ writefifo=/tmp/tmp_1508357760_10072/write
+ readfifo=/tmp/tmp_1508357760_10072/read
+ storefifo=/tmp/tmp_1508357760_10072/store
+ outstream=7
+ instream=8
+ upstream=9
+ logstream=3
+ logfile=./eva_to_memory.log
+ envfile=/tmp/tmp_1508357760_10072/env
+ startaddress=0x80000000
+ '[' x/usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory == x ']'
++ stat -c %s /usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory
+ filesize=27057408
+ '[' 0 -ne 0 ']'
+ mkfifo
+ '[' 1 -eq 127 ']'
+ nc

+ '[' 1 -eq 127 ']'
+ mkdir -p /tmp/tmp_1508357760_10072
+ mkfifo /tmp/tmp_1508357760_10072/write
+ rc=0
+ '[' 0 -ne 0 ']'
+ mkfifo /tmp/tmp_1508357760_10072/read
+ rc=0
+ '[' 0 -ne 0 ']'
+ mkfifo /tmp/tmp_1508357760_10072/store
+ rc=0
+ '[' 0 -ne 0 ']'
+ eval 'exec 7<>/tmp/tmp_1508357760_10072/write'
++ exec
+ rc=0
+ '[' 0 -ne 0 ']'
+ eval 'exec 8<>/tmp/tmp_1508357760_10072/read'
++ exec
+ rc=0
+ '[' 0 -ne 0 ']'
+ eval 'exec 3<>./eva_to_memory.log'
++ exec
+ rc=0
+ '[' 0 -ne 0 ']'
+ control_connection=10084
+ data_connection=
+ nc 192.168.178.1 21
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '220 ADAM2 FTP Server ready
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '220 ADAM2 FTP Server ready
++ return 0
' line='220 ADAM2 FTP Server ready
+ ec=220
+ '[' x220 == x220 ']'
+ login_to_box 8 7 3
+ local instream=8 outstream=7 log=3 lines=0
+ write_ftp_command 'USER adam2' 7 3
+ local outstream=7 'cmd=USER adam2' log=3
+ '[' '!' -z 3 ']'
+ echo 'USER adam2'
+ echo 'USER adam2'
+ '[' 0 -lt 10 ']'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '331 Password required for adam2
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '331 Password required for adam2
++ return 0
' line='331 Password required for adam2
+ ec=331
+ '[' x331 == x331 ']'
+ write_ftp_command 'PASS adam2' 7 3
+ local outstream=7 'cmd=PASS adam2' log=3
+ '[' '!' -z 3 ']'
+ echo 'PASS adam2'
+ echo 'PASS adam2'
+ lines=0
+ '[' 0 -lt 10 ']'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '230 User adam2 successfully logged in
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '230 User adam2 successfully logged in
++ return 0
' line='230 User adam2 successfully logged in
+ ec=230
+ '[' x230 == x331 ']'
+ '[' x230 == x230 ']'
+ return 0
+ '[' 0 -eq 0 ']'
+ write_ftp_command SYST 7 3
+ local outstream=7 cmd=SYST log=3
+ '[' '!' -z 3 ']'
+ echo SYST
+ echo SYST
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '215 AVM EVA Version 1.1964 0x0 0x740D
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '215 AVM EVA Version 1.1964 0x0 0x740D
++ return 0
' line='215 AVM EVA Version 1.1964 0x0 0x740D
+ ec=215
+ '[' x215 == x215 ']'
'+ echo '215 AVM EVA Version 1.1964 0x0 0x740D
++ sed -n -e 's/.*\(AVM EVA\).*/\1/p'
+ syst='AVM EVA'
+ '[' 7 -ne 0 ']'
' echo 'Found AVM bootloader: AVM EVA Version 1.1964 0x0 0x740D
Found AVM bootloader: AVM EVA Version 1.1964 0x0 0x740D
++ get_environment 8 7 3
++ local instream=8 outstream=7 log=3 lines=0
++ write_ftp_command 'TYPE I' 7 3
++ local outstream=7 'cmd=TYPE I' log=3
++ '[' '!' -z 3 ']'
++ echo 'TYPE I'
++ echo 'TYPE I'
+++ read_ftp_response 8 3
+++ local 'line=   -' rc=0 instream=8 log=3
+++ read -u 8 -r line
+++ '[' '!' -z 3 ']'
'++ echo '200 Type set to BINARY
+++ '[' ' ' '!=' - ']'
+++ break
+++ rc=0
'++ echo '200 Type set to BINARY
+++ return 0
'+ line='200 Type set to BINARY
++ ec=200
++ '[' x200 '!=' x200 ']'
++ write_ftp_command 'MEDIA SDRAM' 7 3
++ local outstream=7 'cmd=MEDIA SDRAM' log=3
++ '[' '!' -z 3 ']'
++ echo 'MEDIA SDRAM'
++ echo 'MEDIA SDRAM'
+++ read_ftp_response 8 3
+++ local 'line=   -' rc=0 instream=8 log=3
+++ read -u 8 -r line
+++ '[' '!' -z 3 ']'
'++ echo '200 Media set to MEDIA_SDRAM
+++ '[' ' ' '!=' - ']'
+++ break
+++ rc=0
'++ echo '200 Media set to MEDIA_SDRAM
+++ return 0
'+ line='200 Media set to MEDIA_SDRAM
++ ec=200
++ '[' x200 '!=' x200 ']'
++ write_ftp_command P@SW 7 3
++ local outstream=7 cmd=P@SW log=3
++ '[' '!' -z 3 ']'
++ echo P@SW
++ echo P@SW
+++ read_ftp_response 8 3
+++ local 'line=   -' rc=0 instream=8 log=3
+++ read -u 8 -r line
+++ '[' '!' -z 3 ']'
'++ echo '227 Entering Passive Mode (192,168,178,1,12,2)
+++ '[' ' ' '!=' - ']'
+++ break
+++ rc=0
'++ echo '227 Entering Passive Mode (192,168,178,1,12,2)
+++ return 0
'+ line='227 Entering Passive Mode (192,168,178,1,12,2)
++ ec=227
++ '[' x227 == x227 ']'
'++ echo 227 Entering Passive Mode '(192,168,178,1,12,2)
+++ sed -n -e 's/.*(\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\)).*/data_ip=\1.\2.\3.\4 data_port=\$(( \5 * 256 + \6 ))/p'
++ data_conn='data_ip=192.168.178.1 data_port=$(( 12 * 256 + 2 ))'
++ '[' 51 -eq 0 ']'
++ eval 'data_ip=192.168.178.1 data_port=$(( 12 * 256 + 2 ))'
+++ data_ip=192.168.178.1
+++ data_port=3074
++ data_connection=10099
++ sleep 1
++ nc -w 60 192.168.178.1 3074

++ write_ftp_command 'RETR env' 7 3
++ local outstream=7 'cmd=RETR env' log=3
++ '[' '!' -z 3 ']'
++ echo 'RETR env'
++ echo 'RETR env'
+++ read_ftp_response 8 3
+++ local 'line=   -' rc=0 instream=8 log=3
+++ read -u 8 -r line
+++ '[' '!' -z 3 ']'
'++ echo '150 Opening BINARY data connection
+++ '[' ' ' '!=' - ']'
+++ break
+++ rc=0
'++ echo '150 Opening BINARY data connection
+++ return 0
'+ line='150 Opening BINARY data connection
++ ec=150
++ '[' x150 == x150 ']'
+++ read_ftp_response 8 3
+++ local 'line=   -' rc=0 instream=8 log=3
+++ read -u 8 -r line
+++ '[' '!' -z 3 ']'
'++ echo '226 Transfer complete
+++ '[' ' ' '!=' - ']'
+++ break
+++ rc=0
'++ echo '226 Transfer complete
+++ return 0
'+ line='226 Transfer complete
++ ec=226
++ '[' x226 == x226 ']'
++ '[' -d /proc/10099 ']'
++ wait 10099
++ kill 10099

++ data_connection=
++ echo /tmp/tmp_1508357760_10072/env
++ return 0
+ environment=/tmp/tmp_1508357760_10072/env
+ '[' 0 -eq 0 ']'
++ sed -n -e 's/^HWRevision *\(.*\)\r$/\1/p' /tmp/tmp_1508357760_10072/env
+ hwrev=203
+ echo 'Found hardware revision: 203'
Found hardware revision: 203
++ sed -n -e 's/^memsize *\(.*\)\r$/\1/p' /tmp/tmp_1508357760_10072/env
+ memsize=0x08000000
++ printf '(%u MB)' 128
+ echo 'Memory size is 0x08000000 (128 MB)'
Memory size is 0x08000000 (128 MB)
+ '[' 1 = 1 ']'
+ memsize=134217728
+ echo 'Memory size limited to 128 MB'
Memory size limited to 128 MB
++ printf 0x%06x 27057408
++ printf '(%u MB)' 25
+ echo 'Image size is 0x19cdd00 (25 MB)'
Image size is 0x19cdd00 (25 MB)
++ printf 0x%08x 107160320
+ setmemsize=0x06632300
+ echo 'Setting temporary memory size to: 0x06632300'
Setting temporary memory size to: 0x06632300
++ printf 0x%08x 2254643968
+ imagestartaddr=0x86632300
++ printf 0x%08x 2281701376
+ imageendaddr=0x88000000
+ echo 'Setting temporary kernel args to: mtdram1=0x86632300,0x88000000'
Setting temporary kernel args to: mtdram1=0x86632300,0x88000000
+ upload_image 8 7 3 /usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory 0x06632300 0x86632300 0x88000000
+ local instream=8 outstream=7 log=3 file=/usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory memsize=0x06632300 startaddr=0x86632300 endaddr=0x88000000
+ eval 'exec 9<>/tmp/tmp_1508357760_10072/store'
++ exec
+ '[' 0 -ne 0 ']'
+ write_ftp_command 'SETENV memsize 0x06632300' 7 3
+ local outstream=7 'cmd=SETENV memsize 0x06632300' log=3
+ '[' '!' -z 3 ']'
+ echo 'SETENV memsize 0x06632300'
+ echo 'SETENV memsize 0x06632300'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '200 SETENV command successful
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '200 SETENV command successful
++ return 0
' line='200 SETENV command successful
+ ec=200
+ '[' x200 '!=' x200 ']'
+ write_ftp_command 'SETENV kernel_args_tmp mtdram1=0x86632300,0x88000000' 7 3
+ local outstream=7 'cmd=SETENV kernel_args_tmp mtdram1=0x86632300,0x88000000' log=3
+ '[' '!' -z 3 ']'
+ echo 'SETENV kernel_args_tmp mtdram1=0x86632300,0x88000000'
+ echo 'SETENV kernel_args_tmp mtdram1=0x86632300,0x88000000'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '200 SETENV command successful
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '200 SETENV command successful
++ return 0
' line='200 SETENV command successful
+ ec=200
+ '[' x200 '!=' x200 ']'
+ write_ftp_command 'TYPE I' 7 3
+ local outstream=7 'cmd=TYPE I' log=3
+ '[' '!' -z 3 ']'
+ echo 'TYPE I'
+ echo 'TYPE I'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '200 Type set to BINARY
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '200 Type set to BINARY
++ return 0
' line='200 Type set to BINARY
+ ec=200
+ '[' x200 '!=' x200 ']'
+ write_ftp_command 'MEDIA SDRAM' 7 3
+ local outstream=7 'cmd=MEDIA SDRAM' log=3
+ '[' '!' -z 3 ']'
+ echo 'MEDIA SDRAM'
+ echo 'MEDIA SDRAM'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '200 Media set to MEDIA_SDRAM
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '200 Media set to MEDIA_SDRAM
++ return 0
' line='200 Media set to MEDIA_SDRAM
+ ec=200
+ '[' x200 '!=' x200 ']'
+ write_ftp_command P@SW 7 3
+ local outstream=7 cmd=P@SW log=3
+ '[' '!' -z 3 ']'
+ echo P@SW
+ echo P@SW
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '227 Entering Passive Mode (192,168,178,1,12,15)
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '227 Entering Passive Mode (192,168,178,1,12,15)
++ return 0
' line='227 Entering Passive Mode (192,168,178,1,12,15)
+ ec=227
+ '[' x227 == x227 ']'
'+ echo 227 Entering Passive Mode '(192,168,178,1,12,15)
++ sed -n -e 's/.*(\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\)).*/data_ip=\1.\2.\3.\4 data_port=\$(( \5 * 256 + \6 ))/p'
+ data_conn='data_ip=192.168.178.1 data_port=$(( 12 * 256 + 15 ))'
+ '[' 52 -eq 0 ']'
+ eval 'data_ip=192.168.178.1 data_port=$(( 12 * 256 + 15 ))'
++ data_ip=192.168.178.1
++ data_port=3087
+ data_connection=10120
+ sleep 1
+ nc -w 3 192.168.178.1 3087

+ write_ftp_command 'STOR 0x86632300 0x88000000' 7 3
+ local outstream=7 'cmd=STOR 0x86632300 0x88000000' log=3
+ '[' '!' -z 3 ']'
+ echo 'STOR 0x86632300 0x88000000'
+ echo 'STOR 0x86632300 0x88000000'
++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line
++ '[' '!' -z 3 ']'
'+ echo '150 Opening BINARY data connection
++ '[' ' ' '!=' - ']'
++ break
++ rc=0
'+ echo '150 Opening BINARY data connection
++ return 0
' line='150 Opening BINARY data connection
+ ec=150
+ '[' x150 == x150 ']'
+ cat /usr/local/src/freetz/freetz-trunk/images/7362_06.83-freetz-devel-14443.de_20171017-080835.image.in-memory

++ read_ftp_response 8 3
++ local 'line=   -' rc=0 instream=8 log=3
++ read -u 8 -r line

At this point, the script stops ....

Following the eva_to_memory.log

220 ADAM2 FTP Server ready^M
USER adam2
331 Password required for adam2^M
PASS adam2
230 User adam2 successfully logged in^M
SYST
215 AVM EVA Version 1.1964 0x0 0x740D^M
TYPE I
200 Type set to BINARY^M
MEDIA SDRAM
200 Media set to MEDIA_SDRAM^M
P@SW
227 Entering Passive Mode (192,168,178,1,12,2)^M
RETR env
150 Opening BINARY data connection^M
226 Transfer complete^M
SETENV memsize 0x06632300
200 SETENV command successful^M
SETENV kernel_args_tmp mtdram1=0x86632300,0x88000000
200 SETENV command successful^M
TYPE I
200 Type set to BINARY^M
MEDIA SDRAM
200 Media set to MEDIA_SDRAM^M
P@SW
227 Entering Passive Mode (192,168,178,1,12,15)^M
STOR 0x86632300 0x88000000
150 Opening BINARY data connection^M
 
Zuletzt bearbeitet:
Do not modify the "nc" call, provide the correct "netcat" package. Why do you think, that anybody would use an option, which you may remove without consequences?

Install the "netcat-openbsd" package (the contained "nc" command should know something about this exotic "-d" option:
Code:
$ nc -h
OpenBSD netcat (Debian patchlevel 1.105-7ubuntu1)
This is nc from the netcat-openbsd package. An alternative nc is available
in the netcat-traditional package.
usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length]
          [-P proxy_username] [-p source_port] [-q seconds] [-s source]
          [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol]
          [-x proxy_address[:port]] [destination] [port]
        Command Summary:
                -4              Use IPv4
                -6              Use IPv6
                -b              Allow broadcast
                -C              Send CRLF as line-ending
                -D              Enable the debug socket option
                -d              Detach from stdin
                -h              This help text
                -I length       TCP receive buffer length
                -i secs         Delay interval for lines sent, ports scanned
                -j              Use jumbo frame
                -k              Keep inbound sockets open for multiple connects
                -l              Listen mode, for inbound connects
                -n              Suppress name/port resolutions
                -O length       TCP send buffer length
                -P proxyuser    Username for proxy authentication
                -p port         Specify local port for remote connects
                -q secs         quit after EOF on stdin and delay of secs
                -r              Randomize remote ports
                -S              Enable the TCP MD5 signature option
                -s addr         Local source address
                -T toskeyword   Set IP Type of Service
                -t              Answer TELNET negotiation
                -U              Use UNIX domain socket
                -u              UDP mode
                -V rtable       Specify alternate routing table
                -v              Verbose
                -w secs         Timeout for connects and final net reads
                -X proto        Proxy protocol: "4", "5" (SOCKS) or "connect"
                -x addr[:port]  Specify proxy address and port
                -Z              DCCP mode
                -z              Zero-I/O mode [used for scanning]
        Port numbers can be individual or ranges: lo-hi [inclusive]
) and try it again ... but with the original code, please.

And could you do me another favor? Please try to consider a problem in your system or with your call of a script first, if you're running into the next problem.
,
The scripts were used by some (or better: various) users with success ... the chances are greater, that your system uses the wrong components or you did it wrong, than that there are (undiscovered) problems in the scripts (even, if the scripts are still far away from being perfect).

If you think, you've found such a hidden problem, file a report - but do not change the code without a really good reason and ask the author, why it's not running as expected anymore. Thanks.
 
Do not modify the "nc" call, provide the correct "netcat" package. Why do you think, that anybody would use an option, which you may remove without consequences?

Install the "netcat-openbsd" package (the contained "nc" command should know something about this exotic "-d" option:

Thanks a lot, once more.

I must say that I have, of course, check the options of my installed "nc" before asking the question. Actually, I only asked after reading a lot, spending hours looking at the code and my system.

I was not aware that I should use netcat-openbsd. No-one is perfect.

And could you do me another favor? Please try to consider a problem in your system or with your call of a script first, if you're running into the next problem.
,
The scripts were used by some (or better: various) users with success ... the chances are greater, that your system uses the wrong components or you did it wrong, than that there are (undiscovered) problems in the scripts (even, if the scripts are still far away from being perfect).

If you think, you've found such a hidden problem, file a report - but do not change the code without a really good reason and ask the author, why it's not running as expected anymore. Thanks.

Apologies if I offended you. It was not my intention.
Actually, my question was to the forum. When I first asked I was not aware that you were the author of these scripts.
Your work is very appreciated as well as your answers.

Thanks !
 
No, you didn't offend me really ... but you wrote earlier, you would have had read the thread and it was mentioned explicitly in the first post from this thread (look at its end), that the "netcat-openbsd" package is needed.

And it's usually "bad practice" (vs. best practice) to modify a foreign software without an own precise idea, what happens there ... if you did know this already and you'll heed it in the future, everything is fine.
 
No, you didn't offend me really ... but you wrote earlier, you would have had read the thread and it was mentioned explicitly in the first post from this thread (look at its end), that the "netcat-openbsd" package is needed.

And it's usually "bad practice" (vs. best practice) to modify a foreign software without an own precise idea, what happens there ... if you did know this already and you'll heed it in the future, everything is fine.

Imagina que tienes que leer un montón de información en un idioma que no dominas, en mi caso el Alemán. Varias páginas, foros, lugares. Creo que se puede llegar a entender que algunas partes no se entiendan o que uno se las salte porque cree, de manera equivocada, que no son relevantes. Si, en el primer post aparece el problema de netcat, pero solamente lo he encontrado después de que me apuntases hacia el problema.
Ahora imagina, si es que no hablas español, que tienes que leer páginas de texto como este en el que en medio se menciona netcat. Parece complicado, no ? En fin, que no me quejo porque entiendo el trabajo que se lleva hacer lo que hay escrito en estas páginas y en los scripts, pero yo me pensaría un poco.
Sobre best/bad practice, bueno, al final tuve que modificar los scripts ... pero eso es otra historia.

Once again, thanks a lot ! And it is honest statement, believe me.
I will not continue with the latest exchange, there is no need to do it.
 
Bueno hasta aca hay gente que podrian ayudar pero parece justo de Peter de ser poco molesto si alguien primero modifica su software y luego pregunta pq no funciona
 
Let me (or better Google) translate the important parts from #1 to your native(?) language:
A los prerrequisitos:
¡El "eva_to_memory" necesariamente necesita OpenBSD Netcat! ¡El Busybox, la versión "clásica" 1.10 o "Netcat6" no funciona! Si usa Debian como yo, entonces con "installed-alternatives" con varias versiones instaladas, la correcta de ellas debe configurarse como "nc" o, de lo contrario, asegurarse de que la versión de OpenBSD se encuentre como "nc".
And no, I don't think that it's too complicated to find, read and understand information from the internet in our modern times - even if they're in a foreign language. It's only a question of the own efforts and needs only little fantasy.

Maybe the translation above isn't perfect, but you may simply get it yourself from this link: https://translate.google.de/translate?hl=de&sl=de&tl=es&u=https://www.ip-phone-forum.de/threads/flash-script-f%C3%BCr-7490.287879/ - how should anybody here know, that you were not able to ask Google for a translation?

With this thought in mind, your attempt with a complete paragraph in Spanish and its translation to English:
Imagine that you have to read a lot of information in a language you do not master, in my case the German. Several pages, forums, places. I think that you can get to understand that some parts are not understood or that you skip them because you mistakenly believe that they are not relevant. Yes, in the first post appears the problem of netcat, but I only found it after you pointed me to the problem.
Now imagine, if you do not speak Spanish, you have to read pages of text like this in the middle that is mentioned netcat. Sounds complicated, does not it? Anyway, I do not complain because I understand the work that takes to do what is written in these pages and in the scripts, but I would think a little.
About best / bad practice, well, in the end I had to modify the scripts ... but that's another story.
or to German:
Stellen Sie sich vor, Sie müssen eine Menge Informationen in einer Sprache lesen, die Sie nicht beherrschen, in meinem Fall die Deutsche. Mehrere Seiten, Foren, Orte. Ich denke, dass Sie verstehen können, dass einige Teile nicht verstanden werden oder dass Sie sie überspringen, weil Sie fälschlicherweise glauben, dass sie nicht relevant sind. Ja, im ersten Beitrag erscheint das Problem von netcat, aber ich habe es nur gefunden, nachdem Sie mich auf das Problem hingewiesen haben.
Stellen Sie sich nun vor, wenn Sie kein Spanisch sprechen, müssen Sie Seiten dieses Textes in der Mitte lesen, die netcat genannt wird. Klingt kompliziert, oder? Jedenfalls beschwere ich mich nicht, weil ich die Arbeit verstehe, die das macht, was auf diesen Seiten und in den Skripten geschrieben wird, aber ich würde ein wenig darüber nachdenken.
Über die beste / schlechte Praxis, am Ende musste ich die Skripte modifizieren ... aber das ist eine andere Geschichte.
only shows, that you didn't use all of your opportunities.

Nevertheless I'm glad, if you reached your goals ... even if I'm unable to understand, why you had to modify the scripts. Why didn't you simply change the shell behind "/bin/sh"? If you have decided to change the scripts instead, it's solely your own problem. If you had to make any other changes, we still don't know, what you did in the end.

I wrote to you somewhere above (and it was in English, not in German):
Use a default shell (/bin/sh), which is NOT "dash" [...]
Somewhere else I wrote an explanation, why the scripts use (as intended) a SheBang of "/bin/sh" - it's not a bug, it's really a feature and was selected due to very good reasons.

And last, but not least ... if you really want to declare, that changing a SheBang is the same as changing logic and command calls of a foreign script, most experienced Linux users would disagree in my opinion.

If you got back now a running 7362SL with the desired system, the case is over - but I'm not obliged to believe in lame stories regarding inevitable problems, while they were only self-made in the end.

I can understand the first and second question in #49 and #51 ... and you've gotten polite answers of @qwertz.asdfgh and myself.

I can't understand the further questions (reasons above - I can't believe, that "Google Translator" works too wrong here for a basic understanding) and why you try now to dispute, that you hadn't good reasons to change the command line for "nc" - I've only asked for a favor on your further attempts and your explanation attempts, why you have had to change the original script indeed, do not convince me.

But it's even unnecessary - my hope is, the next one tries it harder himself or tells us a better story, after he/she read this.
 
Zuletzt bearbeitet:
Bueno hasta aca hay gente que podrian ayudar pero parece justo de Peter de ser poco molesto si alguien primero modifica su software y luego pregunta pq no funciona
Mir kommt dieses Forum schon seit einiger Zeit etwas spanisch vor. Ist die deutsche Version jetzt nicht mehr hier, sondern woanders?
Unbenannt.JPG
 
Zuletzt bearbeitet:
  • Like
Reaktionen: informerex
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.