Page 1 of 2

Linux...?

Posted: Tue Nov 26, 2019 10:26 pm
by EA3IGM
I've been using the firm for a couple hours and I've found a ""problem""; I want to update my contacts
Thing is:
Even though I've configured Wine's COM10 and COM1 to be the serial port of the walkie ( /dev/ttyACM0 ), the CPS won't detect any serial ports, for instance, when I click on the ( Extras -> OpenGD77 Support ) menu, as if there were no serial ports...
Am I doing wrong, or is it not possible for now? (I use a virtual machine in the meantime, just curious)...

Thanks beforehand

EDIT: I do have the /etc/udev/rules.d/99-gd77.rules that are provided when installing the firmware
EDIT2: I do have a device named /dev/OpenGD77 in my system, created by the udev rules

Re: Linux...?

Posted: Wed Nov 27, 2019 12:18 pm
by DD1LBM
are you sure, the host machine gives physical control to wine? never had that running, although I tried for a long time. I use OpenGD in a VirtualBox with Win7 now without any problems.
the host is giving physical control to the guest system as long as the user is in virtualbox group..

Re: Linux...?

Posted: Wed Nov 27, 2019 2:10 pm
by EA3IGM
On virtualbox, OpenGD works properly, when you assign the USB device to the virtual machine.

What I mean is using the serial port and communicating to the GD77 WITHOUT VirtualBox, just by passing through the serial port to Wine.
Sorry if that was misunderstood.

Re: Linux...?

Posted: Wed Nov 27, 2019 4:59 pm
by DD1LBM
I'm afraid that this won't work. The programming device is a serial-to-USB converter, so you need to install a USB-driver into wine. The only way Wine works with USB is to symlink a /dev/ttyUSB* to a wine com port, but in this special case the com port is already on the cable-side of the adapter.

What you are trying to do is talking serial to USB to convert USB to serial.

So, as OpenGD brings its own USB driver, the only way is to use a VM and passthrough to the USB port on the host.

Hopefully there will be a native linux version in the future..

Re: Linux...?

Posted: Wed Nov 27, 2019 5:13 pm
by EA3IGM
Oh.. Understood now, I appreciate for the explanation

No problem and thanks again, will install Win 7 on a VM to update my contact agenda. Thanks!
73

Re: Linux...?

Posted: Fri Dec 20, 2019 4:51 pm
by OH1KH
Hi!

Just started with OpenGD77 and have similar problems with CPS.
There is no Windoze in house, not even media to install to virtualbox. So something is needed as the program dmrconfig ( https://github.com/sergev/dmrconfig ) does not work any more with OpenGD77 firmware.

CPS starts fine with wine, but as said in this chain the com port selector is empty.
If OpenGD77 firmware is installed it turns GD77 usb connection to different ID from "HID mouse" to usb2serial device that appears as /dev/ttyACM0

Dec 20 17:58:35 hamtpad kernel: cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device


If several ACM devices are in use it may be worth to add udev rule file /etc/udev/rules/92-GD77.rules so GD77 will be always found from /dev/OpenGD77 no matter how many other ACM devices there may be connected.


But before doing that we can try with /dev/ttyACM0. Wine must be set up to find it as serial port.
navigate to ~/.wine/dosdevices folder and make symlink with command:
ln -s /dev/ttyACM0 com1 (or what ever windoze com port number you wish to use)

[saku@hamtpad /]$ ls -l ~/.wine/dosdevices/com1
lrwxrwxrwx. 1 saku saku 12 20.12. 18:14 /home/saku/.wine/dosdevices/com1 -> /dev/ttyACM0



That is the normal way to introduce linux hardware port to wine naming. Linux does not need any special driver to get the OpenGD77 serial port ready.
If udev finds and registers it, it is usable. If symlink for wine is done it is usable in wine.
If just the windoze program uses serial port in legacy ways. I have used it with several simple programs where it works fine , but then there are some others that access serial in different way, probably programmed with some higher level programming tools (perhaps .NET
etc. used...?)

Now CPS seems to do something nasty with serial access as the symlinked port com1 is not found.

And at this part H.E.L.P is needed, please !

Re: Linux...?

Posted: Fri Dec 20, 2019 5:14 pm
by F1RMB
Hi,

Don't waste your time with CPS under Wine, there is no way to make it work correctly. Wine's USB support is very limited.
The only "clean" way to run it, is to make it work with Mono (but current code use PInvoke, which will never work). I've already started that, but it's on the ice ATM).

I just used a VirtualBox machine to tweak the codeplug data. One thing that is great with OpenGD77 is you don't need to set tons of digital contact, and so on. Just few entries are enough to start to use it.


Cheers.

Re: Linux...?

Posted: Tue Dec 31, 2019 10:58 am
by DD1LBM
Yes, the driver is a problem.. I found an older one for Vista that works properly in emulated mode.. Just google the chip inside the adapter and you will find the solution in the microsoft database..

Re: Linux...?

Posted: Sat Feb 15, 2020 1:54 pm
by OH1KH
Any news for CPS and Linux?

Finally I got new plug loaded at clubstation (they have Windoze there...).

I have been playing with CPS and Wine. It works ok.
I can load codeplugs from forum, watch and edit them and save then as an another codeplug to disk.

Now I wonder because it is possible to load firmware with python script and also take screenshot with another python script (means it can communicate with GD77 when it is NOT in firmware upload mode) why yet a third python script could be made to upload a codeplug that is saved to disk ?

Then it would be rather easy to use current CPS with wine, save own codeplug and then load it with python script.

It should not be very hard to produce for someone who knows how GD77 communicates and who can do something with python.
That would left CPS as it is, but still make it worth also for Linux users in it's current state.

I would try to do upload script but python is not familiar for me (fpc, bash, c, php would be little easier) and I do not know the serial protocol used by GD77 that finally prevents using any other programming language for uploader.

Re: Linux...?

Posted: Sun Feb 16, 2020 4:02 am
by kt4lh
I have a Windows 7 VM here for one reason.. Programming about 3 radios that have no other way to program them.

You can download a Windows 10 ISO and use it indefinitely, afaik, so that'd be an okay option to do this as needed. It's probably a lot easier than trying to make wine work.