serial port FreeBSD, PfSense

Moderator: Andrey.Mazlin

Post Reply
EduardCH
Posts: 1
Joined: Sun Nov 22, 2020 9:11 am

serial port FreeBSD, PfSense

Post by EduardCH »

I'm trying to set up serial port as a local console on my PfSense setup on fitlet2. It looks like that it doesn't recognize local serial port. Is it possible to make it work? Serial works fine in POST and BIOS.

thomask
Posts: 1
Joined: Wed Dec 09, 2020 6:58 am

Re: serial port FreeBSD, PfSense

Post by thomask »

EduardCH wrote:
Sun Nov 22, 2020 9:32 am
I'm trying to set up serial port as a local console on my PfSense setup on fitlet2. It looks like that it doesn't recognize local serial port. Is it possible to make it work? Serial works fine in POST and BIOS.
Hi Eduard,

What pfSense installer did you use? Or is pfSense already installed?

I came across the same question while trying to get serial output working for Ubuntu 20.04. Since serial console always worked out of the box with pfSense I booted up the pfSense installer (pfSense-CE-memstick-serial-2.4.5-RELEASE-p1-amd64). And I didn't get it to work either but got it to mostly working with Ubuntu but with tweaking. With Fedora 33 it worked out of the box. As mentioned in a wiki entry from Compulab in Linux the serial port is ttyS6 not ttyS0 as it is usually.

My take of it is: Since it happens after the BIOS gives control over to the OS, it's an OS issue and Compulab can't do much. Open an issue with FreeBSD/pfSense would be your best option.

It's most likely an issue with OS support for "Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller" which handles the serial console.

I tried setting the serial console manually in the pfSense installer (press '3' in the installer menu) but it didn't help. What I tried:

Code: Select all

set boot_serial=YES
set comconsole_speed=115200
set comconsole_port="0x3f8"
set hw.uart.console="io:0x3f8,br:115200"
set console=comconsole
In theory you could also set which PCI device is used for the serial console but in my case the setting go rejected. It also got rejected in Linux but there you can force it... but not for pfSense/FreeBSD.

How to (unsuccessfully) set the serial console PCI device:

Code: Select all

set comconsole_pcidev="0:0:0x18:2"
Maybe some of the information above can be of help

/Thomas

jlduran
Posts: 3
Joined: Sat Jan 13, 2018 4:31 pm

Re: serial port FreeBSD, PfSense

Post by jlduran »

You could use the serial console on FreeBSD by setting in /boot/loader.conf:

Code: Select all

hw.uart.console="mm:0xfea10000,rs:2"
This will configure the memory-mapped serial console.

The base address is obtained by issuing:

Code: Select all

# pciconf -l -b pci0:24:2
uart2@pci0:0:24:2:	class=0x118000 rev=0x0b hdr=0x00 vendor=0x8086 device=0x5ac0 subvendor=0x8086 subdevice=0x7270
    bar   [10] = type Memory, range 64, base 0xfea10000, size 4096, enabled
    bar   [18] = type Memory, range 64, base 0, size 4096, enabled
From uart_subr.c:

Code: Select all

The specification is a list of attributes
separated by commas. Each attribute is a tag-value pair with the tag and
value separated by a colon. Supported tags are:

	bd = Busy Detect
	br = Baudrate
	ch = Channel
	db = Data bits
	dt = Device type
	io = I/O port address
	mm = Memory mapped I/O address
	pa = Parity
	rs = Register shift
	sb = Stopbits
	xo = Device clock (xtal oscillator)

The io and mm tags are mutually exclusive.

Post Reply

Return to “fitlet2 software”