Backup RT3S firmware before flash OpenGD77 - via Linux tools

Bitte beachten!
In den kommenden Tagen stehen Wartungsarbeiten an und das Forum wird mehrmals für kurze Zeit in den Wartungsmode geschaltet. Voraussichtlich wird es nicht länger als insgesamt zwei Stunden dauern.
Grund sind Wartungsarbeiten am Server zur Vorbereitung eines Softwareupgrades für das Forum.

Danke für Euer Verständnis
  • Hallo werte OM's,


    habe das folgende Problem und hoffe auf Eure Hilfe.

    Von einem RT3S Handfunkgerät möchte ich ein Firmware Backup unter Linux machen.

    Z.Z. verwende ich das Tool dfu-utils, bevor ich z.B. OpenGD77 oder openTRX als neue

    FW auf das Gerät drauf spiele.


    Das Gerät wird am Computer erkannt und dfu-util --list liefert den folgenden Output:

    Found, DFU: [0483:df11] ver=0200, devnum=91, cfg=1, intf=0, path="1-3", alt=1, name="@SPI Flash Memory /0x00000000/16*064Kg", serial="00000000010C"
    Found DFU: [0483:df11] ver=0200, devnum=91, cfg=1, intf=0, path="1-3", alt=0, name="@Internal Flash /0x0800C000/01*016Kg,01*064Kg,07*128Kg", serial="00000000010C"


    Mein Versuch die beiden Speicher SPI und FLASH zu lesen und in eine Datei zu schreiben

    sieht eigentlich ok aus, wenn man dem Output von dfu-util glauben darf.

    dfu-util --alt=0 --upload-size 999424 --dfuse-address 0x0800C000:999424 --upload ./test0.bin

    dfu-util 0.11

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

    Opening DFU capable USB device...
    Device ID 0483:df11
    Device DFU version 011a
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 011a
    Device returned transfer size 1024
    DfuSe interface name: "Internal Flash "
    Upload [=========================] 100% 999424 bytes
    Upload done.


    dfu-util --alt=1 --upload-size 1048576 --dfuse-address 0x00000000:1048576 --upload ./test1.bin

    dfu-util 0.11

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

    Opening DFU capable USB device...
    Device ID 0483:df11
    Device DFU version 011a
    Claiming USB DFU Interface...
    Setting Alternate Interface #1 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 011a
    Device returned transfer size 1024
    DfuSe interface name: "SPI Flash Memory "
    Upload [=========================] 100% 1048576 bytes
    Upload done.


    ls -l *./test?.bin
    -rw-r--r--. 1 root root 999424 21. Mai 14:01 test0.bin
    -rw-r--r--. 1 root root 1048576 21. Mai 14:01 test1.bin

    Der Inhalt der erzeugten Dateien lässt mich aber daran zweifeln, dass ich wirklich die FW

    heruntergeladen habe.

    od -c ./test0.bin | head -3 ; od -c ./test0.bin | tail -3
    0000000 0 \t \0 005 Q \0 \b ) O \0 \b + O \0 \b
    0000020 - O \0 \b / O \0 \b 1 O \0 \b \0 \0 \0 \0
    0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 3 O \0 \b
    ...
    3637740 357 341 337 370 T 032 \t x 242 ) 017 321 337 370 < 032
    3637760 \t h 002 ) \n 321 002 337 370 @ 032 \b p 337 370
    3640000

    strings ./test0.bin | head -3 ; strings ./test0.bin | tail -3
    x!),
    xA)7
    x!),
    ...
    xA)7
    x!),
    xA)7


    od -c ./test1.bin | head -3 ; od -c ./test1.bin | tail -3
    0000000 0 \t \0 005 Q \0 \b ) O \0 \b + O \0 \b
    0000020 - O \0 \b / O \0 \b 1 O \0 \b \0 \0 \0 \0
    0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 3 O \0 \b
    ...
    3777740 357 341 337 370 T 032 \t x 242 ) 017 321 337 370 < 032
    3777760 \t h 002 ) \n 321 002 337 370 @ 032 \b p 337 370
    4000000

    strings ./test1.bin | head -3 ; strings ./test1.bin | tail -3
    x!),
    xA)7
    x!),
    ...
    xA)7
    x!),
    xA)7


    Beide Files haben den selben Inhalt, der sich immer wiederholt, weshalb

    ich glaube, dass bei meinem FW-Backup noch was schief läuft.


    Ich weiß, das Thema ist ziemlich speziell, aber vielleicht weiß ja jemand

    von Euch was dazu.

    Ich habe leider keine Windows-Rechner zur Hand, um es mit der CPS

    Software von Retevis zu bewerkstelligen.


    vy73

    Markus

  • ein kleiner Update,


    konnte jetzt erfolgreich den internen Flash auslesen.

    Zum Erfolg führte die Angabe der USB Transfergröße

    beim dfu-util Kommando als Wert 512.


    dfu-util -d 0483:df11 --alt 0 --dfuse-address 0x0800C000:999424 -U backup_internal.bin --transfer-size 512


    file backup_internal.bin
    backup_internal.bin: ARM Cortex-M firmware, initial SP at 0x20000930, reset at 0x08005104, NMI at 0x08004f28, HardFault at 0x08004f2a, SVCall at 0x08004f32, PendSV at 0x08002e3a


    Problematisch ist weiterhin das Auslesen vom SPI Flash.

    Zur Zeit spiele ich mich mit diversen Python Funktionen, die

    mir die Grok und Deepseek KI vorgeschlagen hat.


    Weiß noch jemand hierzu etwas Nützliches?


    vy73

    Markus

  • Noch ein nützliches Dokument zum o.g. FW Problem vom Travis Goodspeed.

    pocorgtfo/contents/articles/10-08.pdf at master · angea/pocorgtfo
    a "Proof of Concept or GTFO" mirror with an extensive index with also whole issues or individual articles as clean PDFs. - angea/pocorgtfo
    github.com

    Ein zugehöriges YT-Video gibt es auch

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.


    vy73

    Markus