On Tue, 17 Nov 2009, john s wrote:
> Having trouble reading from uart com ports in c (or bash for that
matter)? I need to keep com1 as a terminal. I know I have seen posts
about this and in particular the why /pts/0 changes to /pts/1 even tho
i am not aware i added a new port. But I cant find one now.
>
> I have been able to setup a comport using xuartctl.
>
> I am able to echo > 'sometuff\r' > /dev/pts/0 and see the
'somestuff' appear on hyper terminal. And do the same thing in c.
>
> But I have not been able to do a cat and see anythng typed into
hyperterminal. Worse still, I ran an example c program from the web and
when it closed the fd for /dev/pts/0' it seems that the xuartctl for
port 0 now referred to /dev/pts/1.
>
> Is there an example c program that is ok? Should i be using
tcsetattr or just depend on the port being configure ok per the
xuartctl command?
>
>