I want to set PPP in order to use a pseudoterminal slave (/dev/pts/N) instead of a physical serial link, handle its data flow in an application (from /dev/ptmx) and redirect that flow … somewhere appropriate. After reading all the documentation I understand that this is doable, however, I’ve found no trace of someone that actually tried. So, can someone at ease with PTS confirm that I’m not missing something?
I could try myself, but it would involve quite a bit of software development to answer the question. I’m particularly wondering about dataflow issues (I’d use XOn/Xoff) or latency issues…
Long story ...
I’m on an embedded Linux (Call it device#1). This device has an application that communicates with a second device (Call it device#2) through a homemade protocol on serial link. At the moment, Device#1 use PPP and a modem connected to a second serial link for its communication.
The point is that device#2 also has a modem. So, I want to remove the modem from device#1 in order to reduce the cost of our solution and redirect PPP’s dataflow to the other device/modem.
My idea is to use a pseudoterminal pair, modify the application in order to read the flow from the PTM, encapsulate it in the homemade protocol and send it to device#2. Device#2 can be modified in order to handle this flow properly, that’s not the point.
- Device#2 has no Operating System (I can’t reasonably use socat between the two devices).
- tty0tty could be a solution, but I wish to avoid as far as possible the installation of a package,
- SSL/TCP has to be set up in device#1 (Linux) for security reason. This is mandatory.