CPS Linux Support (still unsolved)

PR7LDR
Posts: 19
Joined: Mon Nov 13, 2023 3:18 pm

Re: CPS Linux Support (still unsolved)

Post by PR7LDR » Thu Dec 14, 2023 9:42 pm

I had some success with Wine. The OpenGD77 CPS runs, and is possible to edit codeplug files seamlessly. But unfortunately Wine does not cope well with ports driven by specific drivers, as OpenGD77 CPS uses. So, I cannot figure out how to recognize the Linux serial port. In my setup the radio was assigned to "/dev/ttyACM0".

https://ibb.co/jf3wDnJ

The CPS shows "Failed to open comm port" in every attempt to communicate with the radio.
Last edited by PR7LDR on Thu Dec 14, 2023 10:33 pm, edited 2 times in total.

PR7LDR
Posts: 19
Joined: Mon Nov 13, 2023 3:18 pm

Re: CPS Linux Support (still unsolved)

Post by PR7LDR » Thu Dec 14, 2023 10:13 pm

To test OpenGD77 CPS under wine, do the command below (example for Debian-based distros):

Code: Select all

sudo apt install wine mono-complete
After it completes installation, use winetricks (without sudo) to install Microsoft .NET v4.5:

Code: Select all

winetricks dotnet45
It will install M$ .NET 3.5 and 4.5. Then, install the CPS software:

Code: Select all

cd <folder_you saved_CPS_install_file>
wine OpenGD77CPSInstaller_RYYYY.MM.DD.nn.exe	# the version you are using
Follow the prompts. Do not allow the installer to create desktop icon, install drivers, or run the program at the end.

If the Wine app menu entry does not work in your desktop, open a terminal at the directory below. The "(x86)" part depends if you configured wine to x86 or x86-64 prefix, the CPS runs on both as a 32-bit application. If needed, change ".wine" to your chosen wine prefix (defaults to .wine):

Code: Select all

cd ~/.wine/drive_c/Program\ Files\ \(x86\)/OpenGD77CPS/
./OpenGD77CPS.exe
At the first start, the OpenGD77 CPS will not detect the driver, and will not ask for a communications port. If you try to read or write to the radio, an error about communications failed is shown.

I was not able to solve this until now, and doubt if it is even possible, because there is a specific Windows driver to allow communications. Linux sees the port directly, so the port is mapped within wine as a standard comm port.

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

Re: CPS Linux Support (still unsolved)

Post by VK3KYY » Fri Dec 15, 2023 5:55 am

The OpenGD77 COM driver is not specific to the OpenGD77, its actually from LibWDI,
https://github.com/pbatard/libwdi

Which as far as I know tricks Windows to use its own CDCACM (COM) port driver for any specific USB VID/PID

All firmware appears as a generic CDCACM device, and all the installer does is tell LibWDI to associate the VID/PID of the radio with the windows driver.

LibWDI also allows the device to be named i.e its description.

So potentially if you can set the description of the /tty port in question to be OpenGD77 then possibly the CPS running under Wine may be able to find it.

However, I'm not sure if you can assign a description / friendly name to a com port in Linux? Possibly this could be done using some sort of symbolic link ??

User avatar
F1RMB
Posts: 2626
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: CPS Linux Support (still unsolved)

Post by F1RMB » Fri Dec 15, 2023 6:06 am

I spent some time with Wine and the CPS, but the Wine serial layer is not really fully functional.

PR7LDR
Posts: 19
Joined: Mon Nov 13, 2023 3:18 pm

Re: CPS Linux Support (still unsolved)

Post by PR7LDR » Fri Dec 15, 2023 11:52 am

VK3KYY wrote:
Fri Dec 15, 2023 5:55 am
The OpenGD77 COM driver is not specific to the OpenGD77, its actually from LibWDI,
https://github.com/pbatard/libwdi

Which as far as I know tricks Windows to use its own CDCACM (COM) port driver for any specific USB VID/PID

All firmware appears as a generic CDCACM device, and all the installer does is tell LibWDI to associate the VID/PID of the radio with the windows driver.

LibWDI also allows the device to be named i.e its description.

So potentially if you can set the description of the /tty port in question to be OpenGD77 then possibly the CPS running under Wine may be able to find it.

However, I'm not sure if you can assign a description / friendly name to a com port in Linux? Possibly this could be done using some sort of symbolic link ??
I will dig more about this later. I also found technical information that can be useful:

Code: Select all

https://www.downtowndougbrown.com/2013/03/getting-x-ctu-in-wine-to-detect-your-serial-ports/
Wine has changed a bit, but this can be useful yet.

PR7LDR
Posts: 19
Joined: Mon Nov 13, 2023 3:18 pm

Re: CPS Linux Support (still unsolved)

Post by PR7LDR » Fri Dec 15, 2023 1:04 pm

I have found the thread below, but it is not working anymore. The CPS is still having the same port issue.

viewtopic.php?f=12&t=2426

So, the CPS did work before, but stopped working because some change happened afterwards.

Post Reply