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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

script for reading directly from port

Reply to Message Icon

Name: Michael Glackin
Date: May 3, 1999 at 13:21:41 Pacific
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



Sponsored Link
Ads by Google

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

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.


0
Reply to Message Icon

Related Posts

See More







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


Sponsored links

Ads by Google


Results for: script for reading directly from port

Script to Read a .CSV file www.computing.net/answers/unix/script-to-read-a-csv-file-/7784.html

Equivalent perl script for sed www.computing.net/answers/unix/equivalent-perl-script-for-sed/5939.html

script for register read writes www.computing.net/answers/unix/script-for-register-read-writes/7483.html