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 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";
};
 

balanga

Son of Beastie

Reaction score: 137
Messages: 3,059

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,402
Messages: 4,125

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,402
Messages: 4,125

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: 4

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.
 
Top