From owner-freebsd-questions Mon Feb 1 17:32:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA18967 for freebsd-questions-outgoing; Mon, 1 Feb 1999 17:32:09 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from saturn.spel.com (ip226-39-143.spel.com [208.226.39.143] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA18961 for ; Mon, 1 Feb 1999 17:32:05 -0800 (PST) (envelope-from mturpin@spel.com) Received: from spel.com (localhost [127.0.0.1]) by saturn.spel.com (8.9.2/8.9.2) with ESMTP id UAA11263 for ; Mon, 1 Feb 1999 20:28:12 -0500 (EST) (envelope-from mturpin@spel.com) Message-ID: <36B654AC.8489301D@spel.com> Date: Mon, 01 Feb 1999 20:28:12 -0500 From: Mark Turpin X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: questions@FreeBSD.ORG Subject: Serial programming Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, Ok, I feel really stupid having to ask this.. 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? Thanks Mark ----------------------------------------------------------------------------- Mark Turpin | Consulting - Training - Network Installation Systems Engineer | Main Street Technology Centre | http://www.MainStreetTech.com ----------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message