Try to build x64 version of CPS

Post Reply
F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Try to build x64 version of CPS

Post by F4IKZ » Fri Jan 10, 2020 7:18 am

Hello, I tried to run CPS on x64 build with MSVC. CPS interface run correctly, but when attempt to communicate with the radio, no device found.

I tried to enumerate HID device with the embeded win32usb class x86 and x64. The wanted device HID_VID = 0x15A2 and HID_PID = 0x0073 is not visible in x64 build. Does the windows driver used to communicate with the OpenGD Firmware x86 only?

Is it possible to communicate using the serial port instead of use low level HID layer?

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

Re: Try to build x64 version of CPS

Post by VK3KYY » Fri Jan 10, 2020 9:17 am

The OpenGD77 uses a serial com port.

The official firmware uses USB HID, but Kai, who started the project decided to use a com port, possibly because its easier to program on the PC and in the firmware.


When you say MSVC, do you mean Visual Studio ? MSVC normally means Microsoft Visual C (and often Microsoft Foundation Classes (MFC)).

But the CPS uses MS Visual Studio and C#

F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Re: Try to build x64 version of CPS

Post by F4IKZ » Fri Jan 10, 2020 11:09 am

Yes, I apologies . I mean Microsoft Visual Studio.
on Git radioddity_gd-77_cps Master branch, the Open source CPS seem continue to use USB HID Lib:
https://github.com/rogerclarkmelbourne/ ... ms.cs#L151

Is there another repo or branch who working with serial port ?

I'm agree with the choice of using serial port, more safe and cross-plateform. :)

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

Re: Try to build x64 version of CPS

Post by VK3KYY » Fri Jan 10, 2020 9:07 pm

Did you install the serial driver?

F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Re: Try to build x64 version of CPS

Post by F4IKZ » Sat Jan 11, 2020 4:25 pm

Yes , therefore , the class seem to ask HID_VID = 0x15A2 and HID_PID = 0x0073, but the serial device is registered as vid 0x01FC9 --pid 0x0094

Code: Select all

@echo off
echo Installing OpenGD77 Serial driver...
"%~dp0wdi-simple"[b] --vid 0x01FC9 --pid 0x0094[/b] --type 3 --name "OpenGD77" --dest "%~dp0OpenGD77-serial-driver-files"
echo.
pause
When I go to device manager, the serial interface gave the good ID (vid 0x01FC9 --pid 0x0094)

But no trace of the requested ones in the CPS source code....
The stranged think is the fact when the CPS build forced to x86 , that's the case on original one, the HID_VID = 0x15A2 and HID_PID = 0x0073 is good detected. but no trace in x64...

F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Re: Try to build x64 version of CPS

Post by F4IKZ » Sat Jan 11, 2020 5:30 pm

Ok I understand, 15a2:0073 is the GD77 in Firmware mode , 1fc9:0094 in serial mode

F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Re: Try to build x64 version of CPS

Post by F4IKZ » Sat Jan 11, 2020 7:01 pm

After tracing Debug on x64 build :

Test in https://github.com/rogerclarkmelbourne/ ... rap.cs#L33

Fail in x64 , but success on x86 build

F4IKZ
Posts: 14
Joined: Tue Jan 07, 2020 9:52 am

Re: Try to build x64 version of CPS

Post by F4IKZ » Sat Jan 11, 2020 8:34 pm

Ok now, I success to read and write the GD-77 codeplug with any_CPU build.

I replaced serial port enumeration by new class using WMA:

https://bitbucket.org/Artemia/radioddit ... 7632ea4bd7

Not sure that solution work on Mono portage ...

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

Re: Try to build x64 version of CPS

Post by VK3KYY » Sat Jan 11, 2020 9:55 pm

The CPS searches by the device name assigned when the driver is installed, not by the VID PID.
Hence why you can’t find the VID PID in the code.

Post Reply