CPS problems on some Non-English versions of Windows

Discussions related to the firmware code development
mouseman73
Posts: 17
Joined: Thu May 14, 2020 10:46 pm

CPS problems on some Non-English versions of Windows

Post by mouseman73 » Tue May 26, 2020 9:46 am

VK3KYY wrote:
Sat May 23, 2020 9:11 pm
mouseman73 wrote:
Sat May 23, 2020 12:59 pm
Thank you for info. MD-760 is more complete same as GD77 instead of other, but firmware from Radioddity isnt fit inside Tytera. I have no backup of original. I dont want flash back, only one reason i have, because of OpenGD77 not communicate with my computer. As i wrote, i did milion of things but still not :-( and some settings isnt possible make on radio directly.

BTW my Win10 is Czech - this is probably reason why "no com port found" as you and other people from my Country trying solve in different thread. But if you want open this problem again, i am ready for cooperation, i can give you for example Teamviewer to my computer for testing some, or i can run what you want, make reports. This problem with non-working CPS give all OpenGD77 to 50 percent of usage (for me). But i like it, the idea make open firmware is great - i want use it, but without CPS i have a problem :-(

In the Windows Device Manager, what us the device name for Com port device when the OpenGD77 is connected ?
VK3KYY i am ready to asist with solving a COM port problems. Plese, when you will have time for sure, let me know. I am IT stuff, litle programmer (python, PHP) and i have Windows in strange Czech language, than i can do what you want for test. I am here a listen :-) Just for remember.

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

Re: Original FW for TYT MD-760

Post by VK3KYY » Tue May 26, 2020 10:15 am

mouseman73 wrote:
Tue May 26, 2020 9:46 am
VK3KYY wrote:
Sat May 23, 2020 9:11 pm
mouseman73 wrote:
Sat May 23, 2020 12:59 pm
Thank you for info. MD-760 is more complete same as GD77 instead of other, but firmware from Radioddity isnt fit inside Tytera. I have no backup of original. I dont want flash back, only one reason i have, because of OpenGD77 not communicate with my computer. As i wrote, i did milion of things but still not :-( and some settings isnt possible make on radio directly.

BTW my Win10 is Czech - this is probably reason why "no com port found" as you and other people from my Country trying solve in different thread. But if you want open this problem again, i am ready for cooperation, i can give you for example Teamviewer to my computer for testing some, or i can run what you want, make reports. This problem with non-working CPS give all OpenGD77 to 50 percent of usage (for me). But i like it, the idea make open firmware is great - i want use it, but without CPS i have a problem :-(

In the Windows Device Manager, what us the device name for Com port device when the OpenGD77 is connected ?
VK3KYY i am ready to asist with solving a COM port problems. Plese, when you will have time for sure, let me know. I am IT stuff, litle programmer (python, PHP) and i have Windows in strange Czech language, than i can do what you want for test. I am here a listen :-) Just for remember.
Thanks.

If you run Windows PowerShell, then use the command

Get-WMIObject Win32_SerialPort

You should see a list of all the COM ports and it should include the OpenGD77 COM port e.g.

Code: Select all

Caption                     : OpenGD77 (COM70)
ConfigManagerErrorCode      : 0
ConfigManagerUserConfig     : False
CreationClassName           : Win32_SerialPort
Description                 : OpenGD77
DeviceID                    : COM70
ErrorCleared                : 
ErrorDescription            : 
InstallDate                 : 
LastErrorCode               : 
MaxBaudRate                 : 115200
MaximumInputBufferSize      : 0
MaximumOutputBufferSize     : 0
MaxNumberControlled         : 
Name                        : OpenGD77 (COM70)
OSAutoDiscovered            : True
PNPDeviceID                 : USB\VID_1FC9&PID_0094\5&26670DD9&0&3
Please can you let me know whether the OpenGD77 COM post is listed on your machine
(The radio must be connected and turned on etc)

mouseman73
Posts: 17
Joined: Thu May 14, 2020 10:46 pm

Re: Original FW for TYT MD-760

Post by mouseman73 » Tue May 26, 2020 5:26 pm

VK3KYY wrote:
Tue May 26, 2020 10:15 am

Get-WMIObject Win32_SerialPort

Please can you let me know whether the OpenGD77 COM post is listed on your machine
(The radio must be connected and turned on etc)

Code: Select all

Caption                     : OpenGD77 (COM6)
ConfigManagerErrorCode      : 0
ConfigManagerUserConfig     : False
CreationClassName           : Win32_SerialPort
Description                 : OpenGD77
DeviceID                    : COM6
ErrorCleared                :
ErrorDescription            :
InstallDate                 :
LastErrorCode               :
MaxBaudRate                 : 115200
MaximumInputBufferSize      : 0
MaximumOutputBufferSize     : 0
MaxNumberControlled         :
Name                        : OpenGD77 (COM6)
OSAutoDiscovered            : True
PNPDeviceID                 : USB\VID_1FC9&PID_0094\5&586F116&0&1
You can see my output from PS.

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

Re: CPS problems on some Non-English versions of Windows

Post by VK3KYY » Wed May 27, 2020 3:57 am

BTW.

I moved the posts about the CPS to a new thread (here)

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

Re: CPS problems on some Non-English versions of Windows

Post by VK3KYY » Wed May 27, 2020 4:08 am

It looks like the problem is in the CPS

Please can you download and install Visual Studio Community Edition

https://visualstudio.microsoft.com/vs/community/

Then download the CPS sources

https://github.com/rogerclarkmelbourne/ ... master.zip

Unzip the source.

Double click on the file OpenGD77CPS.sln

This will run Visual Studio and open the CPS source

In the Extras folder, open the "OpenGD77Form"

and look for the code at lines 1574, which handle finding the COM port

Code: Select all

private SerialPort commPort
		{
			get
			{
				if (_port == null)
				{
					try
					{
						String gd77CommPort = null;

						gd77CommPort = SetupDiWrap.ComPortNameFromFriendlyNamePrefix("OpenGD77");
						if (gd77CommPort == null)
						{
							CommPortSelector cps = new CommPortSelector();
							if (DialogResult.OK == cps.ShowDialog())
							{
								gd77CommPort = SetupDiWrap.ComPortNameFromFriendlyNamePrefix(cps.SelectedPort);
								IniFileUtils.WriteProfileString("Setup", "LastCommPort", gd77CommPort);// assume they selected something useful !
							}
							else
							{
								//this.Close();
								return null;
							}
						}

						if (gd77CommPort == null)
						{
							MessageBox.Show("Please connect the GD-77 running OpenGD77 firmware, and try again.", "OpenGD77 radio not detected.");
						}
						else
						{
							_port = new SerialPort(gd77CommPort, 115200, Parity.None, 8, StopBits.One);
							commPort.ReadTimeout = 1000;
						}

					}
					catch (Exception)
					{
						_port = null;
						System.Media.SystemSounds.Hand.Play();
						MessageBox.Show("Failed to open comm port", "Error");
						IniFileUtils.WriteProfileString("Setup", "LastCommPort", "");// clear any port they may have saved
						return null;
					}
					return _port;
				}
				else
				{
					return _port;
				}

			}
Put a break where it calls

Code: Select all

ComPortNameFromFriendlyNamePrefix(string friendlyNamePrefix)
And then run and then step into that function and see if you can find why its not finding the OpenGD77 port

Its possible that perhaps the function call to GetClassGUIDs() looking for items with the className = "Ports" does not work on some languages, perhaps perhaps "Ports" needs to be translated

Code: Select all

	public class SetupDiWrap
	{
		static public string ComPortNameFromFriendlyNamePrefix(string friendlyNamePrefix)
		{
			const string className = "Ports";
			Guid[] guids = GetClassGUIDs(className);
Anyway, if you step through that area of the code, you should be able to find where the code is failing to find the OpenGD77 device

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

Re: CPS problems on some Non-English versions of Windows

Post by VK3KYY » Wed May 27, 2020 9:33 am

BTW.

Daniel tried installing Czech language support on his Windows 10, but the CPS still works fine.

So its still a mystery why it won't work on some machines

mouseman73
Posts: 17
Joined: Thu May 14, 2020 10:46 pm

Re: CPS problems on some Non-English versions of Windows

Post by mouseman73 » Wed May 27, 2020 10:36 am

VK3KYY wrote:
Wed May 27, 2020 4:08 am
It looks like the problem is in the CPS

Please can you download and install Visual Studio Community Edition

https://visualstudio.microsoft.com/vs/community/

Then download the CPS sources

https://github.com/rogerclarkmelbourne/ ... master.zip

Unzip the source.

Double click on the file OpenGD77CPS.sln

This will run Visual Studio and open the CPS source

In the Extras folder, open the "OpenGD77Form"

and look for the code at lines 1574, which handle finding the COM port

...
Sorry Roger, there is mistake (i thing) i can found in Extras "OpenGD77Form" as you wrote - there is only OpenGD77Form.cs in folder OpenGD77 or i am totaly wrong? Can you check it. Thx.

mouseman73
Posts: 17
Joined: Thu May 14, 2020 10:46 pm

Re: CPS problems on some Non-English versions of Windows

Post by mouseman73 » Wed May 27, 2020 10:40 am

VK3KYY wrote:
Wed May 27, 2020 9:33 am
BTW.

Daniel tried installing Czech language support on his Windows 10, but the CPS still works fine.

So its still a mystery why it won't work on some machines
Where somebody "somehow" solving it, there is allready working on Czech language pack. This we know. I was tried lots of magic, changing language, changing timezone, multiply restarts, and no, i am not solving it. Can be version solution (home/pro) can be version of win10, can be update problems, can be problems on hardware (i am using Lenovo laptop). I dont know. But i hope, now we step by step investigate and solve :-)

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

Re: CPS problems on some Non-English versions of Windows

Post by VK3KYY » Wed May 27, 2020 10:57 am

Yes. Its

OpenGD77Form.cs

But expand the arrow in the project window, and it reveals 3 sub files.

Double click the file called OpenGD77Form (the one where the icon is orange)

This will open the code for the Form

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

Re: CPS problems on some Non-English versions of Windows

Post by VK3KYY » Wed May 27, 2020 10:59 am

BTW.

Do you mean, you think its not a problem with the Czech language, but something with version of Windows eg. Home version ?

Post Reply