Serial Data Not Able to Send

Discussions about using Windows guests in VirtualBox.
Post Reply
pia
Posts: 3
Joined: 26. Jul 2018, 05:16

Serial Data Not Able to Send

Post by pia »

I installed Ubuntu 16.04 as a host and installed Virtualbox 5.2.16. The guest OS is Windows XP. I plugged in the PCI card and use the serial cable.

The problem is I already attached the PCI to the guest OS. The guest OS (WinXP) already detected the PCI card and COM PORT (COM9 & COM10).

However, when I used putty and serialCOM to let the serial communicate, no data is appeared.

May I know why and how to let the serial can be communicated.

Appreciate your help!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Serial Data Not Able to Send

Post by mpack »

I don't believe that your description of the problem is correct. A VM cannot detect physical hardware, so XP cannot have seen your PCI serial card, nor does it have a COM9. The only time this could ever be true would be if you had enabled PCI passthrough using VBoxManage, but if you did that then you're on your own - and besides that would be a crazy way to connect a serial port. The PCI passthrough feature is intended for high bandwidth devices such as a graphics card transferring gigabits/second, not a 115kbps serial port. And in fact I doubt that anyone still uses the feature for anything - call it a forgotten experiment.

The correct way to configure a serial port is to let the host OS own it, and configure appropriate values in the VM settings serial section. The serial port will be present on the host as "\dev\ttysN" (where N is a 0-based port number that you'll have to determine somehow), or it could have some other name - I don't follow Linux and they keep changing things. Whatever the name is you need to put that in the "Path/address" field of the VM settings, after enabling the virtual serial port. You shouldn't need to change anything else in that panel. The virtual serial port will be visible in an XP guest as COM1, that is after you have told XP to look for new hardware (since the emulated serial port is a legacy COM1 which is not plug and pray).
pia
Posts: 3
Joined: 26. Jul 2018, 05:16

Re: Serial Data Not Able to Send

Post by pia »

Hi mpack,

Thanks for your reply. Yes I had enabled PCI passthrough using VBoxManage. The PCI card and COM PORT has been detected in guest OS (WinXP) in device manager.

The COM PORT has been automatically assigned to COM9 and COM10. But when I tried to send data between the serial port (COM9 & COM10) using putty and serialCOM command prompt, there is no data coming. I mean it doesn't run the bash script.

I tried to find the root cause, I noticed I have this error which is "vboxpci 0000:03:00.0: failed to attach to IOMMU, error -22".

Maybe this is the reason why I could not send the serial data. But I have searched the solution for IOMMU problem, there is no post that really helpful to solve my problem.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Serial Data Not Able to Send

Post by mpack »

pia wrote:But I have searched the solution for IOMMU problem, there is no post that really helpful to solve my problem.
And to be blunt: nor is one ever likely to appear. Nobody uses IOMMU that I know of, and even when a couple of people tried it, they wouldn't use it for something as mundane as a serial port.

I seem to be repeating my previous post, I hate doing that so I'll leave it there.
pia
Posts: 3
Joined: 26. Jul 2018, 05:16

Re: Serial Data Not Able to Send

Post by pia »

Having said that, I have no choice but to stop the experiment and conclude that it is not going to work.

Thank you for your time :)
jorgensen
Posts: 583
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

Re: Serial Data Not Able to Send

Post by jorgensen »

Maybe this could be of help - viewtopic.php?f=2&t=26860
Post Reply