/dev/ttyU0 (serial console) cannot get working

I have FreeBSD 14.1-RELEASE (host) and 15.0-CURRENT (guest) machines.

HW setup:
- Two USB => RS-232 cables connected in between with null-modem cable (3 cables in total).

On both machines I see the TTY: /dev/ttyU0 (please note the capital U).

On the guest.
In the default /dev/ttys there's only lower-cased version mentioned so I tweak that file with:

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

Not sure if connected, probably yes, but /var/log/messages shows tons of messages like:
Code:
getty[...]: open /dev/ttyu0: No such file or directory, sleeping 30 secs
(please, note the lower-case u)

On the host.
Now, I run cu -l /dev/cuaU0 -s 115200, it prints Connected but nothing happens since then.

Note. Cables should be fine, I hope, after playing with this for an hour and half I once get some login prompt from the guest (mentioning the hostname correctly) but it was not usable at all.
 
On FreeBSD the little U's are COM ports. The big U's are USB.

Example
/dev/cuau0 is serial port.
/dev/cuaU0 is USB port.

Same for tty ports.
/dev/ttyu0 is serial port
/dev/ttyU0 is USB port
 
On FreeBSD the little U's are COM ports. The big U's are USB.
Cool, thanks so much. First miracle resolved. But still.... It gets stuck even with 9600 baud:

Code:
jb@p1 ~> doas cu -l /dev/cuaU0 -s 9600
Connected


FreeBSD/amd64 (Amnesiac) (ttyU0)

login:
and server showed:
Code:
init[...]: getty repeating too quickly on port /dev/ttyU0, sleeping 30 secs
Crashing? Why?
 
Do you have both style cables to check? That's where I start when going equipment to equipment.
Null Modem and straight thru/crossover. Then start checking settings.

You are seeing a console but unable to type? You reverted your earlier setting right reboot needed?
 
I admire your security prose but you might want to mess with serial port using root them move to secure setting,
Maybe a permissions issue.
 
- Two USB => RS-232 cables
I totally missed that part.
So basically USB to USB. Same on both ends. Might require changes. to etc/ttys
Same deal is Null Modem Cable what is used between them?

There is a post on here to assist you with USB-USB. Many I bet.
 
My mentor covered it here:

More insight:

 
My mentor covered it here:

More insight:

Will check those, thanks!
 
My mentor covered it here:
...
Read most of those, only a partial luck so far. Guest's loader.conf shows:
Code:
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,efi"
I have partial success but it's not responsive:
Code:
# cu -s 115200 -l /dev/cuaU0
Connected

FreeBSD/amd64 (Amnesiac) (ttyU0)

login:

also
Code:
root@:~ # cat /etc/ttys | grep U0
ttyU0   "/usr/libexec/getty std.115200" vt100   on secure

Two USB/RS-232 converters are Serial Bridge Prolific Technology, Inc. which are wildly used in those previous threads. No idea, what else might be wrong...
 
try
"/usr/libexec/getty 3wire instead of std
Sometimes water can even flow uphill. Sometimes, miracles simply happen. After switching to 3wire and using 9600 baud, everything works perfectly. I had no idea that those two cables were 3wire. Now, it's time to study what 3wire actually is.

The only downside is, that I cannot get anything besides 9600 baud rate. But that's fine for my use case.

Splendid! Thank you, guys. This forum makes FreeBSD even better.
 
Back
Top