# Serial Console



## Leander (Sep 15, 2012)

Hi,

I tried to set up the serial console according to the FreeBSD Handbook chapter 27.6. But I'm unfortunately not succeeding at all, since FreeBSD 9.0 RELEASE seems to be a little different from what's described in the Handbook ... this is what I got thus far:


```
echo '
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="9600"
console="comconsole,vidconsole"
' > [FILE]/boot/loader.conf[/FILE]
```


```
cat [FILE]/etc/ttys[/FILE]
[ ... ]
console none                            unknown off secure
#
ttyv0   "/usr/libexec/getty Pc"         xterm   on  secure
# Virtual terminals
ttyv1   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv2   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv3   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv4   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv5   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv6   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv7   "/usr/libexec/getty Pc"         xterm   off  secure
ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyu0   "/usr/libexec/getty std.9600"   vt100   on  secure
ttyu1   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu2   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu3   "/usr/libexec/getty std.9600"   dialup  off secure
# Dumb console
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
```



```
kill -HUP 1
```


```
echo '-Dh' > [FILE]/boot.config[/FILE]
chmod 0755 [FILE]/boot.config[/FILE]
```


After a reboot I see uart0 set up for console in boot loader and in dmesg:


```
BTX loader 1.00 BTX version is 1.02
Consoles internal video/keybord  serial port
[ ... ]
```


```
dmesg | grep -E "sio[0-9]|uart[0-9]"
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)
```

But I can't see anything on my remote terminal. I tried using ZTerm and CoolTerm on OSx which both work fine with pfSense and other Serial connections.

I also tried
	
	



```
hint.uart.0.flags="0x30"
```
 in /boot/loader.conf but it didn't work as well ;(

Any ideas what I'm missing?


----------



## adamk (Sep 15, 2012)

Though I don't know what your specific problem is, I can say that the exact directions in the handbook worked fine for me.  I have a serial console running (though my speed is 115200), and can bring it up via minicom or kermit on a linux box.

Adam


----------



## Leander (Sep 16, 2012)

Changing the speed to 115200 wasn't the solution 
Maybe you can share your setup with me?!


----------



## kpa (Sep 16, 2012)

All I had to change on 9.1-RC1 i386 was in /boot/loader.conf:


```
console="comconsole,vidconsole"
```

And enable the entry for /dev/ttyu0 in /etc/ttys.


----------



## wblock@ (Sep 16, 2012)

Leander said:
			
		

> Changing the speed to 115200 wasn't the solution
> Maybe you can share your setup with me?!



Are you using a null modem cable?


----------



## adamk (Sep 16, 2012)

My /boot/loader.conf:


```
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
```

My /boot.config:


```
-h
```

And the appropriate line in /etc/ttys:


```
ttyu0	"/usr/libexec/getty std.115200"	dialup	on secure
```


----------



## Leander (Sep 17, 2012)

wblock@ said:
			
		

> Are you using a null modem cable?



Sure. It is the same cable I use to connect to my pfSense and NetBSD without any issues ... it's just the FreeBSD configuration itself which seems to give me such issues.
Plus I'm not having sio0 ... instead it only shows uart0 - But as far as I understood is uart just the new sio?!


----------

