ExtremeGTX / Com2TcpApp

A command line utility implemented in .net core to forward data between COM port and a TCP socket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License


Logo

com2tcp

A simple command line tool to forward data between a COM Port and a TCP socket
Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

A simple command line tool to forward data between a COM Port and a TCP socket

Features

  • Forward data between a COM Port and a TCP socket
  • Automatic recovery if COM Port is removed and re-connected
  • Export the COM port to WSL

Built With

  • .NET
  • vscode-shield
  • Windows

Getting Started

Prerequisites

Installation

  • Extract the zip archive and run, see the Usage section below.

Usage

Server side:

  • Basic usage: com2tcp.exe --com-port COM1

  • Specify Adapter address and port com2tcp.exe --com-port COM1 --tcp-address 192.168.1.2 --tcp-port 5001

  • Forward the COM port on the WSL adapter com2tcp.exe --com-port COM1 --tcp-port 5001 --wsl

Client side (TCP):

  • Use any TCP Client to connect to the forwarded port using the server-ip and port specified in the previous step.

Client side (Serial):

  1. you can use socat to change the TCP connection back to serial.

    sudo socat -d -d -d TCP:172.21.224.1:5001 pty,link=/dev/ttyVA00,raw,echo=0,perm=0777

  2. Then use a serial terminal, for example microcom

    sudo microcom -p /dev/ttyVA00

License

Distributed under the MIT License. See LICENSE.txt for more information.

TODO

Add compliance with RFC2217 to support Line control

Contact

Mohamed ElShahawi - @extremegtx

Project Link: https://github.com/ExtremeGTX/Com2TcpApp

Acknowledgments

About

A command line utility implemented in .net core to forward data between COM port and a TCP socket

License:MIT License


Languages

Language:C# 98.6%Language:Batchfile 1.4%