# serial communication betweeen FreeBSD and Fedora 15



## swavijay (Mar 10, 2012)

Hi experts,

I would like to connect two Unix Flavored System through Serial port. Can some one shed some light on this please? On one machine I have a *F*reeBSD installed and the other machine I have installed Fedora 15. The FreeBSD is where I will be initiating the connection and Fedora will be accepting the connection. I have changed the run level on my Fedora so that it stops at command line. (i.e., set the run level to 3).

Both the machines have com ports (male) and I connect them back to back via serial cable (both end female connectors). Now from the FreeBSD machine, I initiate a connection but *I* don*'*t see the connection getting successful. I use the following command to initiate a serial connection on my *F*reeBSD machine.

[cmd=]cu -l ttyu0[/cmd] but unable to make any connection. I should see the command line of Fedora 15. I have disabled the firewall on my Fedora 15.

Any help is greatly appreciated.

Thanks
-Vijay


----------



## wblock@ (Mar 10, 2012)

Different versions of FreeBSD have different names for the serial port.  Also, this will probably require a null-modem serial cable.


----------



## swavijay (Mar 10, 2012)

I'm able to identify the serial port device name without any problem. The serial port device name here is: ttyu0. *S*o that's not a problem but I'm unable to get the connection up and running. *I*t says connected but I could not get the command line of the Linux Fedora Machine.

-Vijay


----------



## jalla (Mar 10, 2012)

Did you start getty() on the serial port at the receiving end?
In FreeBSD you'd do that in /etc/ttys, in Linux it's probably something different.


----------



## PseudoCylon (Mar 10, 2012)

swavijay said:
			
		

> I'm able to identify the Serial port Device Name w/o any problem.
> 
> The Serial port device name here is: ttyu0
> 
> so that's not a problem but I'm unable to get the connection up and running.


Yes, this is the problem. For 8.0 and up, you should use the device /dev/cuau_N_ (the second "u" might be uppercase, /dev/cuaU_N_). /dev/ttyu_N_ is for dial-in, /dev/cuau_N_ is for call-out.

And, as wblock@ said, you need a null-modem cable.


----------



## tingo (Mar 10, 2012)

PseudoCylon said:
			
		

> And, as wblock@ said, you need a null-modem cable.



And probably some stty(1) magic as well, unless your null modem cable has the modem control signals correctly configured. `# stty clocal ...` might be enough, or you might need more flags.


----------

