EmbeddedRelated.com
Forums

Redirect LAN to serial port

Started by Steve Sousa March 31, 2004
Hello:

I would like to experiment on coding/debugging a tcp/ip stack for a
small micro. I would like to test the connection to the internet and
other stuff like dhcp,etc.
 So what is the problem? Well, if i had an external modem i could
simply connect to it, however i don't, and even if i did it would be
expensive because every time i got disconnected or timed out i would
have to dial again and that costs the same as several minutes of
connection.
 I have a permanent cable-modem connection, and would like to redirect
it to the serial port. I have searched google extensively but could
not find a  program that does this in windows xp. There are many that
create a virtual com port thru an ethernet connection, but that is not
what i need. I don't want to specify ip's and ports on the pc, i want
the tcp/ip stream on the serial port so i can decode the packets on my
app. Just like when you use a modem and connect with a terminal client
and after login-in you get "garbage", that's what i want comming out
of my serial port.

From my searches this can be done in unix using the pppd deamon, but i
don't have unix or linux installed. I hope that some freeware is
available somewhere to do this.

That is the best i can explain it. Please let me know what you use to
debug your apps, or any other more apropriate group to post this
question.

Thanks in advance.

Steve Sousa
Steve Sousa wrote:
> Hello: > > I would like to experiment on coding/debugging a tcp/ip stack for a > small micro. I would like to test the connection to the internet and > other stuff like dhcp,etc. > So what is the problem? Well, if i had an external modem i could > simply connect to it, however i don't, and even if i did it would be > expensive because every time i got disconnected or timed out i would > have to dial again and that costs the same as several minutes of > connection. > I have a permanent cable-modem connection, and would like to redirect > it to the serial port. I have searched google extensively but could > not find a program that does this in windows xp. There are many that > create a virtual com port thru an ethernet connection, but that is not > what i need. I don't want to specify ip's and ports on the pc, i want > the tcp/ip stream on the serial port so i can decode the packets on my > app. Just like when you use a modem and connect with a terminal client > and after login-in you get "garbage", that's what i want comming out > of my serial port. > > From my searches this can be done in unix using the pppd deamon, but i > don't have unix or linux installed. I hope that some freeware is > available somewhere to do this. > > That is the best i can explain it. Please let me know what you use to > debug your apps, or any other more apropriate group to post this > question. >
So you want to transfer IP traffic using a serial port? There are two standard ways to do it: SLIP and PPP. A normal Windows box does not suit to function with either: its serial line protocols are aimed to modem client use only. There are two ways out: a) install Linux (or FreeBSD or whatever Unix-like O/S) and the proper daemon; or b) get a serial IP server program for your Microsoft box: they are available, provided enough $$$. SLIP is easier to implement in the embedded system (aim your search engine to 'SLIP RFC'), but if the connection is anything more complicated than a couple of feet of RS-232 cable, my recommendation is PPP. Been there - done that (I selected Linux & SLIP for the first try). HTH Tauno Voipio tauno voipio @ iki fi
On Thu, 01 Apr 2004 20:24:37 GMT, Tauno Voipio wrote:

>So you want to transfer IP traffic using a serial port? > >There are two standard ways to do it: SLIP and PPP. A normal Windows >box does not suit to function with either: its serial line protocols >are aimed to modem client use only.
Not true. WinNT versions, including 2000, XP Pro, and 2003, support SLIP and PPP on direct COM port connections. Whether the consumer versions do I don't know. IIRC, Jeremy Bentham's book shows code for talking to Win2000 over a SLIP link (in the first edition, anyway - the 2nd Ed shows PPP).
>There are two ways out: a) install Linux (or FreeBSD or whatever >Unix-like O/S) and the proper daemon; or b) get a serial IP server >program for your Microsoft box: they are available, provided enough $$$.
Or c) use WinNT.
>SLIP is easier to implement in the embedded system >(aim your search engine to 'SLIP RFC'), but if the connection is >anything more complicated than a couple of feet of RS-232 cable, >my recommendation is PPP.
See Bentham for PIC implementations.
>Been there - done that (I selected Linux & SLIP for the first try).
Linux is fine for development, but I have to cater for customers who all use Windows. -- Max