Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Feb 1999 02:55:51 -0500
From:      W Gerald Hicks <wghicks@bellsouth.net>
To:        mturpin@spel.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: Serial programming
Message-ID:  <19990202025551L.wghicks@wghicks.bellsouth.net>
In-Reply-To: Your message of "Tue, 2 Feb 1999 10:27:37 %2B0300" <199902020728.KAA09163@gate.nitek.ru>
References:  <199902020728.KAA09163@gate.nitek.ru>

next in thread | previous 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?

I ported qtalk from QNX to FreeBSD;  It seems to work well for me and
illustrates asynch programming for Unix pretty well (YMMV)

http://www.geocities.com/ResearchTriangle/ThinkTank/8131/qtalk.tgz

Good Luck,

Jerry Hicks
wghicks@bellsouth.net

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?19990202025551L.wghicks>