Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to write a python program to create a simulated data stream and feed it, through a named pipe, to a VMware virtual machine. The host is running Ubuntu 11.10 and VMware player 5.0.0. The Vm is running Ubuntu netbook 10.04. I am able to get the pipe working on the local machine but I am not able to get the pipe to pass data through the virtual serial port to the programs running on the virtual machine.

  import os
  # Create a named pipe that will be used as the serial port on a VMware virtual machine
  SerialPipe = '/tmp/gpsd2NMEA'
  # Open the named pipe
  NMEApipe =, os.O_RDWR|os.O_NONBLOCK)
  # Write a string to the named pipe
  NMEAtime = "235959"
  os.write(NMEApipe, str( '%s\n' % NMEAtime ))
  • Test to see if the python program is working on the host machine (displays 235959 if data is passing through the pipe)

$ cat /tmp/gpsd2NMEA

  • Serial port as defined in the VMware .vmx file:

serial0.present = "TRUE"
serial0.startConnected = "TRUE"
serial0.fileType = "pipe"
serial0.fileName = "/tmp/gpsd2NMEA"
serial0.pipe.endPoint = "client"
serial0.autodetect = "FALSE"
serial0.tryNoRxLoss = "TRUE"
serial0.yieldOnMsrRead = "TRUE"

  • Test to see if the serial port in the VM is receiving data

$ cat /dev/ttyS0
$ minicom -D /dev/ttyS0
$ stty -F /dev/ttyS0 cs8 -parenb -cstopb 115200
$ echo < /dev/ttyS0

  • None of these display any data from the python program.
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.