VMware Communities
RKMason
Contributor
Contributor
Jump to solution

How to Access a Host USB Virtual Serial Port from a VM Application?

I have a Linux VM running under VMware Player 5.0.2 on a Linux Host machine.   I have a development system running on the VM trying to download code to an external device connected via a Host USB virtual serial port (ttyACM0).   Anybody doing Arduino device programming is familar with my software/hardware config.  The VM dev system does not directly see the ttyACM0 port so it seems I need to establish some kind of bridge connection between the Host "ttyACM0" port and the VM-configured "ttySx" port?   Anybody done anything like this with a Player VM?    

0 Kudos
1 Solution

Accepted Solutions
RKMason
Contributor
Contributor
Jump to solution

FYI, I found the answer to my own question in an old post on a similar topic. Below is a response provided by user "Workingman" in the older post that was the solution to my problem.  I followed his general approach and edited my own *.vmx VM config file to change the defined serial port from "/dev/ttyS1" to "/dev/ttyACM0"  I can now download code to my device straight from the Arduino IDE running on the VM guest system.

*************************************************************************************************************************************************************************************

9. Re: USB Serial Adapter - /dev/ttyUSB0 not a serial device?

WorkingmanLurker

A bit of an old thread here but I wanted to say that I was able to do exactly this yesterday using VMware Server 2.

It was not straightforward but I was able to hack it in there.  I assume this trick would also work on VM WS but I haven't tested yet.

Here's the steps:

Start with your VM powered off.

Add a serial port to your VM through the normal interface. - I just let it use /dev/ttyS0.

Go to your virtual machine folder and edit the .vmx config file.

find the line:

serial0.fileName = "/dev/ttyS0"

change to:

serial0.fileName = "/dev/ttyUSB0"

and away you go.  The guest OS sees it as a real physical serial port and is happily outputting my system console via serial!

Hope that helps other folks.

************************************************************************************************************************************************************************************

View solution in original post

0 Kudos
2 Replies
RKMason
Contributor
Contributor
Jump to solution

FYI, I found the answer to my own question in an old post on a similar topic. Below is a response provided by user "Workingman" in the older post that was the solution to my problem.  I followed his general approach and edited my own *.vmx VM config file to change the defined serial port from "/dev/ttyS1" to "/dev/ttyACM0"  I can now download code to my device straight from the Arduino IDE running on the VM guest system.

*************************************************************************************************************************************************************************************

9. Re: USB Serial Adapter - /dev/ttyUSB0 not a serial device?

WorkingmanLurker

A bit of an old thread here but I wanted to say that I was able to do exactly this yesterday using VMware Server 2.

It was not straightforward but I was able to hack it in there.  I assume this trick would also work on VM WS but I haven't tested yet.

Here's the steps:

Start with your VM powered off.

Add a serial port to your VM through the normal interface. - I just let it use /dev/ttyS0.

Go to your virtual machine folder and edit the .vmx config file.

find the line:

serial0.fileName = "/dev/ttyS0"

change to:

serial0.fileName = "/dev/ttyUSB0"

and away you go.  The guest OS sees it as a real physical serial port and is happily outputting my system console via serial!

Hope that helps other folks.

************************************************************************************************************************************************************************************

0 Kudos
MRojo
Contributor
Contributor
Jump to solution

Someone can tell me the procedure to conect the ARDUINO UNO to a virtual machine under Windows 7?

I am using ESXi 4.1.0

If I am asking this here is because the previuous peroced¡ure described doesn't work.

I have trid to add a USB port, a COM port, etc with negative results

Regards

0 Kudos