# Serial comms between FreeBsd and Winxp



## alexe100 (Dec 29, 2008)

Hello everyone,
It is my first msg and the first time I am using FreeBsd.
I will need it to make serial communications with embedded hardware.

I usually used read hat and FreeBsd seems a little different?!

What are the steps to connect winxp hiperterminar or something to FreeBSD ? (Is there hyperterminal for freebsd).

In the future I want to use SLIP for communications. For now I need to be familiar with serial communications.

Thanks a lot

Alex


----------



## graudeejs (Dec 29, 2008)

dunno what serial comms really mean/are


have you tried using openssh?
configure and run sshd daemon on fbsd and use putty/winscp to connect to bsd box from win


----------



## alexe100 (Dec 29, 2008)

I have a laptop with winxp and a desktop with minial instalation of freebsd. I have a null cable connecting COM1 from desktop to COM4 on the laptop. Now I just want to send characters (using keyboards) from one side to the other. For now is just this.

Thank you

Alex
PS: begginner


----------



## alexe100 (Dec 29, 2008)

Please, no deamons...
I just need to simple aplications one at each side sending chars from on side to the other...

Alex


----------



## alexe100 (Dec 29, 2008)

Where is COM ports on FreeBsd? any command line app to send chars to windows xp?

Alex


----------



## graudeejs (Dec 29, 2008)

you know you can edit posts


----------



## alexe100 (Dec 29, 2008)

Sorry :-( I didnt found the edit icon for the messages... very sorry

Alex


----------



## SirDice (Dec 29, 2008)

cu -l /dev/cuad0 (man cu for more info)

cuad0 => COM1
cuad1 => COM2

You may also want to look into Minicom.


----------



## alexe100 (Dec 29, 2008)

For now I have not yet the internet to work in the freebsd computer... I have to turn on the device, may be so I cant get the minicom for now. Is there any embedded application to send chars to the other computer?

Thanks  a lot
Alex


----------



## SirDice (Dec 29, 2008)

Cu is part of the base OS, no need to install a package/port.


----------



## alexe100 (Dec 29, 2008)

Yes, I works already!

Many thanks

The next step is configuring SLIP. But for now I have to diggest this primitive but interesting step!

Alex


----------



## glum (Jan 7, 2009)

I have the same question  pls show me how to console to freeBSD box via serial port  Thankx..

Ps: I have the same topo  one winXp box and one freeBSD box. now I wanna login freeBSD box from WinXP box of couse via COM port in freeBSD box.


----------



## Djn (Jan 7, 2009)

If you open /etc/ttys in an editor, and then change "off" to "on" in the line that starts with ttyu0, you should be able to log in on the first serial port after restarting init with _kill -HUP 1_ (or rebooting). There is a relevant handbook page you can look at, as well. (Except that the "terminal" is probably at least as powerful as the FreeBSD PC in this case - but that doesn't really matter.)


----------



## glum (Jan 7, 2009)

Djn said:
			
		

> If you open /etc/ttys in an editor, and then change "off" to "on" in the line that starts with ttyu0, you should be able to log in on the first serial port after restarting init with _kill -HUP 1_ (or rebooting). There is a relevant handbook page you can look at, as well. (Except that the "terminal" is probably at least as powerful as the FreeBSD PC in this case - but that doesn't really matter.)



Djn  

In file /etc/ttys I couldnt find out the line with ttyu0


----------



## kamikaze (Jan 7, 2009)

I think putty also offers the possibility to connect to a serial device and offers a lot of comfortable GUI features (such as profiles). Though I am not certain, because cu has always sufficed for my needs. I also use FreeBSD to configure embedded hardware and program microcontrollers (both at work and as a student).


----------



## Djn (Jan 7, 2009)

glum said:
			
		

> Djn
> 
> In file /etc/ttys I couldnt find out the line with ttyu0



Ah, right - I can't remember if I pulled that from the handbook or my local file, but anyway: What's the first line you've got with "9600" in it?


----------

