适用于Mac OSX的串行端口仿真器

Qia*_*iao 6 macos serial-port emulation device-emulation

Mac OSX上是否有任何串口仿真器?我正在研究在Mac上控制串行设备(RS232)的程序.我曾经使用com0com验证我的程序用于串行设备,但是它仅限于Windows.

我读过这个帖子,但仍然徒劳无功.MultiCom不是我想要的.我需要一个创建/模拟虚拟串行设备的软件.

在此先感谢您的帮助.

小智 3

在 Mac 上模拟串行设备 (RS232) 对我有用的一种方法是插入 Arduino(它需要硬件,但可以模拟许多其他设备)。我用它来模拟更昂贵的传感器。这是Arduino 网站上的一个简单代码示例,稍加修改即可连续打印语句。

// 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);
}
Run Code Online (Sandbox Code Playgroud)