drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
193 stars 49 forks source link

CAT and PTT not working together ? #706

Closed Aleziss closed 5 months ago

Aleziss commented 5 months ago

Hello everyone,

it seems that when you set CAT control to a 7300 (in my demonstration) and set the welcomed option of NOT using CAT to PTT the transceiver but rather use separate COM port to key FreeDV instead from an external PTT button, it cause FreeDV to get stuck on transmit even though the CAT PTT control is set to none.

I also sometime get FreeDV Stop button becomes greyed out, I have to kill the process in order to stop FreeDV to transmit. This happend when the external COM port is disconnected and FreeDV seem to be trying to connect to the PTT control that is absent. I cannot pinpoint exactly how and what cause the issue.

You can check this video to see what goes on.

The goal, have an external PTT switch that grounds the CTS pin of a USB to TTL converter on a different COM port than the CAT control.

That CTS pin will key the FreeDV software but is also used through a relay to key the radio.

That way, I can still pull the transceiver info frequency and mode over CAT control but use a separate PTT control.

When CAT is deactivated, it works perfectly. When CAT is enable, it gets stuck to TX.

Thank you !

tmiw commented 5 months ago

Out of curiosity, if you select something like RTS instead of "None (RX Only)" in "PTT Uses", does that cause FreeDV to work any better?

Aleziss commented 5 months ago

That is what I used to do before the None (RX Only) option was in the PTT uses options and it did work fine.

I will test if that works better than None (RX Only) setting.

Thank you for reply.

Aleziss commented 5 months ago

So I try to set PTT uses to DTR or RTS, grounded the CTS pin on the PTT In section, both radio and FreeDV keyed but got stuck on TX. I can stop FreeDV with the PTT button but now the Stop button is greyed out and I can't stop FreeDV beside killing the process.

It used to work before the None (RX Only) option was there...

I tried to run FreeDV with admin priviledges, for the first couple seconds, it seemed to have work and then it resume to the previous behavior describe before.

Another thing I noticed is that when set PTT uses to DTR or RTS, if I push the PTT button, the radio get keyed anyway and that should not be the case since it is expecting a DTR or RTS signal on the radio com port...

If I deactivate CAT control via Hamlib and only use PTT In CTS pin, it works flawlessly, able to key both software and radio but without frequency being pulled from the radio.

So there is something going on when CAT control via Hamlib is enable.

If you want to monitor what is going on, we can do a RustDesk session and you can try to see what is going on from my computer...

Aleziss commented 5 months ago

I don't know if this is any help but here is a debug dump I collected.

tmiw commented 5 months ago

I think I'm able to duplicate your issue here and made a build with a possible fix: https://www.dropbox.com/scl/fi/leina451hu2y0ng2t4yp2/FreeDV-1.9.9-devel-2024-04-03-566b6e64-windows-x86_64.exe?rlkey=6ajvvckbaxcky90im35oqel1t&dl=0. Would you be able to test and let me know if that helps at all? Thanks!

Aleziss commented 5 months ago

I cannot start that version :

image

Aleziss commented 5 months ago

I think I'm able to duplicate your issue here and made a build with a possible fix: https://www.dropbox.com/scl/fi/leina451hu2y0ng2t4yp2/FreeDV-1.9.9-devel-2024-04-03-566b6e64-windows-x86_64.exe?rlkey=6ajvvckbaxcky90im35oqel1t&dl=0. Would you be able to test and let me know if that helps at all? Thanks!

I don't know what happened but all of a sudden, the error went away and I confirm that when the PTT uses is set to None and the PTT In CTS pin get grounded/ungrounded, it now works properly !!!

That seems to be fixed now !

Thanks !!

Aleziss commented 5 months ago

I am not sure if the PTT button should be working ? It's like FreeDV switch to transmit but does not control radio. Not sure what the use of the PTT button would be used for ?

tmiw commented 5 months ago

I don't know what happened but all of a sudden, the error went away and I confirm that when the PTT uses is set to None and the PTT In CTS pin get grounded/ungrounded, it now works properly !!!

Yeah, Windows can sometimes be weird with audio. I'm glad it's working properly now, though! I'll go ahead and merge.

I am not sure if the PTT button should be working ? It's like FreeDV switch to transmit but does not control radio. Not sure what the use of the PTT button would be used for ?

Some people use interfaces such as SignaLink (which doesn't provide CAT control and keys the radio effectively via VOX), so this is as expected.