Good question Mooneer.  Looking at the code, it appears that we
currently set the serial port PTT state when Start is pressed, rather
than on process/application start up.

This is a reasonable solution, and probably the reason why this
question hasn't come up before.  We also wait until Start is pressed to
take control of other hardware on the PC, such as the sound cards.

So we should probably discuss the benefits of taking control of the
serial port on application start up compared to the current situation
of when Start is pressed.

I don't have a strong opinion myself (I use Hamlib PTT).  We do need to
be careful of changing the behaviour of FreeDV in sensitive areas like
PTT control.

Cheers,
David

On Sun, 2021-10-03 at 11:17 -0700, Mooneer Salem wrote:
> Hi all,
> 
> To clarify, by "start", do we mean pushing the Start button in the
> GUI? Or when the process itself actually starts? I didn't think we
> did anything with Hamlib or the serial port immediately on start, but
> if that's incorrect, please feel free to fix.
> 
> Thanks,
> 
> -Mooneer K6AQ
> 
> On Sun, Oct 3, 2021 at 8:44 AM Don <don_li...@db-reid.com> wrote:
> > Yes, I agree with your suggested behavior and I'll try to implement
> > it.
> > 
> > As for Hamlib, it also uses a serial port.  Any serial port
> > application 
> > needs to select handshking.  Maybe Hamlib does that internally
> > based on
> > the radio.
> > 
> > My radio (IC-756-ProIII) does not use any handshaking so the
> > library 
> > probably doesn't control those lines.  But my radio interface
> > always
> > drives PTT from RTS (and CW-KEY from DTR) so I need to turn those
> > signals off even when using Hamlib to drive the CV-I interface.
> > 
> > Since Hamlib has more unknowns and complexity, I'll work on the
> > basic
> > serial port stuff first and then explore Hamlib setup as a seprate 
> > task.
> > 
> > Don
> > 
> > On Sun, Oct 03, 2021 at 11:23:43AM +1030, david wrote:
> > > Hi Don,
> > > 
> > > It's been some time since that code was written, but I'd suggest
> > > desired behaviour is:
> > > 
> > > 1/ If Serial Port PTT has not been configured, do nothing when
> > the
> > > freedv-gui application starts.
> > > 
> > > 2/ If Serial Port PTT has been configured, when the freedv-gui
> > > application is started the PTT control line should be set to
> > disable
> > > Tx.  The exact action will depend on which PTT control line is
> > selected
> > > (RTS or CTS) and the polarity.
> > > 
> > > 3/ On the PTT dialog.  When PTT configuration is complete and
> > APPLY or
> > > OK is pressed, the PTT control line should be set to disable Tx.
> > > 
> > > If this is not the case, please feel free to raise an Issue on
> > GitHub,
> > > or submit a PR to fix it.
> > > 
> > > -/-
> > > 
> > > Sorry I don't understand the issue around Hamlib.  Can you pls
> > describe
> > > a use case when using Hamlib PTT where we might need to directly
> > > control RTS or CTS lines?  When I use Hamlib for PTT control (say
> > for
> > > my IC7200), I just set the serial port and rig model.  I had
> > assumed
> > > that low level configuration like serial port control lines was
> > > abstracted away when using Hamlib.
> > > 
> > > Thanks,
> > > David
> > > 
> > > On Sat, 2021-10-02 at 16:36 -0700, Don wrote:
> > > > I have found some issues with using the RTS line of a serial
> > port
> > > > for PTT.
> > > > 
> > > > First when the freedv-gui starts it does not set the port to
> > the
> > > > inactive
> > > > state.  This can mean the transmitter turns on and stays on
> > until the
> > > > user tries to transmit.
> > > > 
> > > > Second, in the PTT dialog just setting the correct states and
> > > > pressing "OK"
> > > > or "APPLY" does not change the state of the port to the desired
> > > > inactive
> > > > levels.  I found some old documentation which told users to do
> > just
> > > > that,
> > > > change the setting and press "APPLY".
> > > > 
> > > > There is a work around, the "Test PTT" function changes the
> > state to
> > > > active,
> > > > then to inactive.
> > > > 
> > > > I think this is only an issue for the serial port, at least for
> > my
> > > > radios
> > > > Hamlib just leaves the radio as it is until PTT is activated.
> > > > 
> > > > A related item which might be harder is the state of the serial
> > port
> > > > control lines when using hamlib.  There does not seem to be a
> > way to
> > > > do
> > > > that in recent versions.  Older versions separated the settings
> > for
> > > > the
> > > > serial control lines from the method which at least could have
> > > > controlled them even when hamlib was in use.  An alternative
> > would be
> > > > to
> > > > duplicate these setting in the hamlib part of the dialog.
> > > > 
> > > > It looks pretty easy to fix but before I do any work on it I
> > want to
> > > > be
> > > > sure I understand the desired behavior.
> > > > 
> > > > Don - W7DMR
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Freetel-codec2 mailing list
> > > > Freetel-codec2@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/freetel-codec2
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Freetel-codec2 mailing list
> > > Freetel-codec2@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/freetel-codec2
> > 
> > 
> > _______________________________________________
> > Freetel-codec2 mailing list
> > Freetel-codec2@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/freetel-codec2
> 
> _______________________________________________
> Freetel-codec2 mailing list
> Freetel-codec2@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2



_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to