The way I emulated a serial device (RS232) on a Mac that worked for me was an Arduino connection (it requires yes hardware, but it can emulate many other devices). I use it to emulate more expensive sensors. This is a simple example of code from the Arduino website , slightly modified for continuous report output.
void setup() {
Serial.begin(9600);
while (!Serial) {
;
}
}
void loop() {
Serial.println("Hello world !");
delay(10);
}
source
share