虚拟串口 com0com

  • AgeeLo
    了解作者
  • C/C++
    开发工具
  • 213.7KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2022-05-26 13:54
    上传日期
源代码:com0com 虚拟串口。 http://sourceforge.net/projects/com0com/
com0com-3.0.0.0.zip
  • com0com-3.0.0.0
  • include
  • cncext.h
    2.3KB
  • com0com.h
    3KB
  • setupc
  • setup.cpp
    1.5KB
  • sources
    532B
  • .cvsignore
    23B
  • makefile
    36B
  • setup
  • utils.h
    3KB
  • portnum.h
    1.2KB
  • inffile.h
    2.6KB
  • setup.rc
    2KB
  • setup.cpp
    63.9KB
  • comdb.cpp
    13KB
  • inffile.cpp
    19.3KB
  • devutils.cpp
    29KB
  • params.h
    3.8KB
  • portnum.cpp
    2.2KB
  • setup.bat
    57B
  • devutils.h
    5.4KB
  • msg.h
    2KB
  • setup.def
    49B
  • sources
    711B
  • msg.cpp
    9.6KB
  • utils.cpp
    6.2KB
  • comdb.h
    1.8KB
  • params.cpp
    26.9KB
  • .cvsignore
    23B
  • makefile
    36B
  • precomp.h
    1.2KB
  • sys
  • fileinfo.c
    4.5KB
  • wmi.c
    12.9KB
  • trace.c
    51.9KB
  • version.h
    1.2KB
  • pnp.c
    14.4KB
  • initunlo.c
    4KB
  • tracetbl.c
    15.3KB
  • rand.h
    1KB
  • startirp.c
    12.8KB
  • bufutils.c
    25.7KB
  • rand.c
    282B
  • handflow.h
    2KB
  • showport.h
    1.4KB
  • commprop.h
    1.1KB
  • timeout.c
    11.5KB
  • bufutils.h
    3.7KB
  • power.c
    3.1KB
  • strutils.h
    2.5KB
  • adddev.c
    28.2KB
  • timeout.h
    2.2KB
  • commprop.c
    3.5KB
  • halt.h
    2KB
  • syslog.h
    1.3KB
  • delay.h
    2.3KB
  • com0com.h
    17.7KB
  • ioctl.c
    35.5KB
  • wait.c
    4.1KB
  • pinouts.c
    5.7KB
  • trace.h
    5.1KB
  • openclos.c
    10.8KB
  • sources
    749B
  • read.c
    3.3KB
  • io.c
    50KB
  • noise.h
    1.4KB
  • write.c
    4.5KB
  • com0com.rc
    2.4KB
  • showport.c
    9.1KB
  • handflow.c
    14.1KB
  • strutils.c
    7.2KB
  • .cvsignore
    65B
  • makefile
    36B
  • precomp.h
    2.8KB
  • delay.c
    7.3KB
  • syslog.c
    2.7KB
  • noise.c
    4.3KB
  • c0clog.mc
    812B
  • NSIS
  • install.nsi
    18.6KB
  • setupg
  • Form1.resx
    69.7KB
  • portprms.h
    2.2KB
  • pinmap.h
    1.9KB
  • setup.cpp
    1.4KB
  • app.rc
    1.3KB
  • stdafx.h
    242B
  • setup.vcproj
    6.1KB
  • exec.h
    1.1KB
  • exec.cpp
    2.6KB
  • pinmap.cpp
    14.8KB
  • Form1.h
    42KB
  • resource.h
    91B
  • portprms.cpp
    4KB
  • com0com.ico
    1.1KB
  • AssemblyInfo.cpp
    1.3KB
  • stdafx.cpp
    205B
  • .cvsignore
    45B
  • requireAdministrator.manifest
    502B
内容介绍
============================= Null-modem emulator (com0com) ============================= INTRODUCTION ============ The Null-modem emulator is an open source kernel-mode virtual serial port driver for Windows, available freely under GPL license. You can create an unlimited number of virtual COM port pairs and use any pair to connect one application to another. Each COM port pair provides two COM ports with default names starting at CNCA0 and CNCB0. The output to one port is the input from other port and vice versa. Usually one port of the pair is used by Windows application that requires a COM port to communicate with a device and other port is used by device emulation program. For example, to send/receive faxes over IP you can connect Windows Fax application to CNCA0 port and t38modem (http://t38modem.sourceforge.net/) to CNCB0 port. In this case the t38modem is a fax modem emulation program. In conjunction with the hub4com the com0com allows you to - handle data and signals from a single real serial device by a number of different applications. For example, several applications can share data from one GPS device; - use real serial ports of remote computer like if they exist on the local computer (supports RFC 2217). The homepage for com0com project is http://com0com.sourceforge.net/. INSTALLING ========== NOTE (x64-based Windows Vista/Windows Server 2008/Windows 7/8): The com0com.sys is a test-signed kernel-mode driver that will not load by default. To enable test signing, enter command: bcdedit.exe -set TESTSIGNING ON and reboot the computer. NOTE: Enabling test signing will impair computer security. Simply run the installer (setup.exe). An installation wizard will guide you through the required steps. If the Found New Hardware Wizard will pop up then - select "No, not this time" and click Next; - select "Install the software automatically (Recommended)" and click Next. The one COM port pair with names CNCA0 and CNCB0 will be available on your system after the installation. You can add more pairs with the Setup Command Prompt: 1. Launch the Setup Command Prompt shortcut. 2. Enter the install command, for example: command> install - - The system will create 3 new virtual devices. One of the devices has name "com0com - bus for serial port pair emulator" and other two of them have name "com0com - serial port emulator" and located on CNCAn and CNCBn ports. To get more info enter the help command, for example: command> help Alternatively to setup ports you can invoke GUI-based setup utility by launching Setup shortcut (Microsoft .NET Framework 2.0 is required). TESTING ======= 1. Start the HyperTerminal on CNCA0 port. 2. Start the HyperTerminal on CNCB0 port. 3. The output to CNCA0 port should be the input from CNCB0 port and vice versa. UNINSTALLING ============ Simply launch the com0com's Uninstall shortcut in the Start Menu or remove the "Null-modem emulator (com0com)" entry from the "Add/Remove Programs" section in the Control Panel. An uninstallation wizard will guide you through the required steps. HINT: To uninstall the old version of com0com (distributed w/o installer) install the new one and then uninstall it. FAQs & HOWTOs ============= Q. Is it possible to run com0com on Windows 9x platform? A. No, it is not possible. You need Windows 2000 platform or newer. Q. Is it possible to install or uninstall com0com silently (with no user intervention and no user interface)? A. Yes, it's possible with /S option, for example: setup.exe /S "%ProgramFiles%\com0com\uninstall.exe" /S You can specify the installation directory with /D option, for example: setup.exe /S /D=C:\Program Files\com0com NOTE: Silent installation of com0com will not install any port pairs by default {it can be overriden by setting CNC_INSTALL_CNCA0_CNCB0_PORTS and/or CNC_INSTALL_COMX_COMX_PORTS environment variables). Q. What are the other setup.exe command line options? A. The command line options of setup.exe and uninstall.exe listed in NSIS Users Manual, section 3.2 Installer Usage: http://nsis.sourceforge.net/Docs/Chapter3.html#3.2 Additionally the following environment variables can be used. To change behaviour of setup.exe: CNC_INSTALL_START_MENU_SHORTCUTS={YES|NO} - select/unselect "Start Menu Shortcuts" CNC_INSTALL_CNCA0_CNCB0_PORTS={YES|NO} - select/unselect "CNCA0 <-> CNCB0" CNC_INSTALL_COMX_COMX_PORTS={YES|NO} - select/unselect "COM# <-> COM#" CNC_INSTALL_SKIP_SETUP_PREINSTALL={YES|NO} - skip preinstalling/updating driver To change behaviour of uninstall.exe: CNC_UNINSTALL_SKIP_SETUP_UNINSTALL={YES|NO} - skip uninstalling devices and driver Q. Is it possible to change the names CNCA0 and CNCB0 to COM8 and COM9? A. Yes, it's possible. To change the names: 1. Launch the Setup Command Prompt shortcut. 2. Enter the change commands, for example: command> change CNCA0 PortName=COM8 command> change CNCB0 PortName=COM9 Alternatively you can set names to 'COM#', for example: command> change CNCA0 PortName=COM# command> change CNCB0 PortName=COM# If parameter 'PortName=COM#' is used then the Ports class installer will be invoked to set the real port name. The Ports class installer selects the COM port number and sets the real port name to COM<n>, where <n> is the selected port number. After installing the Ports class port you can use the list command to get the real port name and the parameter RealPortName=COM<n> to change the real port name, for example: command> list CNCA0 PortName=COM#,RealPortName=COM3 CNCB0 PortName=COM#,RealPortName=COM4 command> change CNCA0 RealPortName=COM8 command> change CNCB0 RealPortName=COM9 command> list CNCA0 PortName=COM#,RealPortName=COM8 CNCB0 PortName=COM#,RealPortName=COM9 Q. The baud rate setting does not seem to make a difference: data is always transferred at the same speed. How to enable the baud rate emulation? A. To enable baud rate emulation for transferring data from CNCA0 to CNCB0: 1. Launch the Setup Command Prompt shortcut. 2. Enter the change command, for example: command> change CNCA0 EmuBR=yes Q. The HyperTerminal test succeeds, but I get a failure when trying to open the port with CreateFile("CNCA0", ...). GetLastError() returns ERROR_FILE_NOT_FOUND. A. You must prefix the port name with the special characters "\\.\". Try to open the port with CreateFile("\\\\.\\CNCA0", ...). Q. My application hangs during its startup when it sends anything to one paired COM port. The only way to unhang it is to start HyperTerminal, which is connected to the other paired COM port. I didn't have this problem with physical serial ports. A. Your application can hang because receive buffer overrun is disabled by default. You can fix the problem by enabling receive buffer overrun for the receiving port. Also, to prevent some flow control issues you need to enable baud rate emulation for the sending port. So, if your application use port CNCA0 and other paired port is CNCB0, then: 1. Launch the Setup Command Prompt shortcut. 2. Enter the change commands, for example: command> change CNCB0 EmuOverrun=yes command> change CNCA0 EmuBR=yes Q. When the corresponding port of a pair is not open, some characters will remain in the ouput buffer of the sending port and be output upon the next connection. Any clue on a possible workaround? A. It's a correct behavior if receive buffer overrun is disabled (by default).
评论
    相关推荐
    • 串口通信.zip
      串口通信程序,刚学习的适合看一看,这也是我在学习时编写的。
    • 串行通讯-例子.zip
      RJ485 通信3 专题-串行通讯PPT等Labview串行通讯专题讲座介绍
    • 串口通讯.zip
      通过 VC 编写的一个串口通讯例子代码。
    • 串口通讯.rar
      labview串口通讯,读取串口数据,显示数据
    • 串口通讯.rar
      串口通讯labview中实现串口设备的读写通信操作
    • MFC串口通信
      MFC串口通信程序代码,含界面 // 串口通信.cpp : 定义应用程序的类行为。 // #include "stdafx.h" #include "串口通信.h" #include "串口通信Dlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // C串口通信...
    • 串口编程大全串行通信程序
      串口编程 串口开发 串行通信程序 学习不同操作系统和硬件平台之间轻松移植程序
    • 串口通信编程大全》
      17. 串行通信波特率的一种自动检测方法…………………………………53 18. RS-232、RS-422 与RS-485 标准及应用………………………………56 19. 串口泵…………………………………………………………………64
    • CX1000串口通讯.zip
      使用CX1000作为串口的的发送端,发送PLC相关数据到接收端
    • 串行通信教程.rar
      欧姆龙PPLC串行通信教程,很详细的说明教程