[Fixed] RX CTCSS does not work...

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

Re: RX CTCSS does not work...

Post by VK3KYY » Fri Apr 03, 2020 11:32 am

Colin already did a fix for it


Its part of the pre-release I posted earlier today

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

Re: RX CTCSS does not work...

Post by F1RMB » Fri Apr 03, 2020 11:35 am

Hi,
EB3AM wrote:
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);
			}
It seems you're hacking some already modified and fixed code:

https://github.com/rogerclarkmelbourne/ ... trx.c#L278

Cheers.
---
Daniel

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:46 am

:D
I work offline

Is the same? perfect!

Well, I revised the code and maybe better your option... :lol:

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

Re: RX CTCSS does not work...

Post by F1RMB » Fri Apr 03, 2020 12:21 pm

Hi,
EB3AM wrote:
Fri Apr 03, 2020 11:46 am
:D
I work offline

Is the same? perfect!

Well, I revised the code and maybe better your option... :lol:
Oh, okay ;)

BTW, I didn't fixed it, it's from Colin and Roger.

Cheers.
---
Daniel

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

Re: RX CTCSS does not work...

Post by VK3KYY » Fri Apr 03, 2020 7:45 pm

Colin fixed it.

OH1E
Posts: 96
Joined: Sat Nov 16, 2019 8:59 am

Re: [Fixed] RX CTCSS does not work...

Post by OH1E » Sat Apr 25, 2020 10:55 am

this modifications bringed new problems. now when high moduladet sound using rx ctcss the squelch will close.
to reproduce this use 2 radios other set rx ctcss and yell on other you will notice breaking up.
A possibly fix tho this is add delay to the squelch close time when using ctcss. already done this fix, but im not a good coder, so someone please take a look on this if this is possible to pull on main. :)
Here is pull request https://github.com/rogerclarkmelbourne/ ... 0467c45230

basically it will delay the squelch more when using rx ctcss and that will fix the issue most of the time, only drawback is when using ctcss the tail of noise will come, but it is better listen the noise than listen breaking up talking all the time. as it is now not usable at all!

Code: Select all

			if (trxIsTransmittingTone == false)
			{
				trx_ctcc_measure_count++;
				if (trx_ctcc_measure_count==50){	// add squelch close delay when using ctcss to avoid breaking ups
					disableAudioAmp(AUDIO_AMP_MODE_RF);
					trx_ctcc_measure_count=0;
				}
				if (!rxCTCSSactive){
					disableAudioAmp(AUDIO_AMP_MODE_RF);
				}
If I merge this fix, I'd get complains from anyone using CTCSS on FM if it adds a squelch noise at the end of each over.

Any fix should not introduce new problems.

OH1E
Posts: 96
Joined: Sat Nov 16, 2019 8:59 am

Re: [Fixed] RX CTCSS does not work...

Post by OH1E » Sun Apr 26, 2020 6:15 am

If I merge this fix, I'd get complains from anyone using CTCSS on FM if it adds a squelch noise at the end of each over.
Any fix should not introduce new problems.
Well Colin fix or something else broke the rx ctcss, it is not usable anymore. our repeater needs rx ctcss (it is hybrid FM/DMR)
Do you want me take a video demostrating using our repeater will be just breaking up the squelch all the time ?

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

Re: [Fixed] RX CTCSS does not work...

Post by VK3KYY » Sun Apr 26, 2020 7:51 am

Riku wrote:
Sun Apr 26, 2020 6:15 am
If I merge this fix, I'd get complains from anyone using CTCSS on FM if it adds a squelch noise at the end of each over.
Any fix should not introduce new problems.
Well Colin fix or something else broke the rx ctcss, it is not usable anymore. our repeater needs rx ctcss (it is hybrid FM/DMR)
Do you want me take a video demostrating using our repeater will be just breaking up the squelch all the time ?
Colin fixed his own bug as soon as it was reported.

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

Re: [Fixed] RX CTCSS does not work...

Post by G4EML » Sun Apr 26, 2020 10:09 am

If the squelch is closing in speech peaks as you describe then the most likely cause is trying to listen to a 25KHz wide deviation signal with the radio set to 12.5KHz. If your radio is already set to 25KHz and the squelch is still closing on speech peaks then it sounds like either your squelch setting is too high or the signal has excessive deviation.

OH1E
Posts: 96
Joined: Sat Nov 16, 2019 8:59 am

Re: [Fixed] RX CTCSS does not work...

Post by OH1E » Sun Apr 26, 2020 11:15 am

G4EML wrote:
Sun Apr 26, 2020 10:09 am
signal has excessive deviation.
Yes you are right! most radios can handle this, but gd77 factory firmware cant, opengd77 was able to handle this before, but now it is not anymore because something has changed. this can reproduced easy use 2xgd77 and just yell on the other.
Also when you moving on mobile signal going up/down fast, causing radio not read the ctcss, it will just break up. only solution to this is the delay what im here trying to do.

im not ready to give up this yet i have managed to fix that squelch tail, by adding one more if state.
basically when high deviation come or radio cannot read ctcss it will delay 100 cycles before closing sq, if there no signal above squelch then it closes right away.
here is modified code. havent tested it yet on moving

Code: Select all

			if (trxIsTransmittingTone == false)
			{
				trx_ctcc_measure_count++;
				if (trx_ctcc_measure_count==100){	// add squelch close delay when using ctcss to avoid breaking ups on high deviation
					disableAudioAmp(AUDIO_AMP_MODE_RF);
					trx_ctcc_measure_count=0;
				}
				if (!rxCTCSSactive){			// when not using rx ctcss will close faster squelch
					disableAudioAmp(AUDIO_AMP_MODE_RF);
					trx_ctcc_measure_count=0;
				}
				if(trxRxNoise > squelch){		// last resort squelch closing, when there no signal. this fixes above squelch tail when use ctcss
					disableAudioAmp(AUDIO_AMP_MODE_RF);
					trx_ctcc_measure_count=0;
				}
			}

Post Reply