因项目需要,经常需要调试手机AT信令,觉得老是要插手机觉得很不方便,我自己还要用那:) 。于是便想到写一个手机串口的模拟器。
思路很简单。模拟串口通信,要么找两台机器用一根串口线连接,要么把机器自己的两个串口对接,要么用软件模拟器。
软件模拟器的原理也相当于两个串口对接:例如COM4和COM5,我往COM4发数据。COM5就能自动接收。
下面是具体的步骤:
1 安装免费的模拟软件com0com-1.4.0.0-386-chk.zip。以下是自带的说明文档
1. Start the "Add/Remove Hardware" wizard in Control Panel.
2. Click "Add/Troubleshoot a Device".
3. Select "Add a new device" and then click Next.
4. Select "No, I Want to Select the Hardware from a list".
5. For the first time (if the driver is not installed yet):
1. Select "Other Devices" and then click Next.
2. Click "Have Disk".
3. Enter path to the directory with com0com.inf and com0com.sys
files and then click OK.
For the next time (adding one more port pair) select
"com0com - serial port emulators