Computing.Net > Forums > Unix > script for reading directly from port

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

script for reading directly from port

Reply to Message Icon

Original Message
Name: Michael Glackin
Date: May 3, 1999 at 13:21:41 Pacific
Subject: script for reading directly from port
Comment:

I recently received some barcode scanners that plug directly into a serial port, such as tty/b01. I read that I can disable getty, make a node and open the tty as an input file, but I don't know how to identify the file/pointer/??? to open the file. Can anyone help with a simple C language program? thanks


Report Offensive Message For Removal


Response Number 1
Name: michael glackin
Date: July 15, 1999 at 10:27:26 Pacific
Reply: (edit)

I got this one from a consultant...when ready directly from a port for a barcode scanner/decoder, simply fopen the device name, such as ttyb16, but remember to fopen in the "rb" mode. "b" denotes binary. Use stty to set the speed and parameters of the port.


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 2 Days.
Discuss in The Lounge
Poll History




Data Recovery Software