Thanks
Markus Maerz <markus.maerz@gmx.net> writes:
> On Thu, 28 Mar 2002, Nick Papadonis wrote:
> > I have finally got around to testing this. I'm having similar trouble
> > on one of my Linux machines with the 2.4.17 kernel. The PTT-line
> > isn't signaling correctly.
> >
> > I'm using soundmodem-0.6. Have you tried this?
> Last year, someone else emailed me about this. In his case there was no
> PTT-signal at all, not even a short pulse. So I rewrote ptt.c a bit and it
Thanks Markus.
Your changes worked.
I did some fooling around with soundmodem-0.6 and found the following in ptt.c when looking at my oscilliscope:
<SNIPPET>
if (state->mode == serport)
ioctl(state->fd, state->ptt ? TIOCMBIS : TIOCMBIC, &y);
else if (state->mode == parport) {
reg = state->ptt | (state->dcd << 1);
ioctl(state->fd, PPWDATA, ®);
}
</SNIPPET>
The above code SHOULD signal the RTS pin high and low. I believe there is a timing issue here and it's happening in the serial driver. If I put a sleep() or printf() right before ioctl(), the signaling works fine. Remove it, and the RTS line stays low but goes high intermittently.
Shouldn't the above code snippet work? While the below code works, it results in more system calls. I would like to see the above code work again.
<SNIPPET>
if (state->mode == serport)
{
if (state->ptt)
{
ioctl(state->fd,TIOCMGET,&y);
y |= TIOCM_RTS;
ioctl(state->fd,TIOCMSET,&y);
}
else
{
ioctl(state->fd,TIOCMGET,&y);
y &= ~TIOCM_RTS;
ioctl(state->fd,TIOCMSET,&y);
}
} else if (state->mode == parport) {
reg = state->ptt | (state->dcd << 1);
ioctl(state->fd, PPWDATA, ®);
}
</SNIPPET>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/