Skip to content

Instantly share code, notes, and snippets.

@bad1dea
Forked from DraTeots/ComPort over Network.md
Created October 1, 2018 02:35
Show Gist options
  • Select an option

  • Save bad1dea/9b7b3772cfc696c855bbfd6ff6162fcd to your computer and use it in GitHub Desktop.

Select an option

Save bad1dea/9b7b3772cfc696c855bbfd6ff6162fcd to your computer and use it in GitHub Desktop.

Revisions

  1. Dmitry Romanov renamed this gist Jun 22, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.md → ComPort over Network.md
    Original file line number Diff line number Diff line change
    @@ -47,12 +47,14 @@ There are absolutely brilliant free opensoure solution that can be used for comp

    http://sourceforge.net/projects/com0com

    There is a version with signed drivers available from GitHub here:
    https://github.com/Raggles/com0com/releases

    <br>
    ##### Server

    For the server you need only hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)
    [Source forge hub4com download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)


    <br>
  2. Dmitry Romanov revised this gist Jun 17, 2016. 1 changed file with 2 additions and 19 deletions.
    21 changes: 2 additions & 19 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -108,26 +108,9 @@ com2tcp-rfc2217 \\.\CNCB0 192.168.123.30 7000

    <br>
    #### Driver Signature
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off. The error during installation of com0com looks then like this:
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off.


    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)

    There are two ways around it: A) bypass/disable driver signature verification, and/or B) sign the com0com driver (c) bugreport.


    As a lazy person I prefer to TEMPORARILY disable driver signature verification. There are several ways to do it, and as a lazy person I prefer just to [follow this article](http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/):


    The idea is to reboot with -o option by running cmd from an elevated command prompt (Win + x is nice for this):

    ```cmd
    shutdown -r -o -f -t 0
    ```
    Then click "Troubleshoot", then reboot once again and choose to disable driver verification. Read the article above it has all pictures.

    To remove driver signature for windows download and run
    To enable driver test mode and sign a driver for windows, one may download
    [DSEO](http://www.ngohq.com/?page=dseo)

    Then run it
  3. Dmitry Romanov revised this gist Aug 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -99,7 +99,7 @@ command> install 0 PortName=COM5,EmuBR=yes -
    > Start the com2tcp-rfc2217.bat on CNCB0 port. For example:
    ```
    com2tcp-rfc2217 \\.\CNCB0 192.168.1.251 7000
    com2tcp-rfc2217 \\.\CNCB0 192.168.123.30 7000
    ```


  4. Dmitry Romanov revised this gist Jul 11, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -99,7 +99,7 @@ command> install 0 PortName=COM5,EmuBR=yes -
    > Start the com2tcp-rfc2217.bat on CNCB0 port. For example:
    ```
    com2tcp-rfc2217 \\.\CNCB0 your.comport.server 7000
    com2tcp-rfc2217 \\.\CNCB0 192.168.1.251 7000
    ```


    @@ -136,7 +136,7 @@ Enable Test Mode (if you hasn't done it before)
    Sign a system file

    ```
    d:\Tools\ComOverNetwork\com0com\com0com.sys
    c:\Windows\System32\drivers\com0com.sys
    ```

    ```d:\Tools\ComOverNetwork\com0com\``` - is where I installed com0com
  5. Dmitry Romanov revised this gist Jul 11, 2015. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -107,7 +107,7 @@ com2tcp-rfc2217 \\.\CNCB0 your.comport.server 7000

    <br>
    ##### ERRORS solution:
    #### Driver Signature
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off. The error during installation of com0com looks then like this:


    @@ -127,7 +127,21 @@ shutdown -r -o -f -t 0
    ```
    Then click "Troubleshoot", then reboot once again and choose to disable driver verification. Read the article above it has all pictures.

    To remove driver signature for windows download and run
    [DSEO](http://www.ngohq.com/?page=dseo)

    Then run it

    Enable Test Mode (if you hasn't done it before)
    Sign a system file

    ```
    d:\Tools\ComOverNetwork\com0com\com0com.sys
    ```

    ```d:\Tools\ComOverNetwork\com0com\``` - is where I installed com0com

    Restart the system

    <br>
    <br>
  6. Dmitry Romanov revised this gist Jun 26, 2015. 1 changed file with 5 additions and 8 deletions.
    13 changes: 5 additions & 8 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -48,15 +48,15 @@ There are absolutely brilliant free opensoure solution that can be used for comp
    http://sourceforge.net/projects/com0com


    <br>
    <br>
    ##### Server

    For the server you need only hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)


    **Configuration** (I just cite the documentation):
    <br>
    *Configuration (I just cite the documentation)*:


    You have a server computer with phisical COM1 port and you'd like to share it
    @@ -107,17 +107,14 @@ com2tcp-rfc2217 \\.\CNCB0 your.comport.server 7000

    <br>
    <br>
    **P.S. Possible errors**
    ##### ERRORS solution:
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off. The error during installation of com0com looks then like this:

    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)

    There are two ways around it:
    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)

    > A) bypass/disable driver signature verification, and/or B) sign the com0com driver.
    There are two ways around it: A) bypass/disable driver signature verification, and/or B) sign the com0com driver (c) bugreport.


    As a lazy person I prefer to TEMPORARILY disable driver signature verification. There are several ways to do it, and as a lazy person I prefer just to [follow this article](http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/):
  7. Dmitry Romanov revised this gist Jun 26, 2015. 1 changed file with 15 additions and 3 deletions.
    18 changes: 15 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@
    (Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in [the Wiki article](https://en.wikipedia.org/wiki/Serial_port) )


    <br>
    ## The problem
    Suppose we have an application that works with some device using serial port (com port). It could be GPS reader, IRDA, whatever. So it looks like this:

    @@ -26,6 +27,8 @@ Since the application knows only how to communicate with the device by serial po
    So now the application just works with serial port on the client machine, and doesn't even know that data is actually transmitted over the network.



    <br>
    ## The solution in theory

    One of the solutions is using telnet with [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are a lot of software that supports telnet+RFC2217 serial port forwarding. It allows you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). Thus can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
    @@ -34,6 +37,8 @@ One of the solutions is using telnet with [RFC2217 - Telnet Com Port Control Opt
    More over you can multiplex the com ports and encrypt the data. Whatever you want.



    <br>
    ## The solution in practice

    ### WINDOWS
    @@ -43,7 +48,8 @@ There are absolutely brilliant free opensoure solution that can be used for comp
    http://sourceforge.net/projects/com0com



    <br>
    <br>
    ##### Server

    For the server you need only hub4com part of it.
    @@ -66,6 +72,8 @@ com2tcp-rfc2217 COM1 7000
    It will listen TCP/IP port 7000 for incaming connections and redirect them to COM1 port.


    <br>
    <br>
    ##### Client

    To be a windows client you have to install com0com virtual comport driver.
    @@ -98,7 +106,9 @@ com2tcp-rfc2217 \\.\CNCB0 your.comport.server 7000
    > It will redirect virtual serial port COM5 on the second computer to the physical serial port on the first computer.

    P.S.
    <br>
    <br>
    **P.S. Possible errors**
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off. The error during installation of com0com looks then like this:

    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)
    @@ -122,7 +132,8 @@ Then click "Troubleshoot", then reboot once again and choose to disable driver v




    <br>
    <br>
    ### LINUX:

    #### Server
    @@ -156,6 +167,7 @@ ser2net #run service
    ```


    <br>
    #### Client
    Mmmm... Can you write it here, please?

  8. Dmitry Romanov revised this gist Jun 26, 2015. 1 changed file with 13 additions and 9 deletions.
    22 changes: 13 additions & 9 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@ So now the application just works with serial port on the client machine, and do

    ## The solution in theory

    One of the solutions is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
    One of the solutions is using telnet with [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are a lot of software that supports telnet+RFC2217 serial port forwarding. It allows you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). Thus can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.


    More over you can multiplex the com ports and encrypt the data. Whatever you want.
    @@ -38,16 +38,19 @@ More over you can multiplex the com ports and encrypt the data. Whatever you wan

    ### WINDOWS

    There are absolutely brilliant free opensoure solution that can be used for client and server for windows. It is called com0com.
    There are absolutely brilliant free opensoure solution that can be used for comport forwarding, client and server for windows. It is called com0com.

    http://sourceforge.net/projects/com0com

    For the server you just need hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)


    ##### Server
    (I just cite the documentation)

    For the server you need only hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)


    **Configuration** (I just cite the documentation):


    You have a server computer with phisical COM1 port and you'd like to share it
    @@ -67,16 +70,17 @@ It will listen TCP/IP port 7000 for incaming connections and redirect them to C

    To be a windows client you have to install com0com virtual comport driver.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download)
    Create virtual comport PAIR where one is used for RFC2217 and other is the port your application uses.
    Create ***a PAIR*** of virtual comports where one is used for RFC2217 and the other is the port for your application to use.


    (*documentation citation*) for RFC 2217 client :

    > RFC 2217 client (COM port to TCP redirector)

    > You have a server computer your.comport.server with physical serial port
    You have a server computer your.comport.server with physical serial port
    shared through the network by the RFC 2217 protocol (see above example) and
    you'd like to use it on the client computer like a virtual serial port.

    > With the com0com's Setup Command Prompt create COM5<->CNCB0 virtual
    With the com0com's Setup Command Prompt create COM5<->CNCB0 virtual
    COM port pair (see com0com's ReadMe.txt for more info). For example:

    ```
  9. Dmitry Romanov revised this gist Jun 26, 2015. 1 changed file with 37 additions and 7 deletions.
    44 changes: 37 additions & 7 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -12,23 +12,20 @@ Suppose we have an application that works with some device using serial port (co
    +--------+ +--------------+
    ```

    Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network.
    Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network. Real life example: a device is connected to ODROID - very small single-board PC that is connected to a local network, and read the data on a desktop.

    We suppose, the application can communicate with the device only by serial port. So the client machine has to have some virtual serial port that is used by the application:

    Since the application knows only how to communicate with the device by serial port (we suppose), the client machine has to have some virtual serial port that is used by the application:

    ```
    +--------+ comport +--------+ network +--------+ virtual comport +---+
    | DEVICE | ~~~~~~~~~~ | SERVER |========....==========| CLIENT |~~~~~~~~~~~~~~~~~~|APP|
    +--------+ +--------+ +--------+ +---+
    ```
    The device connected to the server with serial port connection. Server gets serial port data and sends it to a client machine over network. The client machine emulates serial port.


    So now the application just works with serial port on the client machine, and doesn't even know that data is actually transmitted over the network.


    > **Real life example**: a device is connected to ODROID - very small single-board PC running linux. It is connected to a local network, and you run the application on some remote desktop with windows.
    ## The solution in theory

    One of the solutions is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
    @@ -124,7 +121,40 @@ Then click "Troubleshoot", then reboot once again and choose to disable driver v

    ### LINUX:

    Mmmm... Can you write it here, please?
    #### Server

    The linux app I've got working pretty easy is ser2net

    http://linux.die.net/man/8/ser2net

    It has configuration file located at /etc/ser2net.conf.
    The configuration line (for /etc/ser2net.conf) that corresponds to windows setup above

    ```
    7000:telnet:0:/dev/ttyUSB0:1000000 8DATABITS NONE 1STOPBIT remctl
    ```
    Here:

    1. 7000 - port
    2. /dev/ttyUSB0 - name of serial port
    3. 1000000 ... - baud rate etc (actually you can skip it because of remctl)
    4. remctl - means using remote port configuration as of RFC2217

    That is it. Read ser2net docs for more


    **Ubuntu installation**

    ```bash
    sudo apt-get ser2net #install
    sudo vim /etc/ser2net.conf #configure
    ser2net #run service
    ```


    #### Client
    Mmmm... Can you write it here, please?




  10. Dmitry Romanov revised this gist Jun 26, 2015. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -12,20 +12,23 @@ Suppose we have an application that works with some device using serial port (co
    +--------+ +--------------+
    ```

    Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network. Real life example: a device is connected to ODROID - very small single-board PC that is connected to a local network, and read the data on a desktop.
    Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network.


    Since the application knows only how to communicate with the device by serial port (we suppose), the client machine has to have some virtual serial port that is used by the application:
    We suppose, the application can communicate with the device only by serial port. So the client machine has to have some virtual serial port that is used by the application:

    ```
    +--------+ comport +--------+ network +--------+ virtual comport +---+
    | DEVICE | ~~~~~~~~~~ | SERVER |========....==========| CLIENT |~~~~~~~~~~~~~~~~~~|APP|
    +--------+ +--------+ +--------+ +---+
    ```
    The device connected to the server with serial port connection. Server gets serial port data and sends it to a client machine over network. The client machine emulates serial port.


    So now the application just works with serial port on the client machine, and doesn't even know that data is actually transmitted over the network.


    > **Real life example**: a device is connected to ODROID - very small single-board PC running linux. It is connected to a local network, and you run the application on some remote desktop with windows.
    ## The solution in theory

    One of the solutions is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
  11. Dmitry Romanov revised this gist Jun 25, 2015. 1 changed file with 19 additions and 33 deletions.
    52 changes: 19 additions & 33 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Connecting to serial port (com port) over networ
    (Serial port vs com port? - Serial ports are often refered as COM ports. It is all the same. You can read abut it in [the Wiki article](https://en.wikipedia.org/wiki/Serial_port) )
    # Connecting to serial port (com port) over network
    (Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in [the Wiki article](https://en.wikipedia.org/wiki/Serial_port) )


    ## The problem
    @@ -12,20 +12,23 @@ Suppose we have an application that works with some device using serial port (co
    +--------+ +--------------+
    ```

    Now what we want is to run the application on the remote machine through network. But our application knows only how to communicate with serial port. So we have to connect the device to some server that transmits data over the network and to the client machine to the virtual serial port which the application is using:
    Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network. Real life example: a device is connected to ODROID - very small single-board PC that is connected to a local network, and read the data on a desktop.


    Since the application knows only how to communicate with the device by serial port (we suppose), the client machine has to have some virtual serial port that is used by the application:

    ```
    +--------+ comport +--------+ network +--------+ virtual comport +---+
    | DEVICE | ~~~~~~~~~~ | SERVER |========....==========| CLIENT |~~~~~~~~~~~~~~~~~~|APP|
    +--------+ +--------+ +--------+ +---+
    ```

    So now the application just works with serial port on the client machine and doesn't even know that data is actually transmitted over the network.
    So now the application just works with serial port on the client machine, and doesn't even know that data is actually transmitted over the network.


    ## The solution in theory

    One of the solution is is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
    One of the solutions is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.


    More over you can multiplex the com ports and encrypt the data. Whatever you want.
    @@ -35,49 +38,32 @@ More over you can multiplex the com ports and encrypt the data. Whatever you wan

    ### WINDOWS

    There are absolutely brilliant free opensoure solution that can be used for client and server for windows. It is called com0com.





    [This forum thread](http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/) describes how to do it:


    ### Serial port server computer


    ##### LINUX:

    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&

    ##### WINDOWS:

    (Socat for windows [can be found here](http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip) )

    socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    ### Client side

    ##### WINDOWS:
    For windows there are absolytely brilliant free opensoure solution that can be used for client and server com0com.
    http://sourceforge.net/projects/com0com

    For the server you just need hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)


    Then, according to documentation:
    > You have a server computer with phisical COM1 port and you'd like to share it
    ##### Server
    (I just cite the documentation)


    You have a server computer with phisical COM1 port and you'd like to share it
    through the network by the RFC 2217 "Telnet Com Port Control Option" protocol:

    > Start the com2tcp-rfc2217.bat on COM1 port. For example:

    Start the com2tcp-rfc2217.bat on COM1 port. For example:

    ```cmd
    com2tcp-rfc2217 COM1 7000
    ```

    > It will listen TCP/IP port 7000 for incaming connections and redirect them to COM1 port.
    It will listen TCP/IP port 7000 for incaming connections and redirect them to COM1 port.


    ##### Client

    To be a windows client you have to install com0com virtual comport driver.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download)
  12. Dmitry Romanov revised this gist Jun 25, 2015. 1 changed file with 88 additions and 27 deletions.
    115 changes: 88 additions & 27 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,45 @@
    # Connecting to serial port (com port) over networ
    (Serial port vs com port? - Serial ports are often refered as COM ports. It is all the same. You can read abut it in [the Wiki article](https://en.wikipedia.org/wiki/Serial_port) )


    ## The problem
    Suppose we have an application that works with some device using serial port (com port). It could be GPS reader, IRDA, whatever. So it looks like this:


    ```
    +--------+ serial +--------------+
    | DEVICE | ~~~~~~~~~~ | PC with APP |
    +--------+ +--------------+
    ```

    Now what we want is to run the application on the remote machine through network. But our application knows only how to communicate with serial port. So we have to connect the device to some server that transmits data over the network and to the client machine to the virtual serial port which the application is using:

    ```
    +--------+ comport +--------+ network +--------+ virtual comport +---+
    | DEVICE | ~~~~~~~~~~ | SERVER |========....==========| CLIENT |~~~~~~~~~~~~~~~~~~|APP|
    +--------+ +--------+ +--------+ +---+
    ```

    So now the application just works with serial port on the client machine and doesn't even know that data is actually transmitted over the network.


    ## The solution in theory

    One of the solution is is [RFC2217 - Telnet Com Port Control Option](https://tools.ietf.org/html/rfc2217). Is solves exactly the problem above. There are several/many tools which allow you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). You can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.


    More over you can multiplex the com ports and encrypt the data. Whatever you want.


    ## The solution in practice

    ### WINDOWS






    [This forum thread](http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/) describes how to do it:


    @@ -17,30 +59,57 @@ socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&
    ### Client side

    ##### WINDOWS:
    For windows there are absolytely brilliant free opensoure solution that can be used for client and server com0com.
    http://sourceforge.net/projects/com0com

    ```cmd
    com0com pair com3 - com25
    ```
    For the server you just need hub4com part of it.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download)

    http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download
    http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download

    Then, according to documentation:
    > You have a server computer with phisical COM1 port and you'd like to share it
    through the network by the RFC 2217 "Telnet Com Port Control Option" protocol:

    > Start the com2tcp-rfc2217.bat on COM1 port. For example:
    ```cmd
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006
    com2tcp-rfc2217 COM1 7000
    ```

    ##### LINUX:
    > It will listen TCP/IP port 7000 for incaming connections and redirect them to COM1 port.

    To be a windows client you have to install com0com virtual comport driver.
    [Source forge download link](http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download)
    Create virtual comport PAIR where one is used for RFC2217 and other is the port your application uses.

    Mmmm... Can you write it here, please?

    > RFC 2217 client (COM port to TCP redirector)
    <br>
    <br>
    ##Problems
    > You have a server computer your.comport.server with physical serial port
    shared through the network by the RFC 2217 protocol (see above example) and
    you'd like to use it on the client computer like a virtual serial port.

    > With the com0com's Setup Command Prompt create COM5<->CNCB0 virtual
    COM port pair (see com0com's ReadMe.txt for more info). For example:

    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, you'll probably have problem on Windows 8x64?
    ```
    >setupc.exe
    command> install 0 PortName=COM5,EmuBR=yes -
    ```

    > Start the com2tcp-rfc2217.bat on CNCB0 port. For example:
    ```
    com2tcp-rfc2217 \\.\CNCB0 your.comport.server 7000
    ```


    > It will redirect virtual serial port COM5 on the second computer to the physical serial port on the first computer.

    P.S.
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off. The error during installation of com0com looks then like this:

    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)
    @@ -51,30 +120,22 @@ There are two ways around it:
    > A) bypass/disable driver signature verification, and/or B) sign the com0com driver.

    As a lazy person I prefer to TEMPORARILY disable driver signature verification. There are several ways to do it, and as a lazy person I prefer just use a console
    As a lazy person I prefer to TEMPORARILY disable driver signature verification. There are several ways to do it, and as a lazy person I prefer just to [follow this article](http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/):

    http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/

    First you have to disable driver signature verification

    Run these commands from an elevated command prompt (Win + x is nice for this):
    The idea is to reboot with -o option by running cmd from an elevated command prompt (Win + x is nice for this):

    ```cmd
    bcdedit -set loadoptions DDISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON
    shutdown -r -f -t 0
    shutdown -r -o -f -t 0
    ```
    Then click "Troubleshoot", then reboot once again and choose to disable driver verification. Read the article above it has all pictures.

    Reboot and you’re good. Take note there are two (2) D‘s in DDISABLE. Now install whatever you like. If you ever want to revers what you did, just run the opposite:

    ```cmd
    bcdedit /deletevalue loadoptions
    bcdedit -set TESTSIGNING OFF
    ```

    > I’ve read reports that you only need to turn TESTSIGNING ON and don’t need the DDISABLE_INTEGRITY_CHECKS, but I use option 1, because I don’t like the ‘Test Mode’ on the screen.


    ### LINUX:

    Mmmm... Can you write it here, please?

    http://linux.die.net/man/8/ser2net

  13. Dmitry Romanov revised this gist Jun 24, 2015. No changes.
  14. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -18,10 +18,16 @@ socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    ##### WINDOWS:

    ```cmd
    com0com pair com3 - com25
    ```

    http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download
    http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download

    ```cmd
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006
    ```

    ##### LINUX:

  15. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -4,26 +4,26 @@
    ### Serial port server computer


    #### LINUX:
    ##### LINUX:

    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&

    #### WINDOWS:
    ##### WINDOWS:

    (Socat for windows [can be found here](http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip) )

    socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    ### Client side

    #### WINDOWS:
    ##### WINDOWS:

    com0com pair com3 - com25
    http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download
    http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006

    #### LINUX:
    ##### LINUX:

    Mmmm... Can you write it here, please?

  16. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 51 additions and 18 deletions.
    69 changes: 51 additions & 18 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,41 +1,74 @@
    [This forum thread](http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/) describes how to do it:


    ### Serial port server computer


    #### LINUX:

    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&

    #### WINDOWS:

    (Socat for windows [can be found here](http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip) )

    socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    ### Client side

    #### WINDOWS:

    com0com pair com3 - com25
    http://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/com0com-3.0.0.0-i386-and-x64-unsigned.zip/download
    http://sourceforge.net/projects/com0com/files/hub4com/2.1.0.0/hub4com-2.1.0.0-386.zip/download
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006

    #### LINUX:

    Mmmm... Can you write it here, please?


    <br>
    <br>
    ##Problems


    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, you'll probably have problem on Windows 8x64?


    >(SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)
    > (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)

    There are two ways around it:


    > A) bypass/disable driver signature verification, and/or B) sign the com0com driver.

    As a lazy person I prefer to TEMPORARILY disable driver signature verification. There are several ways to do it, and as a lazy person I prefer just use a console

    http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/

    First you have to disable driver signature verification

    Run these commands from an elevated command prompt (Win + x is nice for this):

    ```cmd
    bcdedit -set loadoptions DDISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON
    shutdown -r -f -t 0
    ```

    Reboot and you’re good. Take note there are two (2) D‘s in DDISABLE.
    Reboot and you’re good. Take note there are two (2) D‘s in DDISABLE. Now install whatever you like. If you ever want to revers what you did, just run the opposite:

    Now install whatever you like. If you ever want to revers what you did, just run the opposite:
    ```cmd
    bcdedit /deletevalue loadoptions
    bcdedit -set TESTSIGNING OFF
    ```

    I’ve read reports that you only need to turn TESTSIGNING ON and don’t need the DDISABLE_INTEGRITY_CHECKS, but I use option 1, because I don’t like the ‘Test Mode’ on the screen.


    http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/
    linux:
    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&
    > I’ve read reports that you only need to turn TESTSIGNING ON and don’t need the DDISABLE_INTEGRITY_CHECKS, but I use option 1, because I don’t like the ‘Test Mode’ on the screen.
    windows
    Socat for windows
    http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip

    socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    xp side:

    com0com pair com3 - com25
    http://sourceforge.net/projects/com0...e.zip/download
    http://sourceforge.net/projects/com0...6.zip/download
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006

  17. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    According to (this bug report)[http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25]
    Is there Windows 8x64 support ?
    According to [this bug report](http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25) and my own experience, you'll probably have problem on Windows 8x64?


    >(SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)
    (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)


    http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/
  18. Dmitry Romanov renamed this gist Jun 24, 2015. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.txt → gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    According to (this bug report)[http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25]
    Is there Windows 8x64 support ?

  19. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 24 additions and 0 deletions.
    24 changes: 24 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,27 @@

    According to (this bug report)[http://sourceforge.net/p/com0com/discussion/440108/thread/13d56079/?limit=25]
    Is there Windows 8x64 support ?

    (SetupCopyOEMInf(C:\Program Files (x86)\com0com\com0com.inf) ERROR: 0xE000022F)


    http://thephuck.com/end-user-computing/how-to-disable-driver-signing-requirement-in-windows-8/

    First you have to disable driver signature verification

    Run these commands from an elevated command prompt (Win + x is nice for this):
    bcdedit -set loadoptions DDISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON

    Reboot and you’re good. Take note there are two (2) D‘s in DDISABLE.

    Now install whatever you like. If you ever want to revers what you did, just run the opposite:
    bcdedit /deletevalue loadoptions
    bcdedit -set TESTSIGNING OFF

    I’ve read reports that you only need to turn TESTSIGNING ON and don’t need the DDISABLE_INTEGRITY_CHECKS, but I use option 1, because I don’t like the ‘Test Mode’ on the screen.


    http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/
    linux:
    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&
  20. Dmitry Romanov revised this gist Jun 24, 2015. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,17 @@
    http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/
    xen side:
    linux:
    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&

    windows
    Socat for windows
    http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip

    socat file:/dev/com3,raw,echo=0 tcp-l:3006,fork&

    xp side:

    com0com pair com3 - com25
    http://sourceforge.net/projects/com0...e.zip/download
    http://sourceforge.net/projects/com0...6.zip/download
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006

    Socat for windows
    http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip
  21. Dmitry Romanov created this gist Jun 24, 2015.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/
    xen side:
    socat file:/dev/ttyS0,raw,echo=0 tcp-l:3006,fork&

    xp side:

    com0com pair com3 - com25
    http://sourceforge.net/projects/com0...e.zip/download
    http://sourceforge.net/projects/com0...6.zip/download
    com2tcp --ignore-dsr \\.\COM25 192.168.50.66 3006

    Socat for windows
    http://blog.gentilkiwi.com/downloads/socat-2.0.0-b5.zip