PDA

View Full Version : Serial comms between FreeBsd and Winxp


alexe100
December 29th, 2008, 10:54
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
December 29th, 2008, 10:57
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
December 29th, 2008, 10:59
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
December 29th, 2008, 11:00
Please, no deamons...
I just need to simple aplications one at each side sending chars from on side to the other...

Alex

alexe100
December 29th, 2008, 11:01
Where is COM ports on FreeBsd? any command line app to send chars to windows xp?

Alex

graudeejs
December 29th, 2008, 11:02
you know you can edit posts

alexe100
December 29th, 2008, 11:04
Sorry :-( I didnt found the edit icon for the messages... very sorry

Alex

SirDice
December 29th, 2008, 11:06
cu -l /dev/cuad0 (man cu for more info)

cuad0 => COM1
cuad1 => COM2

You may also want to look into Minicom (http://www.freshports.org/comms/minicom/).

alexe100
December 29th, 2008, 11:11
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
December 29th, 2008, 11:14
Cu is part of the base OS, no need to install a package/port.

alexe100
December 29th, 2008, 11:14
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
January 7th, 2009, 04:54
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
January 7th, 2009, 05:26
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 (http://www.freebsd.org/doc/en/books/handbook/term.html) 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
January 7th, 2009, 07:28
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 (http://www.freebsd.org/doc/en/books/handbook/term.html) 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
January 7th, 2009, 07:46
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
January 7th, 2009, 20:49
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?