[olug] OT? C programming question.

Dan Anderson dan-anderson at cox.net
Wed Sep 1 17:23:43 UTC 2010


The "receiver" appears to be something hung off the serial port.

I don't understand the problem either though.

If one of the parameters (?) has an extra char, I guess I'd filter it (which
you should do anyway).

I'd also check to make sure that I am sending the correct cr/lf that the
"receiver" expects (i.e. \r versus \r\n).  "Enter" means different things.

Dan

On Wed, Sep 1, 2010 at 11:42 AM, Obi-Wan <obiwan at jedi.com> wrote:

> I write C code for a living, but I'm not quite sure what you're asking
> from us or what the current problem is.  Can you elaborate?
>
> Is the "receiver" just a socket connection to some other program that's
> expecting ASCII commands?
>


> > Â Â Â Â Â  fd = open( "/dev/ttyS0", O_RDWR | O_NDELAY);
> > Â Â Â Â Â  fd = open( "/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY);
> > This is from the user guide of the receiver (using a terminal emulator):
> >
> > Using the PERMCH Command to dynamically change channels on the receiver.
> NOTE: all four FREQ CMD dip switches must be in the up position.
> > PERMCH (spacebar) 8 & Enter – dynamically selects Channel 1
> > PERMCH (spacebar) 12 & Enter – dynamically selects Channel 2
> > PERMCH (spacebar) 14 & Enter – dynamically selects Channel 3
> > PERMCH (spacebar) 15 & Enter – dynamically selects Channel 4
> > PERMCH (spacebar) 7 & Enter – dynamically selects Channel 5
> > PERMCH (spacebar) 3 & Enter – dynamically selects Channel 6
> > PERMCH (spacebar) 1 & Enter – dynamically selects Channel 7
> > PERMCH (spacebar) 5 & Enter – dynamically selects Channel 8
>



More information about the OLUG mailing list