Linux Forums - Linux Help,Advice & support

Linux in General => Linux Tutorials & How To's => Topic started by: Ricky on October 27, 2003, 04:06:00 PM

Title: How to connect Linux and windows with a serial cable
Post by: Ricky on October 27, 2003, 04:06:00 PM
This how to is aimed to get connected two pcs via serial cable running Linux and Windoz resp.

You need a "null modem cable" which is actually a serial cable. Now Connect both computer through this cable


1. Create small chat script under /etc/ppp named .So exact location will be /etc/ppp/ Now put the following in this file.(This script is required as we are connecting to windoz machine.)
Code: [Select]


2. Create a root owned file named /etc/ppp/options.ttyS0 (Here we are assuming that u have connected your cable to port ttyS0 (COM1 port). Now made the following entry in the file /etc/ppp/options.ttyS0
Code: [Select]
lock               #It creates a lock file
noauth             #As this is with only two computer so authentication is disabled
asyncmap      0
crtscts   #Enable hardware flow control
local   #Tells the computer that this is not modem
silent   #Try for connection untill it is not connected    # Ip addresses of server/client

115200             #Data transfer speed throught the null modem cable
connect 'chat -v -f /etc/ppp/'

The work on linux box is finished.

On Windoz machine
 As this forum is for Linux so I m giving only some indication that how to set connect via serial cable in Windows

 Prerequestic on windoz box:: In windows machine dialup networking should be already enabled.

1. We need a program called "Direct cable connection" in windoz. It can be found at Start>Programs>Accessories. If it is not there then install that from Control Panel>Add and Remove Programs.

2. Now start the program, it will give u a wizard, follow that and give access to "guest" computer and also tells that on which port you have connected ur cable (COM1 or COM2 port). When u finishes that wizard it will start connecting to linux box.

Now work is finished on windoz machine.

Last step:: Now you have to start pppd on Linux box. Start that by following.
Code: [Select]
pppd /dev/ttys0Or if you want see that wht is happening when u start connection then start pppd by following.
Code: [Select]
pppd /dev/ttys0 nodetach
Now Finished......
you can take now full advantage of your Network,whether its internet sharing, file sharing and so on.
To check your connection use ping command.
Title: unknown host: clients & tcsetattr: Invalid argument-err
Post by: richard on May 14, 2004, 03:02:31 PM

I tried to connect my Windows PC to my Linux RedHat 8.0 ppp server, but when I'm executing these scripts I get the following error:

"pppd: unknown host: clients"

When I uncomment the "server:clients"-line I get the following on the console and in /var/logs/messages:

May 14 18:48:07 GiantDisc pppd[1011]: pppd 2.4.1 started by root, uid 0
May 14 18:48:07 GiantDisc pppd[1011]: tcsetattr: Invalid argument
May 14 18:48:07 GiantDisc pppd[1011]: Exit.

I also tried to delete the lowercase "c" at the end of CLIENTSERVER in the chat script as I thought this might be a mistake but it didn't help.

Any help appreciated

Title: How to connect Linux and windows with a serial cable
Post by: Ricky on May 19, 2004, 06:55:31 AM
Plz.. correct try now.. We had a error of formatting , now reactified .. :)
Title: Re: How to connect Linux and windows with a serial cable
Post by: arvindsony on May 19, 2009, 11:49:31 AM
Title: How to connect Linux and windows with a serial cable
Post by: AaronSkido on September 20, 2017, 10:17:12 PM
Thanks for all the help, I managed to get it to work with Blender, and I'll try the CamBam route next.
Title: Re: How to connect Linux and windows with a serial cable
Post by: aktiwari4u on December 06, 2017, 08:13:17 AM
I will request all those who are able to resolve their issues by their own to pls post the details of your resolution steps so that others may get benefit for same problem resolution.