CPS Updated

oh1fss
Posts: 74
Joined: Mon May 04, 2020 11:53 am

Re: CPS Updated

Post by oh1fss » Thu Sep 16, 2021 9:17 am

Thanks for the clarification, Roger!

So now the only information I miss is how to upload satellite data to the radio in Linux (preferably in Python).

(and I need to build an antenna for satellite QSOs...)

W9YA
Posts: 56
Joined: Sun Sep 06, 2020 4:16 am
Location: DM65pd38
Contact:

Re: CPS Updated

Post by W9YA » Thu Sep 16, 2021 9:32 am

Yep, I was asking THREE things..(albeit definitely somewhat tersely stated). Here's what they were:

1) - Has the codeplug format changed ?

2) - Has the location for the codeplug changed ?

3) - Has the amount of allocated space for the codeplug changed ?

From the above discussion. I am assuming at least items two and three have not changed.

Thanks OMs for clarifying this.

es vy 73 de BOB W9YA

P.S... And I will TRY not to be so confusing in the future.

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

Re: CPS Updated

Post by VK3KYY » Thu Sep 16, 2021 9:37 am

Nothing has changed at all with the codeplug format.

The changes to the Windows CPS exe are for the installation of the firmware

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

Re: CPS Updated

Post by VK3KYY » Thu Sep 16, 2021 9:50 am

oh1fss wrote:
Thu Sep 16, 2021 9:17 am
Thanks for the clarification, Roger!

So now the only information I miss is how to upload satellite data to the radio in Linux (preferably in Python).

(and I need to build an antenna for satellite QSOs...)
We didn't write a method to do this in python

The data structre format is

Code: Select all

typedef struct
{
	char 		TLE_Name[16];
	char 		TLE_Line1[70];
	char 		TLE_Line2[70];
	uint32_t	rxFreq;
	uint32_t	txFreq;
	uint16_t	txCTCSS;
	uint16_t	armCTCSS;
} codeplugSatelliteData_t;
This is uploaded as a custom data block in the same way as the Boot melody and Boot image data

i.e its a new enum for the data block CODEPLUG_CUSTOM_DATA_SATELLITE_TLE

Code: Select all

typedef enum
{
	CODEPLUG_CUSTOM_DATA_TYPE_NONE = 0,
	CODEPLUG_CUSTOM_DATA_TYPE_IMAGE,
	CODEPLUG_CUSTOM_DATA_TYPE_BEEP,
	CODEPLUG_CUSTOM_DATA_SATELLITE_TLE
} codeplugCustomDataType_t;

Its using functions in the firmware which were already in the last public release source code, specifically

Code: Select all

bool codeplugGetOpenGD77CustomData(codeplugCustomDataType_t dataType, uint8_t *dataBuf)
{
	uint8_t tmpBuf[12];
	int dataHeaderAddress = 12;
	const int MAX_BLOCK_ADDRESS = 0x10000;

	SPI_Flash_read(0, tmpBuf, 12);

	if (memcmp("OpenGD77", tmpBuf, 8) == 0)
	{
		codeplugCustomDataBlockHeader_t blockHeader;
		do
		{
			SPI_Flash_read(dataHeaderAddress, (uint8_t *)&blockHeader, sizeof(codeplugCustomDataBlockHeader_t));
			if (blockHeader.dataType == dataType)
			{
				SPI_Flash_read(dataHeaderAddress + sizeof(codeplugCustomDataBlockHeader_t), dataBuf, blockHeader.dataLength);
				return true;
			}

			if (blockHeader.dataLength == 0)
			{
				return false;
			}

			dataHeaderAddress += sizeof(codeplugCustomDataBlockHeader_t) + blockHeader.dataLength;

		} while (dataHeaderAddress < MAX_BLOCK_ADDRESS);

	}
	return false;
}
where

Code: Select all

typedef struct
{
	int dataType;
	int dataLength;
} codeplugCustomDataBlockHeader_t;

I'm not sure if your program already supports boot melody and boot image, if so this is just an extension to the at functionality

The Keps are downloaded from the URL listed in the CPS, and the CPS also loads satellites.txt which is part of the CPS installation and the format of satellites.txt is documented in the user guide.

Additionally the CPS can set the date / time by sending the time as secs since epoc 1970/01/01

In the firmware a new sub command was added

Code: Select all

					case 7:
						memcpy(&uiDataGlobal.dateTimeSecs, (uint8_t *)&com_requestbuffer[3], sizeof(uint32_t));// update date with data from the CPS
						menuSatelliteScreenClearPredictions(true);
						break;

to

Code: Select all

		case 6:
			{
				int subCommand = com_requestbuffer[2];
				uint32_t m = fw_millis();

				// Do some other processing
				switch(subCommand)
				{
if you look in the released source code usb_com.c you can see all the commands.


The firmware source code for this will be released when its stable

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

Re: CPS Updated

Post by F1RMB » Thu Sep 16, 2021 10:17 am

Hi,

And it's 15 satellites max.


Cheers.
---
Daniel

User avatar
YT5HOK
Posts: 213
Joined: Sat Nov 16, 2019 11:36 am
Location: Belgrade, KN04FR

Re: CPS Updated

Post by YT5HOK » Sun Sep 19, 2021 2:46 pm

VK3KYY wrote:
Tue Sep 14, 2021 10:13 am
The CPS has been updated
...
Roger, is it possible to restore old "Download callsign database" functionality, with two sources? (see attachment)
As I mentioned before, ham-digital.org still works, so I still use an old version to choose which callsigns to write, depending on lastheard data.
Attachments
capture1.jpg
capture1.jpg (64.6 KiB) Viewed 3336 times

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

Re: CPS Updated

Post by VK3KYY » Sun Sep 19, 2021 8:31 pm

The format of the data from the Ham digital website is different to the RadioID data , so it would take some time to combine both functionalities again.

I would need to investigate how long it will take to do this, but I am busy with some other things at the moment

oh1fss
Posts: 74
Joined: Mon May 04, 2020 11:53 am

Re: How much data [Install satellite keps] uploads to the radio?

Post by oh1fss » Sun Sep 26, 2021 12:07 pm

I have been writing a Python program to update satellite keps. I think I understand the data structures involved after reading https://www.opengd77.com/viewtopic.php? ... =10#p15844 - but I have a question about how much data the CPS sends to the radio.

When the user clicks [Install satellite keps] in CPS, does the CPS send to the radio
  • the whole codeplug,
  • the whole custom data area [0x1EE60,0x20000[ or
  • only the Keps custom data block (type CODEPLUG_CUSTOM_DATA_SATELLITE_TLE)?

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

Re: CPS Updated

Post by VK3KYY » Sun Sep 26, 2021 9:34 pm

The whole custom data area, its not possible to send just the keps block , as the radio custom data area may not contain what is in the codeplug

Post Reply