Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 1999 10:27:37 +0300
From:      "Igor Sysoev" <igor@nitek.ru>
To:        <questions@FreeBSD.ORG>
Subject:   Re: Serial programming
Message-ID:  <199902020728.KAA09163@gate.nitek.ru>

next in thread | raw e-mail | index | archive | help
> From: Mark Turpin <mturpin@spel.com>
> Subject: Serial programming

>     I'm working on a program to communicate with an  Amada  Punch
> Press.   It communicates serial.   I looked through the lists and found
> a reference to the Serial Programming Guide for POSIX compliant
> Operating Systems.   So using the information I gathered there I've
> opened the serial port like this
> 
>     fd = open("/dev/ttyd0",  O_RDWR |  O_NOCTTY | O_NDELAY);
> 
> Then when I go to write to the port
> 
>     n = write(fd, "Hello This is a test", 20);
> 
> n ends up being -1.   I'm running this as root, I've tried with minicom
> and it works fine.
> 
> Any suggestions?

May you should work with /dev/cuaa0 instead ?
As far as I know you will be blocked while opening /dev/ttyd0 until
there will be DCD line active.

With best regards,
Igor Sysoev


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902020728.KAA09163>