[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Serial programming question



"Alex V. Toropov" <alex-home@ct.spb.ru> writes:

> Hi all !
> I'm trying to make my first progam, that will read series of bytes from
> serial port.
> But I have problems opening port. I makeing something like this:
> 
> fd=open("/dev/ttyS0", O_RDWR | O_NOCTTY)
> if(fd<0)
>     {printf("Error opening port\n") ; exit(0)}
> printf("Port opend ( %s )\n", ttyname(fd));
> 
> 
> And program containing this (run under root) prodused the folloing:
> 
> Port opend ( /dev/tty1 )
> 
> Or some othe tty, depends on real tty I'm executing this program.
> 
> Can anybody tell me what's wrong ? why I've opend /dev/tty1, not
> /dev/ttyS0 ?

try posting to comp.os.linux.development.apps.
I think some low-level questions have been asked in this group.

-- 
Felix Natter



Reply to: