delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/02/10/22:50:26

X-Recipient: archive-cygwin AT delorie DOT 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 AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <52811835.20130211074302@mtu-net.ru>
To: Norman Shapiro <cygwin AT dad DOT org>, cygwin AT cygwin DOT com
Subject: Re: Accessing a printer port
In-Reply-To: <201302101548.r1AFmnYw039876@shell0.rawbw.com>
References: <201302101548 DOT r1AFmnYw039876 AT shell0 DOT rawbw DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT freemail DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019