Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
Using PTY as a proxy for remote serial port

I'm working on an IO expansion device.

Among other things, it exposes a bunch of serial ports, which I want to expose on my Linux host as /dev/ttySomethingN

I could write a TTY kernel module for that, but I'd like to keep it on userspace for now.

The solution I've found is to use a PTY as a proxy: The master side talks to my device and the slave talks to my applications, and I use TIOCPKT_IOCTL to know when the device needs to reconfigure its speed/bits/parity/stop bits.

It works pretty well! See my source

But there is one little issue: I cannot set the number of bits (CS5/CS6/CS7) or parity (PARENB) in a PTY:

Any ideas why this restriction is in place? And how to work around it?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!