GD-77 developer utilities

posted in: DMR, GD-77, Ham radio | 4

To make the development work on the GD-77 firmware a bit easier, I’ve created 2 new utilities for anyone working on the GD-77 firmware.

The utilities are   bin2sgl and also the GD77_FirmwareLoader


Note. These tools, especially the firmware loader, have not been extensively tested yet, and should be used with caution.


Both are Command Line utilities, but the firmware loader also has a small GUI if its used without specifying a file name to upload.


bin2sgl converts an unencrypted firmware binary file into a SGL file which can be uploaded into the GD-77 using the official Radioddity “update.exe”

This is an amalgamation of Kai’s (DG4KLU) encrypter/decrypter tool’s functionality that not only encrypts, but also adds the header required by the official update.exe application.


The second utility GD77_FirmwareLoader, is a command line replacement for Radioddity’s update.exe, which is used to upload new firmware into the GD-77


As well as being able to upload the official .sgl update files, it also accepts unencrypted firmware (binary) files, and encrypts them before uploading.

The utility is primarily intended to be used by developers who can “script” their development environment to use the utility to automatically upload a binary or SGL file into the GD-77, without having to mess around running the updater and selecting a file and pressing the button to upload the firmware into the radio.


It can also be used to do a drag-and-drop update of the firmware. And it also has a small GUI, which allow the file to be selected if its run without a file being specified.

Its also smaller than the official Radioddity updater, because its self contained and does not use any external .dll files like the Radioddity uploader does


Additionally, if a second argument of “GUI” is specified e.g.


GD77_FirmwareLoader.exe gd77_vk3kyy_20190505.sgl GUI


The tool will show a small window containing a progress bar. I primarily added this feature so that when used with tools like Ghidra, the upload progress can be seen quite clearly.



Both new tools have been added to the tools folder in my Radioddity_GD-77 github repository.


I’ve also created some Ghidra scripts to use these utilities but I’ve not had time to publish them yet.


4 Responses

  1. ken

    good work

  2. Roger Clark

    Thanks Ken

    Although I don’t have a lot to show, in terms of a shiny new firmware version, I have been doing a lot of things in the background.

    As well as writing these 2 utilities, to make my life (and other developers lives) easier.

    I’ve also written some scripts for use with the Ghidra reverse engineering tool that I’m using.

    So that tasks like taking the change(s) I make in Ghidra and putting them into my radios, are now just 1 click of a button, rather than a whole series of steps requiring multiple programs.

    Hence something that probably took 2 or 3 minutes, now takes around 5 seconds.

    I’ve also been making some other minor changes to my firmware.

    1. The last letter of callsign + name was being obscured by the “handset” icon, so (with the help of @forkoz-aka@rootstar) I have hidden the icon by moving it off the bottom of the screen. Moving the icon left a blank patch of screen which something else in the code was erasing, so @forkoz found a way to prevent that happening
    2. This now allows the full width of the screen, which gives 1 extra character (15 instead of 14)
    3. I found a bug if 16 characters were used, and even though I increased the buffer sizes in the firmware to 20 characters, it didn’t seem to help.
    I also found that the character buffer didnt seem to have been explicitly cleared before being used, which was also a potential cause of the 16 character problem, so I added some code to make sure the buffer was cleared, but this didn’t help either.

    So, I’ve updated my CPS to only allow up to 15 character for the DMR ID.

    4. I also experimented to see if the Callsign + name could be made to go into 2 lines, using the \n and \r characters to force a newline or a carriage return, but the part of the firmware which displays this, does not seem to use the printing subsystem (which other parts of the firmware use), which supports newlines.

    I think in the future it would probably be possible to have the Callsign + name and the location on a new line underneath, but its not worth wasting any time on at the moment.

    5. I’ve continued to work on the manual entry of TalkGroup, but I still have problems with the display for the VFO, because I can’t get it to update the line that shows “VFO A” to read “TG 1234” etc, despite the display buffer memory being updated.

    Just tracking down a “flag” in the RAM to indicate that the radio is in VFO mode has been challenging.

    I’ve had to write a utility to compare RAM dumps, to help finding what changes when the radio is in different modes of operation.

    Anyway. My next goal is to get the manual entry of TG working, but I think this is still several weeks away.

  3. RiKu Bister

    Do you have any ideas what is causing gd77 not to preserve settings when powering off, example change channel and turn off radio and on then it will not stay on selected channel, also in settings will not save every time.
    this is totally random it works some times and sometimes not. we have on this city like 10+ gd77 with all same issue, what could cause it? rewriting new codeplug will be too hard, i dont think issue is there.

    Thanks for great work! -Riku OH1E

  4. Roger Clark

    This is a bug in the firmware

    The channel saving part of the firmware is a real mess.

    Its not only saving the Zone and the Channel in the Zone, but it randomly rewrites part of the codeplug back into memory.

    Bizarrely, I have found that if you press # to enter manual dial, and the type a number, this triggers the channel number backup to occur !

    Then you can press the red menu key a couple of times to exit back to the channel you are on.
    (Or press the right arrow to exit from Manual dial mode)

    Whats worse for me, is that when it rewrites part of the codeplug, it actually reads the channel name from the display buffer and puts this back into the codeplug storage.

    So if I change the firmware to update the display, to show other things, the firmware randomly put the on screen text into the name for the channel in the codeplug.

    In my experimental firmware, I’ve disabled the saving of channel to prevent this happening, and I intend to fix the problem when I get time.

Leave a Reply