Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Terra-Karma: 0% X-Terra-Hash: 5f0028b43c146c0b4de5e05ac293563c Received-SPF: pass (enugu.terra.com.br: domain of terra.com.br designates 200.176.10.9 as permitted sender) client-ip=200.176.10.9; envelope-from=pppd AT terra DOT com DOT br; helo=terra.com.br; Date: Tue, 1 Nov 2005 10:45:12 -0300 Message-Id: Subject: Question / Fiscal Printer device. MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 From: "Douglas Schilling Landgraf" To: "cygwin" X-XaM3-API-Version: 4.1 (B108) X-SenderIP: 200.248.254.100 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jA1DjP3m007595 Hi guys, I have a question, I have a *fiscal* printer connected to a parallel port. On Linux I can print just doing: echo "Hello World" > /dev/lp0 On Cygwin I can't, I need to redirect to /dev/lpt1 ( Windows Parallel Port ) Is it normal ? Anyway, I have made a program to print and authenticate, on Linux I can print and authenticate documents without problem. On Cygwin, when I try to authenticate documents with same program it blocks until I remove the document. On Linux it works fine and It should print anyway. Could you help me ? #include #include #include #include #include #include #include #define BASEPORT 0x378 #define BASEPORT_STATUS 0x378 + 1 int main( void ) { unsigned char n=0; int fd, st; // Open Device fd = open( "/dev/lpt1", O_RDWR | O_NONBLOCK ); // String to authenticate write( fd, "\x1B\x7D\x01", 3 ); write( fd, "Teste\n", 6 ); // Status ioperm( BASEPORT, 3, 1 ); n = inb( BASEPORT_STATUS ); ioperm( BASEPORT, 3, 0 ); usleep(500); // wait hardware // print status printf("0x%x\n", n ); // New line write( fd, "\x0a", 1); write( fd, "\x0a", 1); // Authenticate printf("Put document:\n"); usleep(500); getchar(); // Wait keyboard write( fd, "Authenticate", 13 ); // Status ioperm( BASEPORT, 3, 1 ); n = inb( BASEPORT_STATUS); ioperm( BASEPORT, 3, 0 ); usleep(500); // Wait hardware printf("0x%x\n", n ); close( fd ); return 0; } Best Regards, Douglas Schilling Landgraf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/