Pages: [1]   Go Down
Author Topic: Need some Linux help /dev/tts/1 <> /dev/pts/x Bidirectional Communication  (Read 2210 times)
0 Members and 1 Guest are viewing this topic.
Dresden / Germany
Offline Offline
Sr. Member
****
Karma: 3
Posts: 451
Entwicklungsklaus
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
echo "Hello Telnetshell" > /dev/pts/0
(now text is appearing in telnetshell)


and in telnetshell:

Code:
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 smiley

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
ChrisS
« Last Edit: June 09, 2011, 05:01:29 am by ChrisS » Logged

Sturmfabrik - mediale Dienstleistungen
www.sturmfabrik.de

Dresden / Germany
Offline Offline
Sr. Member
****
Karma: 3
Posts: 451
Entwicklungsklaus
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Aaahm, ok....

i got one possible answer....

but its a little bit freaky....

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

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

What i am wondering about....
Code:
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 smiley-wink" mmmh....

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

Greetings Chris
« Last Edit: June 09, 2011, 05:48:09 am by ChrisS » Logged

Sturmfabrik - mediale Dienstleistungen
www.sturmfabrik.de

Pages: [1]   Go Up
Jump to: