#17866 closed defect (invalid)
Serial Port/UART cannot be used
Reported by: | GhostGambler | Owned by: | |
---|---|---|---|
Component: | uart | Version: | VirtualBox 5.2.14 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Mac OS X |
Description
I want to use the UART functionality to communicate with the VM (in this example Linux) from macOS.
As configuration I used --uart2 0x2f8 3
and --uartmode2 file /tmp/serial_port2
.
The Linux guest says everything is fine:
$ dmesg | grep tty [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-23-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-23-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 [ 0.004000] console [tty1] enabled [ 0.004000] console [ttyS0] enabled [ 1.535605] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.721594] 00:03: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
The file /tmp/serial_port2
is created on the macOS file system, but when I want to access it with cat or screen, nothing happens. The commands just exit immediately:
$ screen /tmp/serial_port2 115200 [screen is terminating] $ cat serial_port2 $
If I run the command as root, screen starts and shows the message
Cannot exec 'serial_port2': No such file or directory
If I instead use --uartmode2 tcpserver 8081
, I can use nc 127.0.0.1 8081
and I receive data from the VM as expected.
I also created another VM with uartmode=client, but they also cannot communicate with each other.
Is this function not working, or am I doing something wrong?
Attachments (1)
Change History (7)
by , 7 years ago
Attachment: | vagranttest_default_1531468884254_74191-2018-07-13-10-11-11.log added |
---|
comment:1 by , 7 years ago
What do you expect to happen? file
means output is written to an ordinary file. Have you read the manual?
follow-up: 5 comment:2 by , 7 years ago
You can also check #11011 for one way this can be done with screen.
comment:3 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
follow-up: 6 comment:4 by , 7 years ago
Oh, sorry, I did not mean file
but server
. I copied the wrong part of the configuration. (File works too.)
Btw. I just realized, that nc -U /tmp/serial_port2
works. But I still don't understand, why screen and cat do not work?
comment:5 by , 7 years ago
comment:6 by , 7 years ago
Replying to GhostGambler:
Oh, sorry, I did not mean
file
butserver
. I copied the wrong part of the configuration. (File works too.)Btw. I just realized, that
nc -U /tmp/serial_port2
works. But I still don't understand, why screen and cat do not work?
screen doesn't support that kind of usage. Check "Window Types" section of the screen man page.
machine log