* Serial-to-socket conversion
@ 2004-05-25 15:14 Joshua Lamorie
2004-05-25 16:26 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Lamorie @ 2004-05-25 15:14 UTC (permalink / raw)
To: linuxppc-embedded
Gidday there,
I want to remotely access a serial port, but I can't just open a shell
on the remote computer. What I would like to do is open minicom (or
kermit or pppd) point it to some device local to my computer which then
bridges through a socket to my funky remote serial port. I can't find
any references to similar code other than perhaps pty-redir. Sorry for
polluting this mailing list, but if you can point me towards something
more appropriate, I would appreciate it.
Thanks
Joshua
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serial-to-socket conversion
2004-05-25 15:14 Serial-to-socket conversion Joshua Lamorie
@ 2004-05-25 16:26 ` Wolfgang Denk
2004-05-25 16:48 ` Joshua Lamorie
2004-05-25 17:10 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Denk @ 2004-05-25 16:26 UTC (permalink / raw)
To: Joshua Lamorie; +Cc: linuxppc-embedded
In message <40B362BA.3080908@xiphos.ca> you wrote:
>
> I want to remotely access a serial port, but I can't just open a shell
> on the remote computer. What I would like to do is open minicom (or
> kermit or pppd) point it to some device local to my computer which then
> bridges through a socket to my funky remote serial port. I can't find
> any references to similar code other than perhaps pty-redir. Sorry for
> polluting this mailing list, but if you can point me towards something
> more appropriate, I would appreciate it.
We're running a modified version of netkit-rsh which allows to use
"rlogin <host> -l <portname>" to connect to a remote serial port; for
example, this config file might be used:
#
# tserver.conf
#
# This file should contain one line for each board.
#
# The first field is the name of the board.
# The next field is the device to which the board is attached.
# Next comes a comma-separated list of parameters in the form
# BAUDRATE,DATABITS,PARITY,STOPBITS,FLOWCONTROL.
#
# port device parameters
#
board1 /dev/ttyS0 19200,8,N,1
board2 /dev/ttyS1 57600,8,N,1,CRTSCTS
board3 /dev/ttyUSB0 9600,8,N,1
board4 /dev/ttyUSB1 115200,8,N,1
If you want I can send you the stuff; if ther eis more interest I can
put it on our FTP server.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
As far as the laws of mathematics refer to reality, they are not
certain; and as far as they are certain, they do not refer to
reality. -- Albert Einstein
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serial-to-socket conversion
2004-05-25 16:26 ` Wolfgang Denk
@ 2004-05-25 16:48 ` Joshua Lamorie
2004-05-25 17:10 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Joshua Lamorie @ 2004-05-25 16:48 UTC (permalink / raw)
To: linuxppc-embedded
Thank you for your suggestions.
Wolfgang Denk wrote:
>We're running a modified version of netkit-rsh which allows to use
>"rlogin <host> -l <portname>" to connect to a remote serial port; for
>example, this config file might be used:
>
>
VanBaren, Gerald (AGRE) wrote:
> At this point you should be able to telnet into your target computer, port 1234 (in the above example),
> from your remote computer:
> telnet 192.168.1.1 1234
> (filling in the proper IP address and port number). Anything you type should go out the serial port
> and anything that comes in the serial port should be sent to your telnet session.
However, my problem remains at the local end. I want to be able to
attach anything that would normally talk to a serial port to this
socket, without using an actual serial port because at the remote end I
have a 'funky serial port'. It's actually some logic talking SPI in a
way that allows bi-directional emulation of a serial port.
I really want to be able to aim minicom at /dev/ttySFAKESERIALPORT which
is really a bi-directional pipe to some socket program (possibly nc) and
then I'll take care of the rest. I want to do some file transfers
through this 'funky serial port', with error checking and I really don't
want to have to write my own.
Thanks again for your suggestions, and if I didn't have to make this
happen today, I'd probably try to write something lower level. My
current solution is to have two serial ports on the local computer.
Minicom talks out ttyUSB0 through a null modem to ttyUSB1.
serial_client.c listens on ttyUSB1 and has a socket open to the remote
computer. The remote computer does some funky shimmy sham and passes
every octet on to the embedded system. Ugly, but I think it will work
(at low speeds with no hardware flow control).
Joshua
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Serial-to-socket conversion
2004-05-25 16:26 ` Wolfgang Denk
2004-05-25 16:48 ` Joshua Lamorie
@ 2004-05-25 17:10 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2004-05-25 17:10 UTC (permalink / raw)
To: linuxppc-embedded
In message <20040525162646.A291FC109F@atlas.denx.de> I wrote:
>
...
> We're running a modified version of netkit-rsh which allows to use
> "rlogin <host> -l <portname>" to connect to a remote serial port; for
> example, this config file might be used:
...
> If you want I can send you the stuff; if ther eis more interest I can
> put it on our FTP server.
OK, OK, OK - please stop sending requests...
You can find our "terminal server" package at
ftp://ftp.denx.de/pub/tools/tserver-0.17-3.i386.rpm
ftp://ftp.denx.de/pub/tools/tserver-0.17-3.src.rpm
The first is a RPM for RH 9; the second is the Source RPM.
As mentioned before, this is an extension/add-on to netkit-rsh-0.17
which requires the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
Our extension itself is available under GPL.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"Data is a lot like humans: It is born. Matures. Gets married to
other data, divorced. Gets old. One thing that it doesn't do is die.
It has to be killed." - Arthur Miller
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Serial-to-socket conversion
@ 2004-05-25 16:16 VanBaren, Gerald (AGRE)
0 siblings, 0 replies; 5+ messages in thread
From: VanBaren, Gerald (AGRE) @ 2004-05-25 16:16 UTC (permalink / raw)
To: linuxppc-embedded
Traditionally this was known as a reverse telnet server.
I haven't tried it, but I think netcat will do the job for you. Run it on your target computer (the one with an ethernet and a serial port you want to connect to) using "-l -p <port>", netcat will listen on <port> for a connection. Then redirect netcat's stdin and stdout to your serial device:
nc -t -l -p 1234 < /dev/ttyS0 > /dev/ttyS0
At this point you should be able to telnet into your target computer, port 1234 (in the above example), from your remote computer:
telnet 192.168.1.1 1234
(filling in the proper IP address and port number). Anything you type should go out the serial port and anything that comes in the serial port should be sent to your telnet session.
Let us know if you get it working, its one of those "toolbox" things that you only need occasionally but, when you need it, you need it _bad_ and you need it _now_.
gvb
> -----Original Message-----
> From: owner-linuxppc-embedded@lists.linuxppc.org
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]On Behalf Of Joshua
> Lamorie
> Sent: Tuesday, May 25, 2004 11:14 AM
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: Serial-to-socket conversion
>
>
>
> Gidday there,
>
> I want to remotely access a serial port, but I can't just open a shell
> on the remote computer. What I would like to do is open minicom (or
> kermit or pppd) point it to some device local to my computer
> which then
> bridges through a socket to my funky remote serial port. I can't find
> any references to similar code other than perhaps pty-redir.
> Sorry for
> polluting this mailing list, but if you can point me towards something
> more appropriate, I would appreciate it.
>
> Thanks
>
> Joshua
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-05-25 17:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-25 15:14 Serial-to-socket conversion Joshua Lamorie
2004-05-25 16:26 ` Wolfgang Denk
2004-05-25 16:48 ` Joshua Lamorie
2004-05-25 17:10 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2004-05-25 16:16 VanBaren, Gerald (AGRE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).