OpenGD77 serial protocol?

Post Reply
larsks
Posts: 5
Joined: Mon Oct 26, 2020 12:22 pm

OpenGD77 serial protocol?

Post by larsks » Wed Oct 28, 2020 2:42 am

I'd like to take a crack at writing some utilities to at least export and import channel lists under Linux, so I've been looking a bit at how CPS communicates with the GD-77. I'm a little confused, because it looks as if some code accesses it via the serial port endpoint (e.g., in Extras/OpenGD77/OpenGD77Form.cs), while other bits appear to rely on the USB HID endpoint. Looking at Extras/OpenGD77/OpenGD77Form.cs, it looks like it ought to be possible to read/write the codeplug via the serial endpoint.

The code in OpenGD77Form.cs starts up by calling sendCommand(0), which sends a null command which is a 32 byte sequence of the form:

Code: Select all

['C', 0, 0, ..., 0]
Reading through the implementation of sendCommand(), it appears to expect a 64 byte response from the radio (with byte 1 matching the command number we just sent). Unfortunately, if I try to send the same sequence, the radio responds with nothing but "-".

In fact, I see the same thing if instead of mapping the USB device into my WIndows VM I expose the Linux serial device (/dev/ttyACM0) as a Windows serial port: I can see CPS send the initial command and receive an invalid response.

Any thoughts on how I can get the radio to respond as expected?

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

Re: OpenGD77 serial protocol?

Post by VK3KYY » Wed Oct 28, 2020 3:32 am


larsks
Posts: 5
Joined: Mon Oct 26, 2020 12:22 pm

Re: OpenGD77 serial protocol?

Post by larsks » Wed Oct 28, 2020 11:35 am

Oh, nice! Thanks!

Post Reply