X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.6 required=5.0	tests=AWL,BAYES_20,FREEMAIL_FROM,KAM_THEBAT,KHOP_THREADED,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Date: Mon, 11 Feb 2013 07:43:02 +0400
From: Andrey Repin <anrdaemon@freemail.ru>
Reply-To: Andrey Repin <cygwin@cygwin.com>
Message-ID: <52811835.20130211074302@mtu-net.ru>
To: Norman Shapiro <cygwin@dad.org>, cygwin@cygwin.com
Subject: Re: Accessing a printer port
In-Reply-To: <201302101548.r1AFmnYw039876@shell0.rawbw.com>
References: <201302101548.r1AFmnYw039876@shell0.rawbw.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Greetings, Norman Shapiro!

> Here is my problem. There is an old laptop running Windows XP. It has a
> female "printer port", which I understand is also known as a "parallel
> port".

Yup.

> There is a male 25 pin to female 9 pin adapter that fits the female port.

Nop. This is likely a SERIAL (Also known as "COM") PORT 9<->25 pin adapter.

> The 9 pin end will eventually be connected to a serial device.

You can't connect serial devices to a printer port. Unless you want to damage
either, or both of them.

> I want to send characters to the serial device, from a C program.

> Can I just open("/cygdrive/c/prn", ...)?

First off, why you're trying to open "prn" file from C: drive?

> Can I use tcsetattr on the resulting file descriptor?


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 11.02.2013, <07:40>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

