USB-to-Serial adapter; comconsole

gentoobob

Active Member

Reaction score: 7
Messages: 172

I've been following the handbook and forums post and I'm not getting any serial console output. Think I'm getting confused. I'm using a USB-to-Serial adapter for this and I have a null modem cable (Micro Connectors, model M02-233). I am using a Debian laptop on the other end with comms/minicom, serial is set to 9600 8N1 as well. Below are my configs. Any help greatly appreciated.

/boot/loader.conf
Code:
$ cat /boot/loader.conf
autoboot_delay="3"
console="comconsole,vidconsole"
boot_multicons="YES"
boot_serial="YES"
umodem_load="YES"
hw.usb.template=3
Code:
$ dmesg | grep uart

uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)
Code:
$ grep ttyu0 /etc/ttys
ttyU0    "/usr/libexec/getty 3wire"    vt100    onifconsole secure
device.hints
Code:
hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"
/etc/devd.conf
Code:
notify 100 {
    match "system"        "DEVFS";
    match "subsystem"    "CDEV";
    match "type"        "CREATE";
    match "cdev"        "ttyU[0-9]+";
    action "/sbin/init q";
};
 
Last edited by a moderator:

balanga

Son of Beastie

Reaction score: 150
Messages: 3,147

I've been following the handbook and forums post and I'm not getting any serial console output. Think I'm getting confused. I'm using a USB-to-Serial adapter for this and I have a null modem cable (Micro Connectors, model M02-233). I am using a Debian laptop on the other end with minicom, serial is set to 9600 8N1 as well.
I'm trying to figure out what you are doing... Are you trying to login from FreeBSD into a Debian system via a serial connection?
 
OP
OP
gentoobob

gentoobob

Active Member

Reaction score: 7
Messages: 172

I'm trying to figure out what you are doing... Are you trying to login from FreeBSD into a Debian system via a serial connection?
Sorry, no. I am trying to console in on the FreeBSD server from the Debian laptop. I want to be able to use the serial port as a console on the FreeBSD server.
 
OP
OP
gentoobob

gentoobob

Active Member

Reaction score: 7
Messages: 172

Solved. I had to change the line in the /etc/ttys to

Code:
ttyU0    "/usr/libexec/getty std.9600"    vt100    on  secure
 

Phishfry

Son of Beastie

Reaction score: 1,533
Messages: 4,452

Alternatively you could have included speed in your /boot/loader.conf commands
Code:
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
No /etc/ttys editing required.
Then set your Linux minicom to use 115200
 
OP
OP
gentoobob

gentoobob

Active Member

Reaction score: 7
Messages: 172

Thanks for the heads up. I saw that some place in the forum too. I will tell you that vidconsole under the console setting doesn't work. During boot you'll get a message that vidconsole does not exist. You only have efi, nullconsole, comconsole, and spinconsole.
 

Phishfry

Son of Beastie

Reaction score: 1,533
Messages: 4,452

Yes that is correct. For EFI the handbook needs updating.
console="comconsole,efi"
 

fwabi9

New Member


Messages: 4

I actually had to edit /etc/tty to add ttyU0. Note the uppercase 'U'. As the original file contains ttyu0.
 

laundryboy

New Member


Messages: 5

I've been following the handbook and forums post and I'm not getting any serial console output. Think I'm getting confused. I'm using a USB-to-Serial adapter for this and I have a null modem cable (Micro Connectors, model M02-233). I am using a Debian laptop on the other end with minicom, serial is set to 9600 8N1 as well. Below are my configs. Any help greatly appreciated.

/boot/loader.conf
Code:
$ cat /boot/loader.conf
autoboot_delay="3"
console="comconsole,vidconsole"
boot_multicons="YES"
boot_serial="YES"
umodem_load="YES"
hw.usb.template=3

$ dmesg | grep uart

uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)


$ grep ttyu0 /etc/ttys
ttyU0 "/usr/libexec/getty 3wire" vt100 onifconsole secure


device.hints
Code:
hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"
/etc/devd.conf
Code:
notify 100 {
    match "system"        "DEVFS";
    match "subsystem"    "CDEV";
    match "type"        "CREATE";
    match "cdev"        "ttyU[0-9]+";
    action "/sbin/init q";
};
Replying to this set up I have a similar situation... I have a question why should I have the umodem and template enabled on the boot.loader file... I thought that was only when you are trying to use a USB port on the destination machine as the serial port. On my destination FreeBSD machine I am trying to console in via the serial port.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,083
Messages: 31,692

I have a question why should I have the umodem
The umodem(4) is a driver the OP needs for his USB->Serial converter to work. Other USB->Serial cables may need uftdi(4). It depends on the chipset that's used.

On my destination FreeBSD machine I am trying to console in via the serial port.
The traditional, old school, DB9 variant computers used to have? Then you don't need anything, that one should be detected by uart(4).
 

laundryboy

New Member


Messages: 5

Thanks to everyone here I finally got the console cable working, to a point.

I have the same settings as the OP but am not using the umodem setting as I do have the old school DB9 pin serial port on the destination PC. There are two things that are peculiar for me.

1. When I console in I am only able to do so for root, this is merely a symptom of the main problem. For my user accounts I use ZSH as installed by the ports system, if I either try to login to a user account it just hangs, this also happens when I try to switch to zsh as root so I know its the shell and not anything else. Does anyone have any idea why this happens? I can use bash(also installed as a port) and that works fine. If I set up a user account with a built in shell or bash that also logs in fine.

2. My second issue is that I can only see the console output when Freebsd fully boots up and I am presented the login prompt. I am unable to see any of the boot up messages nor see the Freebsd Boot screen to choose options such as booting into single user mode. Any suggestions for this?
 
Top