Go Down

Topic: Need some Linux help /dev/tts/1 <> /dev/pts/x Bidirectional Communication (Read 2844 times) previous topic - next topic


Dear Community,

at first i am sorry for my bad english ... it's not my motherlanguage... so excuse me...
hope i am understandable...

I have modded / hacked a WLan Router for accessing Arduino over Wlan. ( DD-WRT /D-Link DIR 300 B1)

Everything is working fine now.

1. I am able to access the Serialport via telnet shell....
2. and i am able to acess telnetshell via serialport.

For this to happen i use in Serialshell :
Code: [Select]

echo "Hello Telnetshell" > /dev/pts/0

(now text is appearing in telnetshell)

and in telnetshell:

Code: [Select]
echo "Hello Arduino" > /dev/tts/1
(now text is appearing in serialshell)


Ok, my question to you is:

how to connect that two different shells (telnet/serial) and their input and output to each other,
WHILE i am able to make Input and output by myself....

if i redirect /dev/tts/1 to /dev/pts/0 then i am not able to make any input to tts/1 any longer because it is muted in cause of redirection....

i am a linux noob... so maybe it is very easy.... i need redirection or copy in background/parallel....

Hope somebody is understanding what my problem is.... maybe you :)

I would be very happy if i got some hints...  

PS: I need shellscript, and i am not able to install secondary software at the router... so ser2net proxy isn't possible to install.

Thank you


Aaahm, ok....

i got one possible answer....

but its a little bit freaky....

Code: [Select]
cat /dev/tts/1 > /dev/pts/0
Works, input text appearing in telnetwindow...

Code: [Select]
cat /dev/pts/0 > /dev/tts/1
Works too... inputtext appears in Serial....

What i am wondering about....
Code: [Select]
cat /dev/pts/0 > /dev/tts/1
in Serialwindow doesn't work...
i have to use both shells to get it work...

Any Idea?

Maybe rights-issue because i try to capture one shell by another?

Working atempt grants echo by the shell itself... "Go out there chars and let the world look..."
not "hey there... i have to look what you write bastard ;)" mmmh....

Maybe there is a way to initialise the connection by one shell at all...

Greetings Chris

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131