Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serial Port Emulator for Mac OSX [closed]

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.

like image 622
Qiao Avatar asked Nov 12 '14 17:11

Qiao


1 Answers

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);
}
like image 59
doizuc Avatar answered Sep 24 '22 01:09

doizuc