6

Are there any serial port emulator on Mac OSX? I'm working on a program controlling serial device (RS232) on Mac. I used to verify my program with com0com for serial device, but which is windows-only.

I have read this thread, but still in vain. MultiCom is not what I'm looking for. I need a software which creates/emulates virtual serial devices.

Thanks in advance for any help.

Community
  • 1
  • 1
Qiao
  • 452
  • 5
  • 15
  • This may or may not help you, but you can buy a PL2303 based USB-to-DB9 converter on Amazon for pretty cheap, e.g. [this one](http://www.amazon.com/Sabrent-RS-232-Adapter-Prolific-SBT-USC1K/dp/B00065H0QQ). It will work out of the box without drivers, and then you'll have an actual serial port, and it might be less effort than hunting down software to emulate one. – Ivan X Nov 12 '14 at 23:43
  • Thank you. I've thought about it. Having 2 external physical devices sometimes bothers me. However, it will be the least choice. – Qiao Nov 13 '14 at 06:53

1 Answers1

3

A way to emulate a serial device (RS232) on Mac that worked for me was by plugging an Arduino (it requires hardware yes, but can emulate many other devices). I use it to emulate more expensive sensors. This is a simple example of code from Arduino website slightly modified to print a statement continuously.

// the setup routine runs once
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  // Wait for serial port to connect (Needed for native USB port only)
  while (!Serial) {
    ;
  }
}

// the loop routine runs over and over again forever:
void loop() {
  // Print a statement through Serial
  Serial.println("Hello world !");
  // Some delay
  delay(10);
}
doizuc
  • 408
  • 5
  • 11