[Fixed] RX CTCSS does not work...

User avatar
EB3AM
Posts: 204
Joined: Fri Jan 24, 2020 1:40 pm
Location: Catalonia, not Spain
Contact:

[Fixed] RX CTCSS does not work...

Post by EB3AM » Wed Apr 01, 2020 12:15 am

Hello, taking advantage of the time we are locked in at home, by covid19, I am playing with an FM repeater configuration, and the possibility that it can dock an mmdvm.
it already works quite well in C4FM and I am tuning it for DMR. But this is not the case with the bug I found.
I have found that this configuration I have made allows both digital and analog use, which I want to take advantage of.
The repeater has a small TX carrier all the time, about a milliwatt, intrinsic to the product. I have programmed the analog mode in the repeater to send a subaudible tone with the transmission, and I have programmed my transceivers in T-SQL mode. All devices except the openGD77 close the audio of this carrier. The radioddity shuts it down for a few seconds and then opens the audio again.
I have tried afterwards with a local FM repeater, and if I have the "squelch" down, so that the led is green, the same thing happens. It does not close for CTCSS, as do the other equipment I have.
In short, in FM mode, if the RX LED is on, the T_SQL (CTCSS RX) is not working properly.

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

Re: RX CTCSS does not work...

Post by VK3KYY » Wed Apr 01, 2020 10:38 am

I don't understand the problem

I set my Rx to a CTCSS (74.4) , then transmitted without CTCSS and the Green LED turns on but no audio is heard

I then set my Tx to 74.4 and on the Rx radio I can hear my transmission.

The Green LED will illuminate when there is any signal on the frequency, if the level of the signal is above the squelch setting (FM squelch).
It does this in both DMR and FM mode.
Also the S meter always indicated when there is a signal both in DMR and FM mode, if there is any signal at all.

User avatar
EB3AM
Posts: 204
Joined: Fri Jan 24, 2020 1:40 pm
Location: Catalonia, not Spain
Contact:

Re: RX CTCSS does not work...

Post by EB3AM » Wed Apr 01, 2020 11:00 am

I make a video...


youtu.be/B9xivOq9fX4

In this video I am seeing the response of a UHF FM repeater.
With the squelch set correctly, the receiver closes the audio.
If I lower the squelch level, they turn on the Green LED, but there is no sound. That is correct.
Once I do PTT, when I return to the RX screen the receiver does not mute the sound.
Last edited by EB3AM on Wed Apr 01, 2020 11:15 am, edited 1 time in total.

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: RX CTCSS does not work...

Post by G4EML » Wed Apr 01, 2020 11:06 am

Hi Roger,
The problem is that if you remove the tone whilst still transmitting the squelch does not close. Not something that is easily done on most radios but a custom repeater like that described might continue to radiate carrier and just turn off the tone.

It can be demonstrated by receiving a signal with CTCSS and reducing the squelch level to minimum whilst receiving. When the signal is removed the squelch remains open.

(Probably a linked bug is if you open the squelch on a CTCSS channel so the green light is on a signal containing CTCSS will not be received)



I haven’t looked at the code yet but it would appear that the logic for enabling and disabling the audio amp is not correct.

Colin.

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

Re: RX CTCSS does not work...

Post by VK3KYY » Wed Apr 01, 2020 11:24 am

Colin

Thanks

The code to control the audio amp got reworked about a month ago, as it gets turned on or off by multiple sources

There is probably a bug in the revised code which is leaving the amp turned off.

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: RX CTCSS does not work...

Post by G4EML » Wed Apr 01, 2020 3:41 pm

Roger...

PR Raised to fix this.

Colin.

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

Re: RX CTCSS does not work...

Post by VK3KYY » Wed Apr 01, 2020 8:33 pm

I had a quick look, but it seems to change some DM1801 related code to stop the hiss on the 1801

I will need to try it in the 1801 to confirm whether the bug with the his is affected

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: RX CTCSS does not work...

Post by G4EML » Wed Apr 01, 2020 9:33 pm

The code is still there. It was only one line and was actually part of the problem. It’s moved to a different location in the logic.

Colin.

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

Re: RX CTCSS does not work...

Post by VK3KYY » Wed Apr 01, 2020 9:47 pm

G4EML wrote:
Wed Apr 01, 2020 9:33 pm
The code is still there. It was only one line and was actually part of the problem. It’s moved to a different location in the logic.

Colin.
OK

Thanks.

I'll test later

User avatar
EB3AM
Posts: 204
Joined: Fri Jan 24, 2020 1:40 pm
Location: Catalonia, not Spain
Contact:

Re: RX CTCSS does not work...

Post by EB3AM » Fri Apr 03, 2020 11:27 am

some success

Code: Select all

void trx_check_analog_squelch(void)
{
	trx_measure_count++;
	if (trx_measure_count==25)
	{
		uint8_t squelch;//=45;

		trxReadRSSIAndNoise();

		// check for variable squelch control
		if (currentChannelData->sql!=0)
		{
			squelch =  TRX_SQUELCH_MAX - (((currentChannelData->sql-1)*11)>>2);
		}
		else
		{
			squelch =  TRX_SQUELCH_MAX - (((nonVolatileSettings.squelchDefaults[trxCurrentBand[TRX_RX_FREQ_BAND]])*11)>>2);
		}



		if (trxRxNoise < squelch)
		{
			if (!analogSignalReceived )
			{
				analogSignalReceived = true;
				displayLightTrigger();
				GPIO_PinWrite(GPIO_LEDgreen, Pin_LEDgreen, 1);

				/*
				 * On the DM-1801 there is a problem with unsquelched hiss being heard after the beep function ends
				 * The work-around / solution is not leave the input of the amp connected to the C6000 at the end of the beep
				 * unless there is a RF signal.
				 * However this means that the mux may not be set to the AT-1846 when a signal is received
				 * Although the state of the mux could be checked, its quicker just to always set it to the correct state.
				 *
				 * On the GD-77 in FM mode, changing the mux input to the RF chip (AT1846) while the amp is still enabled also causes a slight click, so
				 * This code change has been applied to all platforms
				 */
				GPIO_PinWrite(GPIO_RX_audio_mux, Pin_RX_audio_mux, 1);// Set the audio path to AT1846 -> audio amp.
			}
			if(!rxCTCSSactive || (rxCTCSSactive & trxCheckCTCSSFlag()))
			{
				enableAudioAmp(AUDIO_AMP_MODE_RF);
			}
			/*eb3am*/
			else
			{
							disableAudioAmp(AUDIO_AMP_MODE_RF);
			}
			/*eb3am*/
		}
		else
		{
			analogSignalReceived = false;
			if (trxIsTransmittingTone == false) /*eb3am*/
			{
				disableAudioAmp(AUDIO_AMP_MODE_RF);
				GPIO_PinWrite(GPIO_LEDgreen, Pin_LEDgreen, 0);
			}
		}

    	trx_measure_count=0;
	}
}
I add this and works...

Code: Select all

	
			else
			{
							disableAudioAmp(AUDIO_AMP_MODE_RF);
			}
in the video, left: original firmware, right: modified firmware


youtu.be/yDZ-SHJ11U0
Last edited by EB3AM on Fri Apr 03, 2020 11:37 am, edited 1 time in total.

Post Reply