How to receive data from ports ?

I'd like to know how to receive data from the serial and the parallel ports under linux.
If anybody has a source code of a program doing just that (in C it would be perfect!), thanks for letting me know!

Thanks in advance
Who is Participating?
e4monschConnect With a Mentor Commented:
You can listen to the pty-ports. I think you can read them
like files: /dev/ptya1.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.