Greetings Linux & PSK31 hams..
WA0EIR has written the code to implement a serial line PTT patch
to DL9RDZ's PSK31 program..
The selected serial port RTS line can be used to key the xmitter. In
the program - pressing ctrl-t changes the RTS line from a nominal -12
volts to +12 volts which can be used to turn on an opto isolator or
transistor.. Pressing ctrl-R will go into receive mode.. There is one
slight caveat in that ctrl-W, CW ID, has to be preceeded by ctrl-T..
The second ctrl-W will unkey the PTT line... Be sure to select the
Com port used before compiling..
Herewith the detailed instructions for patching the original source:
--------------------------------------------------------------------
MAKE A BACKUP OF YOUR PSK DIRECTORY!!!
SEE THE NOTE ABOUT 20 LINES DOWN
ADD THE FOLLOWING LINES TO THE TOP OF psk31-main.C
/*
* doPTT - a quick HACK to add push to talk to DL9RDZ's psk31
* Ted - WA0EIR
*/
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
void doPTT (int state)
{
static int serfd;
int arg = TIOCM_RTS;
/* Open the serial port not already open */
if (serfd == 0)
{
/* NOTE!!! If needed, change "/dev/ttyS1" on the */
/* next line to the serial port device you will be using. */
if ((serfd = open ("/dev/ttyS1", O_RDWR)) == -1)
{
perror ("Can't open serial port");
exit (1);
}
}
if (ioctl (serfd, state, &arg) == -1)
{
perror("RTS failed");
exit (1);
}
}
THEN, SOMEWHERE AROUND LINE 450 OF psk31-main.C, YOU WILL FIND:
case 18:
c=TX_END; break; /* ^R -> switch to RX */
case 20:
c=TX_START; transmit=1; out_status(0);
/*********************************************************************/
doPTT(TIOCMBIS); /* <--- ADD THIS LINE */
/*********************************************************************/
break; /* ^T -> switch to TX */
ADD THE INDICATED LINE.
FINALLY, SOMEWHERE AROUND LINE 510 OF psk31-main.C, YOU WILL FIND:
if(res==TX_END) {
transmit=0;
if(io_file) exit(2);
if(!full_duplex)
ioctl(audio_fd, SNDCTL_DSP_SYNC)
/**********************************************************************/
doPTT(TIOCMBIC); /*<--- ADD THIS LINE */
/**********************************************************************/
break;
}
AND ADD THE INDICATED LINE. DO A MAKE TO COMPILE.
That should do it. Request To Send (RTS) should toggle when you
switch between xmit and recv. Just use RTS to switch the PTT line.
-------------------------------------------------------------------------
Enjoy and vy 73,
Cheers: Hal from Five Forks, WV. {pop 70} :^) 98% Linux/Unix
email: [EMAIL PROTECTED]
ax25: [EMAIL PROTECTED] tcp/ip: [EMAIL PROTECTED]
.