Is it possible to use a pseudoterminal to redirect PPPâÂÂs dataflow to an application?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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.
linux terminal devices ppp pty
add a comment |Â
up vote
0
down vote
favorite
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.
linux terminal devices ppp pty
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
linux terminal devices ppp pty
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.
linux terminal devices ppp pty
asked Mar 14 at 14:24
SC0
1
1
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02
add a comment |Â
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I've used pppd
to run traffic through SSH connections before, which should be similar to what you're attempting. I did that after having trouble with traditional SSH tunneling, where the creation/teardown of forwarded TCP connections bogged things down a lot. The ssh+pppd combination worked much better, so hopefully that means you wouldn't have much trouble with latency. I can't speak to the Xon/Xoff situation, though.
I included a line in a /etc/ppp/peers/<linkname>
file that looked something like this:
pty "/usr/bin/ssh -t -P -l username servername"
You'd obviously want to replace that ssh
command with your own tool for translating the serial link.
There are also people who have done the same sort of thing with socat
and nc
, so I'd expect this to be doable.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I've used pppd
to run traffic through SSH connections before, which should be similar to what you're attempting. I did that after having trouble with traditional SSH tunneling, where the creation/teardown of forwarded TCP connections bogged things down a lot. The ssh+pppd combination worked much better, so hopefully that means you wouldn't have much trouble with latency. I can't speak to the Xon/Xoff situation, though.
I included a line in a /etc/ppp/peers/<linkname>
file that looked something like this:
pty "/usr/bin/ssh -t -P -l username servername"
You'd obviously want to replace that ssh
command with your own tool for translating the serial link.
There are also people who have done the same sort of thing with socat
and nc
, so I'd expect this to be doable.
add a comment |Â
up vote
0
down vote
I've used pppd
to run traffic through SSH connections before, which should be similar to what you're attempting. I did that after having trouble with traditional SSH tunneling, where the creation/teardown of forwarded TCP connections bogged things down a lot. The ssh+pppd combination worked much better, so hopefully that means you wouldn't have much trouble with latency. I can't speak to the Xon/Xoff situation, though.
I included a line in a /etc/ppp/peers/<linkname>
file that looked something like this:
pty "/usr/bin/ssh -t -P -l username servername"
You'd obviously want to replace that ssh
command with your own tool for translating the serial link.
There are also people who have done the same sort of thing with socat
and nc
, so I'd expect this to be doable.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I've used pppd
to run traffic through SSH connections before, which should be similar to what you're attempting. I did that after having trouble with traditional SSH tunneling, where the creation/teardown of forwarded TCP connections bogged things down a lot. The ssh+pppd combination worked much better, so hopefully that means you wouldn't have much trouble with latency. I can't speak to the Xon/Xoff situation, though.
I included a line in a /etc/ppp/peers/<linkname>
file that looked something like this:
pty "/usr/bin/ssh -t -P -l username servername"
You'd obviously want to replace that ssh
command with your own tool for translating the serial link.
There are also people who have done the same sort of thing with socat
and nc
, so I'd expect this to be doable.
I've used pppd
to run traffic through SSH connections before, which should be similar to what you're attempting. I did that after having trouble with traditional SSH tunneling, where the creation/teardown of forwarded TCP connections bogged things down a lot. The ssh+pppd combination worked much better, so hopefully that means you wouldn't have much trouble with latency. I can't speak to the Xon/Xoff situation, though.
I included a line in a /etc/ppp/peers/<linkname>
file that looked something like this:
pty "/usr/bin/ssh -t -P -l username servername"
You'd obviously want to replace that ssh
command with your own tool for translating the serial link.
There are also people who have done the same sort of thing with socat
and nc
, so I'd expect this to be doable.
answered Mar 18 at 5:07
mulad
962
962
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430186%2fis-it-possible-to-use-a-pseudoterminal-to-redirect-ppp-s-dataflow-to-an-applicat%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
When you say device#2 has no OS, what does it have?
â Penn
Mar 14 at 17:55
device#2 is an ARM9 board. It's running an Embedded software developped in ANSI C. Almost no library available (not enough memory).
â SC0
Mar 16 at 8:02