Read/write GD-77 codeplug in Linux in Python 3 (experimental)

VK3KYY
Posts: 3491
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by VK3KYY » Mon Jul 13, 2020 2:46 am

You mean

http://members.optuszoo.com.au/jason.re ... format.pdf

Its no longer correct for the Zones, as the number of channels per zone has been increased to 80

KC7RBW
Posts: 121
Joined: Wed Nov 20, 2019 1:23 am

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by KC7RBW » Mon Jul 13, 2020 3:08 am

Yes, that's one of the two documents I referred to, and I said they're based on the stock firmware.
Andrew | KC7RBW | ajorg

LZ1CK
Posts: 12
Joined: Sun Jul 12, 2020 9:50 am

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by LZ1CK » Mon Jul 13, 2020 5:08 am

Thanks all! I now have some reading to do, and this is an evenings/weekends project, so it may take a while. But I find it baffling that this excellent open-source firmware currently requires Windows. Well, not really, py script for read/write with OpenGD77CPS for editing under Wine works, but is not ideal.

VK3KYY
Posts: 3491
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by VK3KYY » Mon Jul 13, 2020 5:17 am

FYI.

Several people have attempted to make CPS's, but I noticed that all those projects eventually got abandoned. I don't even think the Python script is actively supported and I think it has some bugs. But at least it works.

I did consider trying to rewrite the CPS so that it would compile and run on Linux, but I have up shortly after I started as it was too much work.
Daniel F1RMB also tried for many hours to make the CPS.exe work via Wine and Mono but it was impossible to make it fully work, because there is no support in Wine for serial comms !!!

LZ1CK
Posts: 12
Joined: Sun Jul 12, 2020 9:50 am

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by LZ1CK » Mon Jul 13, 2020 9:27 pm

I can already dump info for Contacts and RX Groups. I'll dig into the firmware a bit to identify the parts which really need to be supported.

I have no intention on implementing an interface -- there are excellent spreadsheet programs available to use for free. I'm still not sure if CSV is the best format though, I'm considering import-exporting to YAML, to be edited with a text editor.

VK3KYY
Posts: 3491
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by VK3KYY » Mon Jul 13, 2020 10:57 pm

LZ1CK wrote:
Mon Jul 13, 2020 9:27 pm
I can already dump info for Contacts and RX Groups. I'll dig into the firmware a bit to identify the parts which really need to be supported.

I have no intention on implementing an interface -- there are excellent spreadsheet programs available to use for free. I'm still not sure if CSV is the best format though, I'm considering import-exporting to YAML, to be edited with a text editor.
I considered using XML at one point, but you'd need to write an editor, which is not worth the hassle

Just stick to separate CSV's


BTW. If you look at the Channel export from the CPS, I added some stuff so that it put the Zone and the TG stuff into the Channel CSV
Its not ideal, but the CPS can then auto create zones and contacts and TG lists when its importing channels

LZ1CK
Posts: 12
Joined: Sun Jul 12, 2020 9:50 am

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by LZ1CK » Thu Jul 16, 2020 7:20 am

I added the full GPLv2 license terms to the repo and updated the copyright notice. As I did, I saw the copyright notice contains an incomplete sentence, so I filled it in:

https://github.com/kzyapkov/opengd77xfe ... 7ba30a0L11

Was the idea to license the code under GPL v2 only? If so, the statement was grammatically incorrect.

VK3KYY
Posts: 3491
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by VK3KYY » Thu Jul 16, 2020 7:39 am

LZ1CK wrote:
Thu Jul 16, 2020 7:20 am
I added the full GPLv2 license terms to the repo and updated the copyright notice. As I did, I saw the copyright notice contains an incomplete sentence, so I filled it in:

https://github.com/kzyapkov/opengd77xfe ... 7ba30a0L11

Was the idea to license the code under GPL v2 only? If so, the statement was grammatically incorrect.
You'd need to discuss the license with the original author. Try PM'ing them

BTW. I think there is a bug when uploading if you try to upload less than 32 bytes, i.e at the end of a transfer.

I recall fixing the bug when I re-used some of the gd77 transfer code in my script to use the GD-77 to encode WAV to audio for the voice prompts.

I think its lines like this one.

https://github.com/kzyapkov/opengd77xfe ... er.py#L372

Where it checks the number of bytes written is the size of the header + the size of the data buffer. But thats not correct, as you can send less bytes than size of the fixed data buffer (32 bytes)

My fix was to check the first 2 bytes of the response

https://github.com/LibreDMR/voice-promp ... er.py#L140

LZ1CK
Posts: 12
Joined: Sun Jul 12, 2020 9:50 am

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by LZ1CK » Thu Jul 16, 2020 8:28 am

You'd need to discuss the license with the original author. Try PM'ing them
Will do!
BTW. I think there is a bug when uploading if you try to upload less than 32 bytes, i.e at the end of a transfer. ...
I reworked the code completely, I think very few original lines are left in my worktree by now. Writing is currently disabled. I'll implement pythonic parsing of the binary blob first. I'll let you know when it's QA-ready :)

Thanks for all the help, and the awesome firmware. 73!

VK3KYY
Posts: 3491
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: Read/write GD-77 codeplug in Linux in Python 3 (experimental)

Post by VK3KYY » Thu Jul 16, 2020 9:10 am

LZ1CK wrote:
Thu Jul 16, 2020 8:28 am
I reworked the code completely, I think very few original lines are left in my worktree by now. Writing is currently disabled. I'll implement pythonic parsing of the binary blob first. I'll let you know when it's QA-ready :)
OK.

I thought it looked similar but different...

Post Reply